Skip to content

fix(cuda.core): surface CUresult when graph instantiation fails - #2719

Open
lijinf2 wants to merge 2 commits into
NVIDIA:mainfrom
lijinf2:fix_2527
Open

fix(cuda.core): surface CUresult when graph instantiation fails#2719
lijinf2 wants to merge 2 commits into
NVIDIA:mainfrom
lijinf2:fix_2527

Conversation

@lijinf2

@lijinf2 lijinf2 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Description

closes #2527

The Orin nightly failure is test_graph_alloc_with_output: it allocates graph memory, leaves it unfreed so the buffer can be used outside the graph, and instantiates with GraphCompleteOptions(auto_free_on_launch=True). That combination is rejected on L4T Orin (CUDA_ERROR_INVALID_VALUE). Other auto_free_on_launch cases on the same board still pass (empty graphs, alloc+free in the same graph). The test already skips on CUDAError whose message contains CUDA_ERROR_INVALID_VALUE.

After #2473, _instantiate_graph mapped CUDA_GRAPH_INSTANTIATE_ERROR to a generic RuntimeError and dropped the driver CUresult. The skip no longer matched, so the same platform limitation became a FAIL.

This PR calls HANDLE_RETURN on the instantiate status first. A non-success CUresult is raised as CUDAError with the driver name and message (e.g. CUDA_ERROR_INVALID_VALUE). The generic RuntimeError remains only when that status is CUDA_SUCCESS. Orin goes back to skip; the driver error is no longer swallowed.

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

…e to Tegra gpu not supporting a cuda graph feature
…or so that the message is not swallowed by RuntimeError
@copy-pr-bot

copy-pr-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the cuda.core Everything related to the cuda.core module label Aug 27, 2026
@lijinf2 lijinf2 self-assigned this Aug 27, 2026
@lijinf2 lijinf2 added the bug Something isn't working label Aug 27, 2026
@lijinf2 lijinf2 added this to the cuda.core 1.2.0 milestone Aug 27, 2026
@lijinf2

lijinf2 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 6aa629f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cuda.core Everything related to the cuda.core module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

L4T Orin test_graph_memory_resource.py::test_graph_alloc_with_output test failures

1 participant