Gate the pinned-memory system-scope atomic test on host native atomics - #3271
Merged
Merged
Conversation
System-scope atomics on host-pinned memory are only atomic at system scope when the host supports native atomics (CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED), e.g., on NVLink C2C systems. On other hosts compute-sanitizer 2026.3 reports the atom.sys instruction as an invalid system-scoped atomic on non-migratable memory, which has been failing the sanitizer CI job since #3268 added this smoke test.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3271 +/- ##
==========================================
- Coverage 92.58% 92.56% -0.02%
==========================================
Files 188 188
Lines 16471 16472 +1
==========================================
- Hits 15249 15247 -2
- Misses 1222 1225 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
CUDA.jl BenchmarksDetails
This comment was automatically generated by workflow using github-action-benchmark. |
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.
The "Compute sanitizer" CI job has been failing on
mainsince #3268 (first failing build 7824), with 32 reports offrom the
system scopetestset intest/core/device/intrinsics/atomics.jl. The device frame points at the definition ofadd_kernel, but the flagged access is the host-pinned smoke test that #3268 added at the end of the testset (aInt32[0]wrapped as aHostMemoryCuArray).Compute-sanitizer 2026.3 checks system-scoped atomics against the memory they target (its internal message reads "A system-atomic operation was performed on non-migratable memory"). Per the programming guide's atomicity rules, a system-scope atomic on mapped/pinned memory is only atomic at system scope when
CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTEDis set, which is not the case on x86 PCIe hosts such as the CI agents. Device and managed memory are not flagged. There is no sanitizer option to disable the check.This gates the pinned-memory smoke test on that attribute, so it only runs where the operation is actually meaningful (e.g., NVLink C2C systems).
Verified locally on an RTX 5080 with NVPTX_LLVM_Backend_jll 23 (which emits
atom.acq_rel.sys.global.add, unlike backend 22 that drops the scope and thus never triggered this locally): the sanitized atomics test reproduces the CI failure before this change and passes with no sanitizer findings after it.