pytorch / TensorRT

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

❓ [Question] How to solve aten::floor converter not found? #240

Closed nmonhollen closed 3 years ago

nmonhollen commented 4 years ago

❓ Question

How to solve aten::floor converter not found?

What you have already tried

I am trying to convert a jit trace of a Fast SCNN network into TensorRT. I've confirmed that the trace was created in python3.6 using PyTorch 1.6.0. When printing the trace graph I do not even see the aten::floor operator. I also cannot locate a torch.floor operator in the original PyTorch model structure so I'm not sure what is even calling this operator? Here is the resulting error:

RuntimeError: [enforce fail at core/conversion/conversion.cpp:112] Expected converter to be true but got false
Unable to convert node: %376 : Tensor = aten::floor(%324) # /home/nmonhollen/tensorrt/venv/lib/python3.6/site-packages/torch/nn/functional.py:3010:0 (conversion.AddLayer)
Schema: aten::floor.int(int a) -> (int)
Converter for aten::floor requested, but no such converter was found.
If you need a converter for this operator, you can try implementing one yourself
or request a converter: https://www.github.com/NVIDIA/TRTorch/issues

Environment

Build information about the TRTorch compiler can be found by turning on debug messages

narendasan commented 3 years ago

I think this might be a numerical operation that gets injected by one of the lowering passes. We need to support via an evaluator. We already support float to int floor but not int to int floor, I think it should be pretty straight forward to do so.

github-actions[bot] commented 3 years ago

This issue has not seen activity for 30 days, Remove stale label or comment or this will be closed in 5 days

github-actions[bot] commented 3 years ago

This issue has not seen activity for 90 days, Remove stale label or comment or this will be closed in 10 days

nmonhollen commented 3 years ago

bump