torch-mlir/lib/Conversion/TorchOnnxToTorch
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
..
CMakeLists.txt Support onnx.GRU and onnx.RNN (#3447) 2024-07-10 14:04:17 -04:00
DefaultDomainAtoF.cpp [ONNX] Add training mode support for BatchNormalization op (#3597) 2024-08-14 10:46:38 +05:30
DefaultDomainGtoP.cpp Fix onnx.Gather lowering with dynamic shapes (#3675) 2024-08-29 17:02:16 -07:00
DefaultDomainQtoZ.cpp [onnx] Fix onnx.ThresholdedRelu crash (#3638) 2024-08-16 09:23:38 -07:00
OnnxRecurrentLayerOpExpanders.cpp [onnx] Fix shortcircuit path (#3633) 2024-08-16 09:23:47 -07:00
PassDetail.h Initial TorchOnnxToTorch conversion pipeline. (#2585) 2023-11-21 21:02:55 -08:00
Passes.cpp Initial TorchOnnxToTorch conversion pipeline. (#2585) 2023-11-21 21:02:55 -08:00
Patterns.cpp Initial TorchOnnxToTorch conversion pipeline. (#2585) 2023-11-21 21:02:55 -08:00
TorchOnnxToTorch.cpp Initial TorchOnnxToTorch conversion pipeline. (#2585) 2023-11-21 21:02:55 -08:00
Utils.cpp Support onnx.GRU and onnx.RNN (#3447) 2024-07-10 14:04:17 -04:00