torch-mlir/lib/Conversion/TorchToStablehlo
Yuanqiang Liu f1e3701caf
[Stablehlo] fix compareOp with scalar's lowering (#3518)
* use lhs tensor's element type as compute type when rhs is scalar.
* previously `a != 1.0`(a is a fp32 tensor) will lowering to `%6 =
stablehlo.compare EQ, %4, %5, FLOAT : (tensor<2x5xf64>, tensor<2x5xf64>)
-> tensor<2x5xi1>`
* now it will lowering to `%6 = stablehlo.compare EQ, %4, %5, FLOAT :
(tensor<2x5xf32>, tensor<2x5xf32>) -> tensor<2x5xi1>`
2024-07-02 15:31:06 +08:00
..
Basic.cpp [Stablehlo] fix compareOp with scalar's lowering (#3518) 2024-07-02 15:31:06 +08:00
CMakeLists.txt [Stablehlo] lowering aten.randn & aten.normal_functional to mhlo.rng … (#3328) 2024-05-11 15:33:37 +08:00
GatherScatter.cpp [Stablehlo] Add lowering of GridSampler Op (#3084) 2024-06-07 16:06:07 +08:00
Linear.cpp [stablehlo] add aten::_int_mm lowering (#3474) 2024-06-20 16:10:31 +08:00
Pooling.cpp [NFC] Change to *cast instead of .*cast variants (#3405) 2024-05-30 23:45:13 -07:00
PopulatePatterns.h [Stablehlo] lowering aten.randn & aten.normal_functional to mhlo.rng … (#3328) 2024-05-11 15:33:37 +08:00
Reduction.cpp [Torch] support decomposition of aten.aminmax (#3513) 2024-06-29 21:44:05 +08:00
Rng.cpp [NFC] Remove unused header files (#3386) 2024-05-30 14:30:36 +08:00
StablehloLegalizeUtils.cpp [NFC] Remove unused header files (#3386) 2024-05-30 14:30:36 +08:00
TorchToStablehlo.cpp [Stablehlo] support uint8 (#3367) 2024-06-04 09:04:59 +08:00
Utils.cpp [Stablehlo] add torch_to_stablehlo::getBackendTypeForScalarType (#2975) 2024-03-04 23:31:54 +08:00
Utils.h [Stablehlo] add torch_to_stablehlo::getBackendTypeForScalarType (#2975) 2024-03-04 23:31:54 +08:00
ViewLike.cpp [NFC] Change to *cast instead of .*cast variants (#3405) 2024-05-30 23:45:13 -07:00