✨[Feature] Automatic type promotion for elementwise ops in FX #2031
Labels
component: dynamo
Issues relating to the `torch.compile` or `torch._dynamo.export` paths
feature request
New feature or request
No Activity
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
The text was updated successfully, but these errors were encountered: