[bug][AutoDeploy]: Sharding path fails with IndexError: list index out of range
System Info
- CPU architecture: x86_64
- GPU properties: not captured from CI artifact
- Libraries
- TensorRT-LLM branch or tag: main (pipeline context)
- Container used: AutoDeploy CI container
- OS: CI environment
Who can help?
No response
Information
- [ ] The official example scripts
- [ ] My own modified scripts
Tasks
- [ ] An officially supported task in the
examplesfolder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below)
Reproduction
Affected registry entries currently disabled in examples/auto_deploy/model_registry/models.yaml:
CohereLabs/c4ai-command-a-03-2025CohereLabs/command-a-reasoning-08-2025CohereLabs/command-a-translate-08-2025Qwen/Qwen2-VL-72B-Instruct-GPTQ-Int4HuggingFaceTB/SmolLM2-1.7B-Instructgoogle/codegemma-7b-itgoogle/gemma-1.1-7b-it
I fetched the per-test stdout logs for all seven models from terminal pipeline 52785950. All seven fail in the AutoDeploy sharding path with the same upper traceback through:
tensorrt_llm/_torch/auto_deploy/transform/library/sharding.py:1272tensorrt_llm/_torch/auto_deploy/transform/library/sharding.py:3204
Six models then bottom out with:
IndexError: list index out of range
in tensorrt_llm/_torch/auto_deploy/utils/node_utils.py:1436 while computing weight shape inside get_all_layer_subgraphs.
The remaining model (Qwen/Qwen2-VL-72B-Instruct-GPTQ-Int4) still fails in the same sharding path but hits a slightly different index access in node_utils.py:1032, also with:
IndexError: list index out of range
This looks like one shared sharding-family issue rather than seven unrelated model-specific failures.
Expected behavior
The AutoDeploy sharding analysis should handle these models without hitting IndexError while discovering layer subgraphs or weight shapes.
actual behavior
The AutoDeploy sharding path fails with IndexError: list index out of range across multiple models before successful execution.
additional notes
NA
Before submitting a new issue...
- [x] Make sure you already searched for relevant issues, and checked the documentation and examples for answers to frequently asked questions.
"Hi tcherckez-nvidia, I would like to investigate this issue and try to fix it. Could you please assign it to me?"
Hi, I reproduced a reduced current-source form of the shared IndexError reported here and would like to contribute if the issue is still available.
On current main (573bd5f0b8414566bd6183f74b06f8c8a99e6a69), is_any_lin_op accepts an aten.linear whose weight is a dynamic FX placeholder. extract_weight_nodes then correctly returns zero extractable weights, but get_weight_shape unconditionally evaluates weights[0] and raises IndexError: list index out of range.
The CPU-only fixture uses the exact current node_utils.py and passed identically in three repetitions:
get_attr weight control: linear=true, extracted weights=1, shape=[4, 3]
dynamic weight case: linear=true, extracted weights=0, IndexError
This narrows one failure mode behind the issue to an analysis invariant rather than a CUDA kernel failure. I see that @Priyanshu31102003 previously asked to be assigned, but there is no assignment or active PR visible. I do not want to overlap their work. Could a maintainer confirm ownership and approve a narrow fix before implementation?
If available, I propose:
- make the sharding analysis explicitly distinguish extractable static weights from dynamic/unsupported linear weights;
- avoid indexing empty extraction results and preserve graph/node context in the diagnostic;
- add CPU FX regression tests covering static
get_attr, dynamic placeholder, and no-linear subgraphs; - leave sharding semantics and CUDA/runtime paths unchanged unless the full failing-model trace shows a broader contract is required.