torch-mlir/lib/Dialect/Torch/Transforms
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
..
AbstractInterpLibrary.cpp [LINALG] Implement lowering of torch.aten.rot90 (#3551) 2024-09-06 10:36:17 +05:30
AdjustCallingConventions.cpp Update to llvm/llvm-proect@27ac46e6be (2024-6-12) (#3454) 2024-06-12 19:34:01 -07:00
CMakeLists.txt Add RestructureNonConstantAxes pass to address reduce op tests failing on non constant axes (#3600) 2024-08-26 14:06:06 -07:00
DecomposeComplexOps.cpp Decompose aten.fmod into aten.mul,sub,div etc. (#3689) 2024-09-09 09:00:11 -07:00
DropAbstractInterpCalculations.cpp Update to LLVM 029313cc979ae71877b65794b1063d4e51184cc8 2023-03-21 04:16:20 -07:00
EraseModuleInitializer.cpp [NFC] Remove unused header files (#3386) 2024-05-30 14:30:36 +08:00
FuseQuantizedOps.cpp [torch] Basic support for per-channel quantized graphs (#3623) 2024-08-10 15:51:09 +02:00
GlobalizeObjectGraph.cpp [NFC] Remove unused header files (#3386) 2024-05-30 14:30:36 +08:00
InlineGlobalSlots.cpp [NFC] Change to *cast instead of .*cast variants (#3405) 2024-05-30 23:45:13 -07:00
LowerToBackendContract.cpp [LINALG] Implement lowering of torch.aten.rot90 (#3551) 2024-09-06 10:36:17 +05:30
MatchQuantizedOps.cpp [torch] Basic support for per-channel quantized graphs (#3623) 2024-08-10 15:51:09 +02:00
MaximizeValueSemantics.cpp [NFC] Change to *cast instead of .*cast variants (#3405) 2024-05-30 23:45:13 -07:00
PassDetail.h llvm: bump tag to e1318078 (#781) 2022-04-26 12:27:51 -07:00
Passes.cpp [Pipeline] Use dedicated simplification pipeline for TorchDynamo frontend (#3376) 2024-05-22 05:23:18 -07:00
PrepareForGlobalizeObjectGraph.cpp [NFC] Remove unused header files (#3386) 2024-05-30 14:30:36 +08:00
RecomposeComplexOps.cpp [Torch] Add support for Meshgrid (#3462) 2024-06-14 23:59:08 +08:00
ReduceOpVariants.cpp build: manually update PyTorch version (#3627) 2024-08-19 12:03:56 +05:30
RefinePublicReturn.cpp [NFC] Remove unused header files (#3386) 2024-05-30 14:30:36 +08:00
ReifyAbstractInterpCalculationsUtils.cpp [NFC] Change to *cast instead of .*cast variants (#3405) 2024-05-30 23:45:13 -07:00
ReifyAbstractInterpCalculationsUtils.h handles 2,3,4 from https://github.com/llvm/torch-mlir/issues/1963 (#1964) 2023-03-24 21:50:01 -05:00
ReifyDtypeCalculations.cpp Fix deprecated uses of cast/dyn_cast/dyn_cast_or_null/isa (#3243) 2024-04-27 14:00:56 -07:00
ReifyShapeCalculations.cpp Fix deprecated uses of cast/dyn_cast/dyn_cast_or_null/isa (#3243) 2024-04-27 14:00:56 -07:00
RestructureNonConstantAxes.cpp Add RestructureNonConstantAxes pass to address reduce op tests failing on non constant axes (#3600) 2024-08-26 14:06:06 -07:00
ScalarizeShapes.cpp [NFC] Remove unused header files (#3386) 2024-05-30 14:30:36 +08:00
SimplifyAbstractInterpCalculationsUtils.cpp Fix deprecated uses of cast/dyn_cast/dyn_cast_or_null/isa (#3243) 2024-04-27 14:00:56 -07:00
SimplifyAbstractInterpCalculationsUtils.h Replace RefineTypes with dtype functions (#2105) 2023-05-12 13:40:45 -07:00
SimplifyDtypeCalculations.cpp [NFC] Change to *cast instead of .*cast variants (#3405) 2024-05-30 23:45:13 -07:00
SimplifyShapeCalculations.cpp [NFC] Change to *cast instead of .*cast variants (#3405) 2024-05-30 23:45:13 -07:00