Description
Bug Description
When encountering a Conv1D operator in Dynamo, PyTorch can switch integer components, like dilation, into tuples. This is problematic for the Conv1D operator, since the extend_attr_to_tuple
used here, will not work:
TensorRT/py/torch_tensorrt/fx/converters/impl/convolution.py
Lines 111 to 115 in b3089bf
Specifically, the function extend_attr_to_tuple
, shown below, needs to be modified to do the following. It should be able to handle length-1 lists or tuples and extend those to the necessary length specified by the user.
TensorRT/py/torch_tensorrt/fx/converters/converter_utils.py
Lines 128 to 146 in b3089bf
To Reproduce
Compile a model with a Conv1D operator using one of the Dynamo paths.
Expected behavior
Models with Conv1D operators should trace and compile successfully with AOT/Dynamo.
Environment
- Torch-TensorRT Version (e.g. 1.0.0): 8c62fca
- PyTorch Version (e.g. 1.0):
2.1.0.dev20230803+cu121