Fix TensorRT CUDA graph shared-lib test flake by reusing RunOptions - #29703
Merged
Scott McKay (skottmckay) merged 2 commits intoJul 14, 2026
Merged
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Copilot
AI
changed the title
Fix TensorRT Linux CI failure in CApiTest.basic_cuda_graph
Fix TensorRT CUDA graph shared-lib test flake by reusing RunOptions
Jul 14, 2026
Copilot created this pull request from a session on behalf of
Scott McKay (skottmckay)
July 14, 2026 07:40
View session
Contributor
|
Copilot This doesn't make sense as the RunOptions are const inputs to Run. How is using a shared instance changing the test behaviour? Is there a different reason the data is out of sync like maybe a cudaMemcpy failed? |
Contributor
Author
You're right—reusing |
Scott McKay (skottmckay)
marked this pull request as ready for review
July 14, 2026 08:00
Scott McKay (skottmckay)
merged commit Jul 14, 2026
1547782
into
skottmckay/MSRC_125531
1 check passed
Scott McKay (skottmckay)
deleted the
copilot/fix-failing-github-actions-job
branch
July 14, 2026 08:00
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
Test Linux TensorRT x64 Releasefailed inCApiTest.basic_cuda_graphbecause the third replay returned stale output after input update.This change aligns
basic_cuda_graphwith the annotated CUDA graph test path by using one persistentOrt::RunOptionsobject across all runs.Failure addressed
onnxruntime_shared_lib_test/CApiTest.basic_cuda_graphexpected updated replay output ({10, 40, 90, 160, 250, 360}) but observed initial output ({1, 4, 9, 16, 25, 36}).Code change
onnxruntime/test/shared_lib/test_inference.cc, instantiateOrt::RunOptions run_option;once inCApiTest.basic_cuda_graph.Ort::RunOptions()) with the sharedrun_optionin all threesession.Run(...)invocations.Representative snippet
Motivation and Context
The failing TensorRT Linux Actions job was isolated to
basic_cuda_graph, and the behavior diverged from the passing annotated CUDA graph path that already reuses a persistentRunOptions.Unifying this usage removes the mismatch in graph replay setup for this test scenario and addresses the observed stale-output failure.