-
Notifications
You must be signed in to change notification settings - Fork 82
[FIX] Uninitialized access fixes + improved initcheck error reporting #348
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
Draft
aliceb-nv
wants to merge
7
commits into
branch-25.10
Choose a base branch
from
initchecks
base: branch-25.10
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e469439
merge initcheck changes
aliceb-nv ee493a8
further fixes, add initcheck suppression file
aliceb-nv 55140df
Support cuda 12.9 (#269)
rgsl888prabhu 1a97bc6
workaround to build on 12.9
aliceb-nv 7e2ca66
Merge branch 'branch-25.10' into initchecks
aliceb-nv da49032
Merge branch 'branch-25.10' into initchecks
aliceb-nv 267ee2d
address review comments
aliceb-nv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,225 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<ComputeSanitizerOutput> | ||
<record> | ||
<kind>Initcheck</kind> | ||
<what> | ||
<text>Uninitialized __global__ memory read of size 4 bytes</text> | ||
<size>4</size> | ||
</what> | ||
<where> | ||
<func>.*</func> | ||
</where> | ||
<hostStack> | ||
<frame> | ||
<module>.*libcuda.so.*</module> | ||
</frame> | ||
<frame> | ||
<func>cusparseCsr2cscEx2</func> | ||
<module>.*libcusparse.so.*</module> | ||
</frame> | ||
</hostStack> | ||
</record> | ||
<record> | ||
<kind>Initcheck</kind> | ||
<what> | ||
<text>Uninitialized __global__ memory read of size 4 bytes</text> | ||
<size>4</size> | ||
</what> | ||
<where> | ||
<func>ThreadLoad</func> | ||
</where> | ||
<hostStack> | ||
<frame> | ||
<module>.*libcuda.so.*</module> | ||
</frame> | ||
<frame> | ||
<module>libcudart.*</module> | ||
</frame> | ||
<frame> | ||
<func>cudaLaunchKernel</func> | ||
</frame> | ||
<frame> | ||
<func>.*cub::.*::Device(Segmented)?(Reduce|Scan)(SingleTile)?Kernel.*</func> | ||
</frame> | ||
</hostStack> | ||
</record> | ||
<record> | ||
<kind>Initcheck</kind> | ||
<what> | ||
<text>Uninitialized __global__ memory read of size 2 bytes</text> | ||
<size>2</size> | ||
</what> | ||
<where> | ||
<func>ThreadLoad</func> | ||
</where> | ||
<hostStack> | ||
<frame> | ||
<module>.*libcuda.so.*</module> | ||
</frame> | ||
<frame> | ||
<module>libcudart.*</module> | ||
</frame> | ||
<frame> | ||
<func>cudaLaunchKernel</func> | ||
</frame> | ||
<frame> | ||
<func>.*cub::.*::Device(Segmented)?(Reduce|Scan)(SingleTile)?Kernel.*</func> | ||
</frame> | ||
</hostStack> | ||
</record> | ||
<record> | ||
<kind>Initcheck</kind> | ||
<what> | ||
<text>Uninitialized __global__ memory read of size 8 bytes</text> | ||
<size>8</size> | ||
</what> | ||
<where> | ||
<func>DeviceSegmentedReduceKernel</func> | ||
</where> | ||
</record> | ||
<record> | ||
<kind>Initcheck</kind> | ||
<what> | ||
<text>Uninitialized __global__ memory read of size 4 bytes</text> | ||
<size>4</size> | ||
</what> | ||
<where> | ||
<func>ThreadLoad</func> | ||
</where> | ||
<hostStack> | ||
<frame> | ||
<module>.*libcuda.so.*</module> | ||
</frame> | ||
<frame> | ||
<module>libcudart.*</module> | ||
</frame> | ||
<frame> | ||
<module>libcudart.*</module> | ||
</frame> | ||
<frame> | ||
<module>.*libcuopt.*</module> | ||
</frame> | ||
<frame> | ||
<func>.*Device(Reduce|Scan)Kernel.*</func> | ||
</frame> | ||
</hostStack> | ||
</record> | ||
<!-- Rule matching cccl's pattern of copying tuples back to host after reduce_by_keys, which contain uninitialized padding --> | ||
<!-- Because of aggressive inlining, thrust calls are elided out of the host stack, which prevents a more finely grained rule. In practice this is good enough --> | ||
<record> | ||
<kind>InitcheckApiError</kind> | ||
<level>Error</level> | ||
<what> | ||
<text>Host API uninitialized memory access</text> | ||
<accessSize>16</accessSize> | ||
</what> | ||
<hostStack> | ||
<frame> | ||
<func>cuMemcpyDtoHAsync.*</func> | ||
<module>.*libcuda.so.*</module> | ||
</frame> | ||
</hostStack> | ||
</record> | ||
<!-- Suppress uninit copies on rmm::device_vector copy constructor - often vector members are allocated but not filled --> | ||
<record> | ||
<kind>InitcheckApiError</kind> | ||
<level>Error</level> | ||
<what> | ||
<text>Host API uninitialized memory access</text> | ||
</what> | ||
<hostStack> | ||
<frame> | ||
<func>cuMemcpyAsync</func> | ||
<module>.*libcuda.so.*</module> | ||
</frame> | ||
<frame> | ||
<module>.*libcudart.so.*</module> | ||
</frame> | ||
<frame> | ||
<module>.*libcudart.so.*</module> | ||
</frame> | ||
<frame> | ||
<module>.*libcudart.so.*</module> | ||
</frame> | ||
<frame> | ||
<module>.*librmm.so.*</module> | ||
</frame> | ||
<frame> | ||
<func>rmm::device_buffer::device_buffer</func> | ||
<module>.*librmm.so.*</module> | ||
</frame> | ||
</hostStack> | ||
</record> | ||
<record> | ||
<kind>InitcheckApiError</kind> | ||
<level>Error</level> | ||
<what> | ||
<text>Host API uninitialized memory access</text> | ||
</what> | ||
<hostStack> | ||
<frame> | ||
<func>cuMemcpyAsync</func> | ||
<module>.*libcuda.so.*</module> | ||
</frame> | ||
<frame> | ||
<module>.*libcudart.so.*</module> | ||
</frame> | ||
<frame> | ||
<module>.*libcudart.so.*</module> | ||
</frame> | ||
<frame> | ||
<module>.*libcudart.so.*</module> | ||
</frame> | ||
<frame> | ||
<module>.*librmm.so.*</module> | ||
</frame> | ||
<frame> | ||
<module>.*librmm.so.*</module> | ||
</frame> | ||
<frame> | ||
<func>rmm::device_uvector.*::device_uvector</func> | ||
<module>.*libcuopt.so.*</module> | ||
</frame> | ||
</hostStack> | ||
</record> | ||
<!-- Uninitialized device-to-device copies are usually harmless - if actualy bogus, errors may be caught later on --> | ||
<record> | ||
<kind>InitcheckApiError</kind> | ||
<level>Error</level> | ||
<what> | ||
<text>Host API uninitialized memory access</text> | ||
</what> | ||
<hostStack> | ||
<frame> | ||
<func>cuMemcpyDtoDAsync.*</func> | ||
<module>.*libcuda.so.*</module> | ||
</frame> | ||
</hostStack> | ||
</record> | ||
<record> | ||
<kind>InitcheckApiError</kind> | ||
<level>Error</level> | ||
<what> | ||
<text>Host API uninitialized memory access</text> | ||
</what> | ||
<hostStack> | ||
<frame> | ||
<func>cuMemcpyAsync</func> | ||
<module>.*libcuda.so.*</module> | ||
</frame> | ||
<frame> | ||
<module>.*libcudart.so.*</module> | ||
</frame> | ||
<frame> | ||
<module>.*libcudart.so.*</module> | ||
</frame> | ||
<frame> | ||
<func>cudaMemcpyAsync</func> | ||
</frame> | ||
<frame> | ||
<func>rmm::device_buffer::resize</func> | ||
<module>.*librmm.so.*</module> | ||
</frame> | ||
</hostStack> | ||
</record> | ||
</ComputeSanitizerOutput> |
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this xml?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is necessary to run compute-sanitizer --initchecks without false positives. It will be useful if we include initcheck runs as part of CI in the future (which I think we should consider)
CCCL has a similar file on their repo: https://github.com/NVIDIA/cccl/blob/main/ci/compute-sanitizer-suppressions.xml