-
Notifications
You must be signed in to change notification settings - Fork 681
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
Indexing and shape incoherent with module conversion #270
Comments
Hi, It looks like once we call import torch2trt ; torch2trt.torch2trt(....); One workaround is that when you want to get the tensor in the way of masking, e.g. data[torch.tensor([False, True], device="cuda")], always add one True dimension in the argument ( data[torch.tensor([True, False, True], device="cuda")] )and then get the first element of data (data = data[mask][0]) Another workaround is that we can prepare the data[mask] before torch2trt call. So that at the time you call torch.Tensor.getitem , it has not been overridden by torch2trt yet. |
@salexspb I think this is the bug we are seeing We ran into the same issue. I added debug prints in printout code:
printout
My repro:
I also added |
I have the same issue here. Do you solve this problem? |
This issue should be addressed by #738. |
Minimum Reproducible Example
This throws an error of
Environment
PyTorch version: 1.4.0
CUDA used to build PyTorch: 10.1
OS: Ubuntu 18.04.4 LTS
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
CMake version: version 3.10.2
Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: Could not collect
GPU models and configuration:
GPU 0: GeForce RTX 2080 Ti
GPU 1: Quadro P2000
Nvidia driver version: 430.50
The text was updated successfully, but these errors were encountered: