Closed
Description
Context
Currently, elementwise operators are not automatically type-promoted in FX in the same way they are in TS. This leads to bugs such as #1995, where the types are mismatched and TensorRT throws an error.
Feature Proposal
Using the TS type-promotion code as a starting point:
TensorRT/core/conversion/converters/converter_util.cpp
Lines 72 to 78 in 82631fa
Implement a similar type-promotion scheme pointing to the
converter_reorg_elementwise
branch, here:TensorRT/py/torch_tensorrt/fx/converters/impl/elementwise/base.py
Lines 40 to 48 in 546f975