Skip to content

Add regression coverage for CUDA-context-independent topology discovery - #191

Merged
rapids-bot[bot] merged 2 commits into
NVIDIA:mainfrom
pentschev:fix-topology-cuda-context-agnostic
Sep 16, 2026
Merged

rapids-bot[bot] merged 2 commits into
NVIDIA:mainfrom
pentschev:fix-topology-cuda-context-agnostic

Conversation

@pentschev

@pentschev pentschev commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

PR #176 keeps default topology discovery independent of CUDA runtime and context state. This PR closes the remaining coverage gap by adding a multi-GPU regression test that verifies default topology discovery does not initialize CUDA or capture temporarily widened CUDA_VISIBLE_DEVICES, as well as documenting that default discovery is CUDA-context independent, while runtime-attribute discovery is explicitly opt-in.

@pentschev
pentschev requested a review from aminaramoon August 18, 2026 14:56
@pentschev pentschev self-assigned this Aug 18, 2026
@pentschev pentschev added bug Something isn't working non-breaking labels Aug 18, 2026
Topology discovery must be safe to use independently of CUDA runtime and
context state. It should not initialize CUDA, require an active context,
create a context, or otherwise change CUDA process state.

This change restores that invariant that was previously modified in
NVIDIA#167 and documents it as part of
the topology-discovery API contract. It also adds GPU coverage to guard
the behavior going forward.
Comment thread src/memory/topology_discovery.cpp Outdated
return false;
}
constexpr int min_hw_decompression_cuda_version = 12080;
int driver_version = 0;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not all hardware has a DE engine even if the driver supports it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, you're right. I realized that and have been discussing this offline as well, I'll link to the existing discussion, in the meantime we should hold merging this.

…ontext-agnostic

# Conflicts:
#	include/cucascade/memory/topology_discovery.hpp
#	src/memory/topology_discovery.cpp
@pentschev pentschev changed the title Keep topology discovery CUDA-context agnostic Add regression coverage for CUDA-context-independent topology discovery Sep 16, 2026
@felipeblazing

Copy link
Copy Markdown
Contributor

/merge

@rapids-bot
rapids-bot Bot merged commit edd15e0 into NVIDIA:main Sep 16, 2026
12 checks passed
@pentschev
pentschev deleted the fix-topology-cuda-context-agnostic branch September 16, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants