fix(cuda.core): surface CUresult when graph instantiation fails - #2719
Open
lijinf2 wants to merge 2 commits into
Open
fix(cuda.core): surface CUresult when graph instantiation fails#2719lijinf2 wants to merge 2 commits into
lijinf2 wants to merge 2 commits into
Conversation
…e to Tegra gpu not supporting a cuda graph feature
…or so that the message is not swallowed by RuntimeError
Contributor
Contributor
Author
|
/ok to test 6aa629f |
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.
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 withGraphCompleteOptions(auto_free_on_launch=True). That combination is rejected on L4T Orin (CUDA_ERROR_INVALID_VALUE). Otherauto_free_on_launchcases on the same board still pass (empty graphs, alloc+free in the same graph). The test already skips onCUDAErrorwhose message containsCUDA_ERROR_INVALID_VALUE.After #2473,
_instantiate_graphmappedCUDA_GRAPH_INSTANTIATE_ERRORto a genericRuntimeErrorand dropped the driverCUresult. The skip no longer matched, so the same platform limitation became a FAIL.This PR calls
HANDLE_RETURNon the instantiate status first. A non-successCUresultis raised asCUDAErrorwith the driver name and message (e.g.CUDA_ERROR_INVALID_VALUE). The genericRuntimeErrorremains only when that status isCUDA_SUCCESS. Orin goes back to skip; the driver error is no longer swallowed.Checklist