pytorch / TensorRT

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

🐛 [Bug] Half precision index tensor detected when converting `mistralai/Mistral-7B-v0.3` #2958

Open gs-olive opened 3 months ago

gs-olive commented 3 months ago

Bug Description

mistralai/Mistral-7B-v0.3 is not fully supported because the index inputs to torch.ops.aten.index.Tensor are half-precision according to the fake tensor metadata.  

To Reproduce

torch.compile and run inference on the mistralai/Mistral-7B-v0.3 model

Expected behavior

The graph consists of 2895 Total Operators, of which 2831 operators are supported, 97.79% coverage

The following ops are currently unsupported or excluded from conversion, and are listed with their op-count in the graph:
 torch.ops.aten.index.Tensor: 64

Environment

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