torch-mlir/test/Conversion
zjgarvey d2c387dd04
[ONNX] Fix issue with absent value in onnx.ConstantOfShape (#3713)
Previously, if the value was absent, this conversion was creating a
dense resource of value 0 with shape equal to the result shape, then
later re-extracting a splat value. This only works if the shape is
statically known, and even when the shape is known, this is completely
unnecessary since the value's shape should be `[1]` and not the result
shape.

This patch simply sets the `splatvalue` to a `torch.constant.float 0.0`
when the onnx op's `value` attr is absent, and adds `nullptr` checks to
the subsequent conditionals to avoid them in the case where an `attr` is
not given.

Addresses <https://github.com/nod-ai/SHARK-Turbine/issues/831>.
2024-09-17 16:01:01 -05:00
..
TorchConversionToMLProgram Bump LLVM and StableHLO (#2598) 2023-11-28 22:12:24 -08:00
TorchOnnxToTorch [ONNX] Fix issue with absent value in onnx.ConstantOfShape (#3713) 2024-09-17 16:01:01 -05:00
TorchToArith [torch-mlir] bump stablehlo/llvm version (#3471) 2024-06-18 16:59:53 -07:00
TorchToLinalg [TorchToLinalg] Use `linalg.transpose` instead of `generic` when lowering `aten.T` (#3660) 2024-09-07 08:09:10 +02:00
TorchToSCF Bump llvm to f9031f00f2c9 (#3672) 2024-08-28 11:29:10 -07:00
TorchToStablehlo Bump llvm/llvm-project@b6603e1bf1 (#3697) 2024-09-10 08:57:15 -07:00
TorchToTensor [onnx] Lowering for `onnx.shape` to `torch` and `tensor` (#2648) 2023-12-15 11:37:49 -08:00
TorchToTosa [TOSA] Extend Torch to TOSA reduction ops legalization (#3710) 2024-09-16 12:40:24 -07:00