Skip to content

🐛 [Bug] [Alpamayo 1.5] [B300] reshaping failed for tensor: [SHUFFLE]-[aten_ops.permute.default]-[language_model.layers.0.self_attn/permute_14]_output Reshape dimension of -1 has no solution. #4231

@zewenli98

Description

@zewenli98

Bug Description

Clone the repo: https://github.com/cehongwang/alpamayo1.5
Running command on B300:

PYTHONPATH=src python src/alpamayo1_5/eval.py --compile_trt

Error message in evaluation:

Evaluating clips:   0%|          | 1/644 [00:09<1:37:16,  9.08s/it]2026-05-01 05:03:24,531 - torch_tensorrt [TensorRT Conversion Context] - ERROR - IExecutionContext::enqueueV3: Error Code 7: Internal Error (IShuffleLayer [SHUFFLE]-[aten_ops._reshape_copy.default]-[language_model.layers.0.self_attn/_reshape_copy_25]: reshaping failed for tensor: [SHUFFLE]-[aten_ops.permute.default]-[language_model.layers.0.self_attn/permute_14]_output Reshape dimension of -1 has no solution. In executeReshape at /_src/runtime/core/shapeMachine.cpp:339 Instruction: RESHAPEinput dims{6 1 32 128} reshape dims{6 3007 -1}. In executeContinuation at /_src/runtime/core/shapeMachine.cpp:1101)
Evaluating clips:   0%|          | 2/644 [00:16<1:27:31,  8.18s/it]2026-05-01 05:03:33,122 - torch_tensorrt [TensorRT Conversion Context] - ERROR - IExecutionContext::enqueueV3: Error Code 7: Internal Error (IShuffleLayer [SHUFFLE]-[aten_ops._reshape_copy.default]-[language_model.layers.0.self_attn/_reshape_copy_25]: reshaping failed for tensor: [SHUFFLE]-[aten_ops.permute.default]-[language_model.layers.0.self_attn/permute_14]_output Reshape dimension of -1 has no solution. In executeReshape at /_src/runtime/core/shapeMachine.cpp:339 Instruction: RESHAPEinput dims{6 1 32 128} reshape dims{6 3007 -1}. In executeContinuation at /_src/runtime/core/shapeMachine.cpp:1101)
Evaluating clips:   0%|          | 3/644 [00:25<1:29:31,  8.38s/it]2026-05-01 05:03:41,684 - torch_tensorrt [TensorRT Conversion Context] - ERROR - IExecutionContext::enqueueV3: Error Code 7: Internal Error (IShuffleLayer [SHUFFLE]-[aten_ops._reshape_copy.default]-[language_model.layers.0.self_attn/_reshape_copy_25]: reshaping failed for tensor: [SHUFFLE]-[aten_ops.permute.default]-[language_model.layers.0.self_attn/permute_14]_output Reshape dimension of -1 has no solution. In executeReshape at /_src/runtime/core/shapeMachine.cpp:339 Instruction: RESHAPEinput dims{6 1 32 128} reshape dims{6 3007 -1}. In executeContinuation at /_src/runtime/core/shapeMachine.cpp:1101)
Evaluating clips:   1%|          | 4/644 [00:33<1:30:05,  8.45s/it]2026-05-01 05:03:49,113 - torch_tensorrt [TensorRT Conversion Context] - ERROR - IExecutionContext::enqueueV3: Error Code 7: Internal Error (IShuffleLayer [SHUFFLE]-[aten_ops._reshape_copy.default]-[language_model.layers.0.self_attn/_reshape_copy_25]: reshaping failed for tensor: [SHUFFLE]-[aten_ops.permute.default]-[language_model.layers.0.self_attn/permute_14]_output Reshape dimension of -1 has no solution. In executeReshape at /_src/runtime/core/shapeMachine.cpp:339 Instruction: RESHAPEinput dims{6 1 32 128} reshape dims{6 3007 -1}. In executeContinuation at /_src/runtime/core/shapeMachine.cpp:1101)
...

Environment

GPU: B300

tensorrt 10.15.1.29
tensorrt_cu13 10.15.1.29
tensorrt_cu13_bindings 10.15.1.29
tensorrt_cu13_libs 10.15.1.29
torch 2.11.0
torch_tensorrt 2.11.0
torchvision 0.26.0
transformers 4.57.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions