-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 [Bug] aten.convolution
fails when 1D stride is tuple
#2185
Comments
aten.convolution
fails when 1D dilation is tupleaten.convolution
fails when 1D stride is tuple
Sorry I don't get it. Could you give an example for this? |
@zewenli98 - sure, for instance in the conv1d case, we can get inputs like if isinstance(val, (tuple, list)) and len(val) == 1:
val = val[0] |
fix a squeeze bug minor fix and issue pytorch#2185
fix a squeeze bug minor fix and issue pytorch#2185 add conv validator
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
2.1.0.dev20230803+cu121
The text was updated successfully, but these errors were encountered: