test: Add CUDA graph tests for non-batching TensorRT models - #8900
Conversation
…-graph-not-working-when
…working-when' of https://github.com/triton-inference-server/server into spolisetty/tri-1607-tritonamazon-search-cuda-graph-not-working-when
Greptile SummaryThis PR adds two new CUDA graph tests for non-batching TensorRT models:
Confidence Score: 5/5Safe to merge — the change is additive test infrastructure with no production code impact. Both files add new test coverage for non-batching TRT CUDA graph paths. The logic in the Python test (two inferences exercising graph-hit and graph-miss paths) aligns correctly with the shell log assertions. The only omission is a profile-structure comment explaining why profile 6 is expected, which would aid future maintainers but does not affect correctness. The Important Files Changed
Sequence DiagramsequenceDiagram
participant SH as test.sh
participant SRV as Triton Server
participant PY as trt_cuda_graph_test.py
SH->>SRV: Start with plan_nobatch variable model + graph_spec (shape 16)
SRV-->>SH: Server ready (captured 1 CUDA graph for shape 16)
SH->>PY: Run test_nobatch_dynamic_shape
PY->>SRV: "infer_exact(shape=(16,), batch_size=0)"
SRV-->>PY: Response (CUDA graph launched — profile 6)
PY->>SRV: "infer_exact(shape=(20,), batch_size=0)"
SRV-->>PY: Response (regular execution — profile 6)
PY-->>SH: Test pass
SH->>SRV: grep log: 1x launching CUDA graph (profile 6)
SH->>SRV: grep log: 1x being executed for (profile 6)
SH->>SRV: grep log: 1x captured CUDA graph for
SH->>SRV: Kill server
Reviews (2): Last reviewed commit: "Update" | Re-trigger Greptile |
What does the PR do?
Add CUDA graph coverage for non-batching TensorRT models (max_batch_size: 0). The tests verify that:
Checklist
<commit_type>: <Title>Commit Type:
Check the conventional commit type
box here and add the label to the github PR.
Related PRs:
Where should the reviewer start?
Test plan:
Caveats:
Background
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)