[libcudacxx] Add support for wider types in fill_bytes#8333
Open
pciolkosz wants to merge 2 commits intoNVIDIA:mainfrom
Open
[libcudacxx] Add support for wider types in fill_bytes#8333pciolkosz wants to merge 2 commits intoNVIDIA:mainfrom
pciolkosz wants to merge 2 commits intoNVIDIA:mainfrom
Conversation
Test fill_bytes with uint16_t and uint32_t patterns on device and pinned memory, plus an mdspan test with uint32_t.
Contributor
🥳 CI Workflow Results🟩 Finished in 2h 25m: Pass: 100%/108 | Total: 1d 23h | Max: 2h 15m | Hits: 99%/281468See results here. |
Jacobfaib
reviewed
Apr 10, 2026
Comment on lines
+52
to
+53
| static_assert(sizeof(_ValueTy) == 1 || sizeof(_ValueTy) == 2 || sizeof(_ValueTy) == 4, | ||
| "Fill value must be 1, 2, or 4 bytes (matching CUDA driver memset support)"); |
Contributor
There was a problem hiding this comment.
This check is already done in __memsetAsync() (though the message there could be improved).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fill_bytesto acceptuint16_tanduint32_tfill values in addition touint8_t, matching the CUDA driver'scuMemsetD8Async/cuMemsetD16Async/cuMemsetD32Asynccapabilities.__fill_bytes_implon the fill value type, with astatic_assertrestricting to 1, 2, or 4 byte values.Test plan
fill_bytestests continue to pass (uint8_t path unchanged)uint16_tanduint32_tfill patterns