torch-mlir/lib/Conversion
jinchen fd759e4b1f
Fix onnx.Gather lowering with dynamic shapes (#3675)
Supports the result with dynamic shape and scalar indices like
```
func.func @test_gather_scalar(%arg0: !torch.vtensor<[3,4,5],f32>, %arg1: !torch.vtensor<[], si64>) -> !torch.vtensor<[?,?],f32> attributes {torch.onnx_meta.opset_version = 13 : si64} {
  %0 = torch.operator "onnx.Gather"(%arg0, %arg1) {torch.onnx.axis = 0 : si64} : (!torch.vtensor<[3,4,5],f32>, !torch.vtensor<[], si64>) -> !torch.vtensor<[?,?],f32>
  return %0 : !torch.vtensor<[?,?],f32>
}
```

`Torch::AtenSqueezeOp` is referring to the result shape, so it will
failed on lowering if the result shape is dynamic.
2024-08-29 17:02:16 -07:00
..
TorchConversionToMLProgram [NFC] Remove unused header files (#3386) 2024-05-30 14:30:36 +08:00
TorchOnnxToTorch Fix onnx.Gather lowering with dynamic shapes (#3675) 2024-08-29 17:02:16 -07:00
TorchToArith [TorchToArith] Add a lowering for `torch.add.float_int` (#3594) 2024-08-07 11:55:27 -05:00
TorchToLinalg [TorchToLinalg] Support lowering MaxPool3dWithIndices (#3652) 2024-08-27 14:14:25 -05:00
TorchToSCF [NFC] Change to *cast instead of .*cast variants (#3405) 2024-05-30 23:45:13 -07:00
TorchToStablehlo [Stablehlo] use stablehlo specs lowering AtenSliceScatterOp (#3592) 2024-08-15 20:06:29 +08:00
TorchToTMTensor build: manually update PyTorch version (#3627) 2024-08-19 12:03:56 +05:30
TorchToTensor [NFC] Remove unused header files (#3386) 2024-05-30 14:30:36 +08:00
TorchToTosa [TOSA] Fix Tensor.hacked_twin to support diff size indexes (#3547) 2024-07-30 14:32:05 -07:00
Utils Added support for integer to complex conversion (#3604) 2024-08-14 18:13:00 +05:30
CMakeLists.txt [torch] Improve shape inference for `torch-to-linalg` path for reshapes (#3055) 2024-03-26 12:41:40 -07:00
PassDetail.h Minor fixes for `ConvertTorchConversionToMLProgram`. (#1991) 2023-04-04 09:09:58 -07:00
Passes.cpp Clang format refresh (#2812) 2024-01-29 12:59:33 -05:00