Repository navigation
[STF] Locality-domain tests: single-domain devices have nothing to split - #11994
Conversation
On a device reporting a single locality domain the domain is the device: the driver documents that a localized allocation on domain 0 is a plain device allocation (ordinal -1), and asking it to split SMs by domain is pointless at best. A forward-compat user-mode driver on an older kernel driver (CI VMs with cuda-compat-13-4 over R595) goes further and hands back an unsplit device without reporting any error, which the structural checks of locality_domain_split_method then trip over (114 SMs against an alignment of 8), while locality_domain_alloc expected ordinal 0. - Extend the whole-device degrade of the native backend to single-domain devices: every split method maps to the one whole-device green context, exactly like the "driver cannot answer" case. No new driver check. - locality_domain_split_method: read each place's SM partition through the public API (activate the place, query the current context) instead of reaching into locality_domain_ctx_cache / native_raw_count. With several domains, assert that every group echoes the requested domain in its flags/localityDomainId before checking the structural properties, so an unhonored split fails loudly instead of being ignored. With one domain, assert the documented degenerate answers (equal places, whole device). Branch on locality_domain_count instead of internals, and on the environment variable for the fake topology. - locality_domain_alloc: accept ordinal -1 on single-domain devices. - Document that the split method is ignored on single-domain devices. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
/ok to test 3d72e6d |
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 Summary
Priority: ⬇️ Low Change: Bug fix Merge Risk: 🔵 Low · up to
|
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository: NVIDIA/cccl/.coderabbit.yaml
- Review profile: CHILL
- Plan: Enterprise
- Run ID:
2986ef63-e34e-46a0-b769-b41e1cbca8ed
📒 Files selected for processing (4)
cudax/include/cuda/experimental/__places/exec/locality_domain.cuhcudax/test/stf/places/locality_domain_alloc.cucudax/test/stf/places/locality_domain_split_method.cudocs/cudax/places.rst
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.
| &ordinal, CU_POINTER_ATTRIBUTE_LOCALITY_DOMAIN_ORDINAL, reinterpret_cast<CUdeviceptr>(ptr))); | ||
| if (std::getenv("CUDASTF_DISABLE_LOCALIZED_MEMORY") != nullptr | ||
| || std::getenv("CUDASTF_FAKE_LOCALITY_DOMAINS") != nullptr) | ||
| || std::getenv("CUDASTF_FAKE_LOCALITY_DOMAINS") != nullptr || ndomains == 1) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
suggestion: Test the parsed fake-topology state in both files. locality_domain_fake_count() disables the override for 0 and non-numeric values. Environment-variable presence therefore does not establish that fake topology is active.
cudax/test/stf/places/locality_domain_alloc.cu#L80-L80: use the parsed count so a native multi-domain allocation is not incorrectly expected to report-1.cudax/test/stf/places/locality_domain_split_method.cu#L94-L94: use the parsed count so native partition checks are not incorrectly waived.
📍 Affects 2 files
cudax/test/stf/places/locality_domain_alloc.cu#L80-L80(this comment)cudax/test/stf/places/locality_domain_split_method.cu#L94-L94
| the fake-topology override) accept and ignore the method: the domain is the | ||
| device. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
suggestion: Limit “the domain is the device” to whole-device cases. With CUDASTF_FAKE_LOCALITY_DOMAINS=N and N > 1, each fake domain is a green-context SM partition. The override ignores the split method, but a fake domain is not the whole device. Separate that case from the whole-device cases. As per path instructions, documentation changes require “technical accuracy” and “API/version consistency.”
Source: Path instructions
This comment has been minimized.
This comment has been minimized.
|
/ok to test 8dd4346 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
/ok to test 0cb1ede |
@pciolkosz, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/ |
|
/ok to test 0cb1ede |
@pciolkosz, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/ |
|
/ok to test 0cb1ede |
🥳 CI Workflow Results🟩 Finished in 1h 28m: Pass: 100%/73 | Total: 15h 15m | Max: 1h 08m | Hits: 100%/45918See results here. AI failure analysis1. MatX SAR backprojection conversion rejected as an error · 1 jobExplanation: MatX commit 424f0df72670804024b533787d6c70c146e27b14 passes a potentially wider expression to the float-only `__sincosf` intrinsic, and NVCC 13.4 promotes the conversion warning because MatX enables `-Wconversion -Werror`. The PR changes only CUDA Experimental locality-domain files, so the evidence does not connect this third-party source error to the PR. Evidence: Copy this prompt into a coding agentJobs: 2. cuOpt uses RMM stream APIs absent from librmm 26.12 · 1 jobExplanation: cuOpt main commit 729b27a4bce83046d5626901ee1ca84013cad210 is compiled against the 26.12 nightly RMM package, but numerous cuOpt translation units call the missing `cuda_stream::view()` API; another object reports that `rmm::cuda_stream_default` is missing. This indicates cuOpt/RMM API-version skew, with no evidence that the locality-domain PR caused it. Evidence: Copy this prompt into a coding agentJobs: |
Description
Fixes the two locality-domain test failures seen in #11991 (forward-compat
cuda-compat-13-4user-mode driver over an R595 kernel driver, single H100 PCIe):locality_domain_alloc.cu(84): -1 == 0 is falselocality_domain_split_method.cu(153): 2 == 0 is falseNeither is a driver-version problem the existing waiver (#11837) can catch: under forward compat
cuDriverGetVersionreports 13.4. Both are the tests over-specifying what a single-domain device must return:Checklist
🤖 Generated with Claude Code