AutoDeploy graph capture seems to fail when invoked with large batch sizes.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.7k
- Forks
- 2.8k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 489
Description
I've hit a failure mode in cudagraph for cases where the batch size is large. Specifically, I am running trtllm-bench with num_requests set to a high value (3000) and I hit the following error (ran with CUDA_LAUNCH_BLOCKING=1). I tested this on feat/ad_coverage_week2 branch:
File "/workspace/TensorRT-LLM/tensorrt_llm/_torch/auto_deploy/compile/backends/torch_cudagraph.py", line 166, in forward
self.graphs[combined_shape].replay()
File "/usr/local/lib/python3.12/dist-packages/torch/cuda/graphs.py", line 88, in replay
super().replay()
RuntimeError: CUDA error: an illegal memory access was encountered
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with tensorrt_llm/_torch/auto_deploy/compile/backends/torch_cudagraph.py at line 166, where self.graphs[combined_shape].replay() fails. Reproduce the issue with trtllm-bench, num_requests=3000, and CUDA_LAUNCH_BLOCKING=1, then trace the large-batch graph capture and replay path. Done means the illegal memory access no longer occurs for the reported workload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- backend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100