🐛 [Bug] aten.expand
fails when rank disagrees with tensor shape
#2183
Labels
aten.expand
fails when rank disagrees with tensor shape
#2183
Bug Description
When the rank and tensor shape disagree, the
torch.aten.ops.expand
operator fails due to this portion of the code:TensorRT/py/torch_tensorrt/fx/converters/acc_ops_converters.py
Lines 2457 to 2475 in 8c62fca
This is not in agreement with Torch behavior, where calling
.expand
on a Tensor does not require that the expanded size have the same rank as the original Tensor. See documentation here.This is the error message in the converter:
To Reproduce
See above code snippet for desired behavior from converter.
Expected behavior
Converter should succeed in this case.
Environment
2.1.0.dev20230803+cu121
The text was updated successfully, but these errors were encountered: