Closed
Description
Bug Description
When compiling the transformer-xl
model linked here, the following error is encountered:
[10/13/2023-14:31:41] [TRT] [W] CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage and speed up TensorRT initialization. See "Lazy Loading" section of CUDA documentation https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#lazy-loading
[10/13/2023-14:31:41] [TRT] [E] 4: [shapeContext.cpp::operator()::3602] Error Code 4: Shape Error (reshape changes volume. Reshaping [1696,1,1024] to [48,1,16,64].)
2023-10-13 14:31:41 INFO Navigator: backend='torch_tensorrt' raised:
ValueError: __len__() should return >= 0
While executing %add : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%view_4, %_param_constant2)
To Reproduce
See the tutorial at the bottom of this page. Simply call torch.compile
on the model with backend="tensorrt"
and options={"truncate_long_and_double": True}
.
Expected behavior
Shape errors should not be encountered in the converters
Environment
- Torch-TensorRT Version: 4e5b0f6
Activity