torch-mlir/lib
Aaron St George 4c557847bd
Don't fold `aten.detach` if result isn't same type as input. (#2824)
We were seeing some assertion failures after some checks around folders
were tightened up in LLVM:
https://github.com/llvm/llvm-project/pull/75887 . This PR essentially
moves the logic that used to be applied at the LLVM level into the
folder, which seems to be the suggested fix.

I'm not sure if the IR that caused issues for us _should_ be valid?
```
%1 = torch.aten.detach %arg0 : !torch.tensor<[1],f32> -> !torch.tensor
```
A better fix might be to create a verifier ensuring the result of
`aten.detach` has the same type as its operand.

---------

Co-authored-by: aaron-stgeorge <aaron.stgeorge@getcruise.com>
2024-01-30 09:45:51 -08:00
..
CAPI Clang format refresh (#2812) 2024-01-29 12:59:33 -05:00
Conversion OnnxToTorch ReduceMax lowering (#2768) 2024-01-30 11:44:48 +05:30
Dialect Don't fold `aten.detach` if result isn't same type as input. (#2824) 2024-01-30 09:45:51 -08:00
RefBackend [TorchToLinalg] Lower aten.cat to tensor.concat (#2650) 2023-12-15 15:45:32 -05:00
CMakeLists.txt Initial TorchOnnxToTorch conversion pipeline. (#2585) 2023-11-21 21:02:55 -08:00
InitAll.cpp Initial TorchOnnxToTorch conversion pipeline. (#2585) 2023-11-21 21:02:55 -08:00