pytorch / TensorRT

PyTorch/TorchScript/FX compiler for NVIDIA GPUs using TensorRT
https://pytorch.org/TensorRT
BSD 3-Clause "New" or "Revised" License
2.41k stars 333 forks source link

🐛 [Bug] Tensor located on cpu in run_decompositions error #2938

Open peri044 opened 2 weeks ago

peri044 commented 2 weeks ago

Bug Description

https://github.com/pytorch/TensorRT/pull/2859 PR uses torch.empty which initializes the tensor on CPU and hence we get device location errors. We can initialize to our default device which might fix this.

To Reproduce

Steps to reproduce the behavior:

1. 2. 3.

Expected behavior

Environment

Build information about Torch-TensorRT can be found by turning on debug messages

Additional context