🐛 [Bug] Remove prepare_inputs and passing inputs during compilation.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3k
- Forks
- 410
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 78
Description
Bug Description
Currently, we pass trt_arg_inputs and trt_kwarg_inputs to compile_module https://github.com/pytorch/TensorRT/blob/main/py/torch_tensorrt/dynamo/_compiler.py#L682. These are actually not being used. The prepare inputs call also fails sometimes during graph parsing for dry run. Since we read all the input info from graph metadata now, we can consider removing user inputs being passed around internally.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Environment
Build information about Torch-TensorRT can be found by turning on debug messages
- Torch-TensorRT Version (e.g. 1.0.0):
- PyTorch Version (e.g. 1.0):
- CPU Architecture:
- OS (e.g., Linux):
- How you installed PyTorch (
conda,pip,libtorch, source): - Build command you used (if compiling from source):
- Are you using local sources or building from archives:
- Python version:
- CUDA version:
- GPU models and configuration:
- Any other relevant information:
Additional context
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 in py/torch_tensorrt/dynamo/_compiler.py around line 682 and trace how prepare_inputs, trt_arg_inputs, and trt_kwarg_inputs reach compile_module. Confirm that graph metadata supplies the input information, then remove the unused input passing and prepare_inputs path while preserving dry-run graph parsing. Done means compilation no longer depends on those user inputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100