You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(cuda.core): assert host-located graph allocations are unsupported - #3662
test_alloc_memory_type_host skipped on every runner with "Driver does not support graph alloc memory_type='host'". That reflects how drivers actually behave: no driver we can reach supports host-located graph allocations (evidence below), and graph memory nodes are documented only for device-resident memory ("poolProps.location ... specifies the resident device").
So this replaces the round trip that never ran in any configuration with a test that covers the rejection:
cuda_core/tests/graph/test_graph_definition.py
-test_alloc_memory_type_host # round trip; skipped on NOT_SUPPORTED everywhere+test_alloc_memory_type_host_not_supported+ allocate(memory_type=HOST) must raise CUDA_ERROR_NOT_SUPPORTED+ (keeps the existing memory-pool and pre-CUDA-13.0 skips)
If a future driver starts accepting host locations, the new test fails. Its docstring says to replace it with a round-trip test at that point.
Whether cuda.core should keep offering GraphMemoryType.HOST for graph allocations is an API question, and is out of scope here.
Evidence
Driver behavior: the probe in #3690 tried every API path, location and allocation type on each CI configuration. Its results, and the 13.4/13.5 measurements, are summarized in #3662 (comment). No driver or platform accepted a host-located graph allocation:
Confirming in CI: on main, test_alloc_memory_type_host skips in every configuration. With this change, test_alloc_memory_type_host_not_supported should pass in every cuda.core job whose device supports memory pools and whose driver is CUDA 13.0 or newer. To check one job:
Blast Radius: one test in cuda_core/tests/graph/test_graph_definition.py. It fails if a driver starts accepting host-located graph allocations; that is intended, as a prompt to restore a round-trip test.
Reviewers: please feel free to push commits directly to this PR to improve it.
…r's NOT_SUPPORTED
test_alloc_memory_type_host skipped on every runner because graph
allocation nodes with a host pool location return CUDA_ERROR_NOT_SUPPORTED.
Drivers up to CUDA 13.4 support graph allocations only in device memory:
cuGraphAddMemAllocNode and stream-captured allocations from a host pool
both reject HOST and HOST_NUMA locations, although host memory pools
themselves are supported.
Treat CUDA_ERROR_NOT_SUPPORTED as the expected current result instead of a
skip, fail on any other error, and keep the round-trip check for a driver
that accepts the allocation. Remove the "not currently run in any CI job"
comment.
ClosesNVIDIA#3588.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Host-memory graph allocation tests now verify that allocation is reported as unsupported on CUDA 13.0 or later when memory-pool support is available.
The HOST graph allocation test no longer checks reconstruction of a HOST allocation. On drivers version 13.0 or later, when mempool support is available, it asserts that allocation raises CUDA_ERROR_NOT_SUPPORTED. The test file also removes an unused import and a redundant local import.
Changes: HOST graph allocation test
Layer / File(s)
Summary
HOST allocation rejection test cuda_core/tests/graph/test_graph_definition.py
The test now expects HOST graph allocation to raise CUDA_ERROR_NOT_SUPPORTED when the driver is version 13.0 or later and mempool support is available. It removes the prior reconstruction checks and skips. The file also removes an unused weakref import and a function-local gc import.
Assessment against linked issues
Objective
Addressed
Explanation
[#3588] Encode the host-allocation requirement in the test and run it where that requirement is met.
❓
The test asserts the observed CUDA_ERROR_NOT_SUPPORTED result for drivers version 13.0 or later, but the provided context does not establish that this is the documented requirement or confirm that the test runs in CI.
Assessment against linked issues: Out-of-scope changes
Code Change
Explanation
None
No functional changes outside the linked objective are identified.
Possibly related issues
NVIDIA/cuda-python#3579 — The issue notes that CI lacks drivers as new as CTK 13.5. The changed test asserts rejection on qualifying drivers, but the supplied context does not confirm the result on a CTK 13.5 driver.
Suggested reviewers:jpascucci-nv, juenglin
Change: Other
Merge Risk: Low · up to 571ab
This only changes a test. A future driver that accepts host-located graph allocations would make the test fail until it is updated, and the round-trip check is no longer covered. Production behavior is unaffected, so merge risk is low.
Security architecture risk: Minimal · up to 571ab
The cuda.core test now checks that eligible CUDA drivers reject HOST graph allocations with CUDA_ERROR_NOT_SUPPORTED. The PR does not change how applications allocate graph memory.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Finishing TouchesFix failing CI checks
Reviewing files that changed from the base of the PR and between daeda6d and 4f9be79.
Files selected for processing: 1
cuda_core/tests/graph/test_graph_definition.py
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
I don't have an idea of how this should be fixed, but sol 6.1 high detected:
[P2] Unsupported configurations now report false coverage. The new return marks the test passed without reaching its HOST-node reconstruction assertions. It also accepts NOT_SUPPORTED indefinitely, including on future drivers that should support the feature. This leaves #3588’s central requirement unresolved.
Keep a documented skip for unsupported configurations, or separate rejection coverage from the round-trip test. Once support is known, unexpected NOT_SUPPORTED should fail.
…e round trip
Instead of returning early (and passing) on CUDA_ERROR_NOT_SUPPORTED, record
the newest driver known to reject host-located graph allocation nodes
(_HOST_GRAPH_ALLOC_UNSUPPORTED_THROUGH, CUDA 13.4). On those drivers,
test_alloc_memory_type_host_not_supported asserts the rejection and
test_alloc_memory_type_host skips with a documented reason. On newer drivers
the round-trip test runs and fails on an unexpected NOT_SUPPORTED.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mdboom
changed the title
test(cuda.core): run test_alloc_memory_type_host and accept the driver's NOT_SUPPORTED
test(cuda.core): cover the driver's NOT_SUPPORTED for host graph allocations; gate the round trip on driver version
Dec 1, 2026
Thanks @jpascucci-nv, good catch. Addressed in d1441a7 by separating rejection coverage from the round trip:
_HOST_GRAPH_ALLOC_UNSUPPORTED_THROUGH = (13, 4) records the newest driver known to reject host-located graph allocations (seen on 13.2, 13.3 and 13.4).
New test_alloc_memory_type_host_not_supported: on those drivers, asserts CUDA_ERROR_NOT_SUPPORTED. This is the coverage that runs in CI today.
Reviewing files that changed from the base of the PR and between 0147a44 and d1441a7.
Files selected for processing: 1
cuda_core/tests/graph/test_graph_definition.py
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review.
…the round trip
The NVIDIA#3690 probe found no driver or platform that accepts a host-located
graph allocation: CUDA 13.0 and 13.2 drivers on every CI row (Linux,
Windows TCC/MCDM/WDDM, WSL; V100 through GB300), 13.4 locally, and 13.5
(620.70.10) on every Linux row of NVIDIA#3691. Graph memory nodes are documented
only for device-resident memory.
So the rejection test no longer depends on a driver-version threshold, and
the round-trip test, which no configuration ever ran, is removed. The
rejection test's docstring says to replace it with a round trip if a
driver starts accepting host locations.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Probe results (#3690): no driver supports host-located graph allocations
What #3690's probe covered. 61 of its 65 CI jobs ran the probe:
Drivers: 580.196.11 and 582.16 (CUDA 13.0), 595.112.07 and 596.36 (CUDA 13.2).
GPUs: V100, T4, A100, L4, H100 NVL, RTX PRO 6000, RTX 2080/4090, GH200 and GB300.
Platforms: Linux, Windows in TCC, MCDM and WDDM modes, and WSL.
The other 4 jobs:
Two 620.85.02 rows: their cuda.core tests failed first on an unrelated host-pinned IPC regression, so the probe step never ran.
One cancelled job.
One Windows crash.
Results. No host-located graph allocation succeeded anywhere:
HOST and HOST_NUMA: every attempt returned CUDA_ERROR_NOT_SUPPORTED.
HOST_NUMA_CURRENT: every attempt returned CUDA_ERROR_INVALID_VALUE.
Coverage: this held for all three API paths (cuGraphAddMemAllocNode, cuGraphAddNode(MEM_ALLOC) and stream-captured cuMemAllocFromPoolAsync), and with and without a device access descriptor.
Controls. On Linux, device-located graph allocations succeeded alongside, and host pools work for ordinary allocations outside graphs. That includes GH200 and GB300, whose host memory is coherent with the GPU.
Newer drivers, measured elsewhere:
615.71 (CUDA 13.4): the same result locally.
620.70.10 (CUDA 13.5):ci: install the newest published driver on DRIVER: 'latest' test rows #3691's CI run installed it on every Linux row. cuda.core's existing test_alloc_memory_type_host skipped with "Driver does not support graph alloc memory_type='host'" in all 37 jobs. That skip only happens on NOT_SUPPORTED, so this matches @rluo8's report.
One caveat. On the Windows and WSL rows, the probe also got NOT_SUPPORTED for device-located graph allocations, so those rows don't isolate the host location. cuda.core's own suite does: on Windows, test_alloc_free_chain and test_alloc_device_option pass with device memory while the host test is rejected. I haven't tracked down why the probe differs from cuda.core on Windows.
Documentation agrees. The 12.9–13.6 headers and the Programming Guide only describe a device location ("resident device") for graph memory nodes.
What changed in this PR as a result. I've reduced it to an unconditional test that host-located graph allocations raise CUDA_ERROR_NOT_SUPPORTED on CUDA 13.0 and newer. The driver-version threshold is gone, and so is the round-trip test that never ran anywhere.
mdboom
changed the title
test(cuda.core): cover the driver's NOT_SUPPORTED for host graph allocations; gate the round trip on driver version
test(cuda.core): assert host-located graph allocations are unsupported
Dec 3, 2026
Reviewing files that changed from the base of the PR and between d1441a7 and 571ab8a.
Files selected for processing: 1
cuda_core/tests/graph/test_graph_definition.py
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
important: The test now permanently asserts that the driver rejects HOST graph allocation. A driver that starts accepting it will fail the suite.
Take a driver on CUDA 13.0 or later with mempool support that accepts HOST graph allocation. g.allocate(...) succeeds, pytest.raises fails, and the test gives no skip or round-trip coverage. The docstring tells maintainers to replace the test in that case. That makes a driver upgrade break CI. It also removes the earlier memory_type and dptr round-trip coverage.
The PR objectives record this as intended, backed by reported probes on CUDA 13.0 through 13.5. The linked issue #3588 asks for the feature requirement to be encoded in a skip condition. The test does not do that. The failure is a deliberate signal, but it blocks unrelated work. Check whether a failure on a newer driver should block CI. If it should not, accept a successful allocation and run the round trip on that path. Keep the NOT_SUPPORTED assertion for drivers that reject it.
Based on learnings, do not replace test coverage by deleting it. Keep the round-trip assertions available for drivers that accept HOST allocation.
Source: Learnings
This branch has not been deployed
No deployments
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
cuda.coreEverything related to the cuda.core moduletestImprovements or additions to tests
4 participants
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.
Closes #3588. Part of #2077.
Summary
test_alloc_memory_type_hostskipped on every runner with "Driver does not support graph alloc memory_type='host'". That reflects how drivers actually behave: no driver we can reach supports host-located graph allocations (evidence below), and graph memory nodes are documented only for device-resident memory ("poolProps.location... specifies the resident device").So this replaces the round trip that never ran in any configuration with a test that covers the rejection:
If a future driver starts accepting host locations, the new test fails. Its docstring says to replace it with a round-trip test at that point.
Whether cuda.core should keep offering
GraphMemoryType.HOSTfor graph allocations is an API question, and is out of scope here.Evidence
Driver behavior: the probe in #3690 tried every API path, location and allocation type on each CI configuration. Its results, and the 13.4/13.5 measurements, are summarized in #3662 (comment). No driver or platform accepted a host-located graph allocation:
NOT_SUPPORTEDNOT_SUPPORTEDNOT_SUPPORTEDNOT_SUPPORTEDLocally (driver 615.71.09):
test_alloc_memory_type_host_not_supportedPASSED.Confirming in CI: on
main,test_alloc_memory_type_hostskips in every configuration. With this change,test_alloc_memory_type_host_not_supportedshould pass in every cuda.core job whose device supports memory pools and whose driver is CUDA 13.0 or newer. To check one job:Merge Danger
Door: two-way. Test-only change.
Blast Radius: one test in
cuda_core/tests/graph/test_graph_definition.py. It fails if a driver starts accepting host-located graph allocations; that is intended, as a prompt to restore a round-trip test.Reviewers: please feel free to push commits directly to this PR to improve it.
🤖 Generated with Claude Code