torch-mlir/lib/Conversion
Ashay Rane a893c7d5cf
Add shape transfer function and lowering to linalg for aten.neg (#759)
* shape: add shape transfer function for aten.neg

Prior to this patch, the list of shape transfer functions did not
include `aten.neg`, which resulted in errors like below.

```
error: unsupported by backend lowering: tensor with unknown rank or dtype
note: see current operation: %0 = "torch.aten.neg"(%arg0) :
  (!torch.vtensor<[256,256],f32>) -> !torch.vtensor<*,f32>
note: this is likely due to a missing shape transfer function in shape_lib_gen.py
```

This patch fixes the problem by adding a shape transfer function to
reflect the point-wise nature of this operation.

* linalg: add translation of aten.neg operation

This patch adds a translation rule to lower `aten.neg` operations on
tensors to an `arith.negf` operation wrapped inside a `linalg.generic`
operation.  This patch also adds a rudimentary test.
2022-04-15 11:11:22 -07:00
..
TorchToLinalg Add shape transfer function and lowering to linalg for aten.neg (#759) 2022-04-15 11:11:22 -07:00
TorchToSCF Bump LLVM at 8361c5da30588d3d4a48eae648f53be1feb5cfad 2022-03-18 13:16:14 -04:00
TorchToStd [LINALG] Add decomposition of `aten.dropout` op 2022-03-22 13:14:49 +05:30
TorchToTMTensor [MLIR][TORCH] Add E2E support for aten::max_pool2d_with_indices_backward op 2022-04-14 21:46:47 +05:30
TorchToTosa Add 2D case for convolution (#693) 2022-04-08 00:47:57 -04:00
Utils [MLIR][TORCH] Add E2E support for aten::max_pool2d_with_indices_backward op 2022-04-14 21:46:47 +05:30
CMakeLists.txt [MLIR][TORCH] Add TorchToTMTensor pass 2022-03-08 22:52:34 +05:30
PassDetail.h Dual license the torch-mlir project. 2021-10-01 10:46:08 -07:00
Passes.cpp [MLIR][TORCH] Add TorchToTMTensor pass 2022-03-08 22:52:34 +05:30