NVIDIA / NVIDIA/TensorRT-LLM

AutoDeploy graph capture seems to fail when invoked with large batch sizes.

Open
#5,618 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.