Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add memset #300

Merged
merged 7 commits into from
Aug 14, 2024
Merged

Add memset #300

merged 7 commits into from
Aug 14, 2024

Conversation

csbnw
Copy link
Contributor

@csbnw csbnw commented Aug 14, 2024

Description

This fixes #299, adding cu::DeviceMemory::memset and cu::Stream::memsetAsync methods. The test_cu has been extended to also cover the new functionality.

Additionally, the existing ::zero methods now call the appropriate memset(Async) method, instead of repeating the CUDA driver API call.

To implement the tests, some minor cleanup to pre-existing tests was done. These changes are so insignificant that I don't think they warrant their own PR.

Related issues:

Instructions to review the pull request

  • Check that CHANGELOG.md has been updated if necessary

@csbnw csbnw added the enhancement New feature or request label Aug 14, 2024
@csbnw csbnw requested a review from matmanc August 14, 2024 11:53
@csbnw csbnw self-assigned this Aug 14, 2024
tests/test_cu.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@matmanc matmanc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me :)

@csbnw csbnw merged commit 56ec809 into main Aug 14, 2024
7 checks passed
@csbnw csbnw deleted the add-memset branch August 14, 2024 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add cu::Device::cudaMemsetAsync
2 participants