torch-mlir/projects
Srinath Avadhanula 0a788e0467
Decompose aten.fmod into aten.mul,sub,div etc. (#3689)
As titled, create a new decomposition for `aten.fmod.Tensor` to
`aten.div`, `aten.trunc`, `aten.mul` and `aten.sub`. Note that we only
use `aten.trunc` for floating point operations. This further gets
decomposed to `aten.where` etc. by other existing decompositions.

This decomposition now makes TOSA pass for a simple model with
`aten.fmod` while it makes `stablehlo` fail. For now, we disallow this
decomposition for `stablehlo`

---------

Co-authored-by: Srinath Avadhanula <srinath.avadhanula@getcruise.com>
2024-09-09 09:00:11 -07:00
..
jit_ir_common Additional information in error message (#2783) 2024-01-30 08:28:08 -08:00
ltc [NFC reformat] Run pre-commit on all files and format misc. 2024-04-27 14:08:09 -07:00
onnx_c_importer build: find Protobuf using config mode search (#2900) 2024-02-12 17:31:41 -06:00
pt1 Decompose aten.fmod into aten.mul,sub,div etc. (#3689) 2024-09-09 09:00:11 -07:00
CMakeLists.txt [NFC reformat] Run pre-commit on all files and format misc. 2024-04-27 14:08:09 -07:00