torch-mlir/test/Conversion/TorchToLinalg
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
..
basic.mlir Add shape transfer function and lowering to linalg for aten.neg (#759) 2022-04-15 11:11:22 -07:00
elementwise.mlir Update llvm-project to a54f4eae0e1d0ef5adccdcf9f6c2b518dc1101aa 2021-10-18 13:36:42 -04:00
flatten.mlir Update external/llvm-project 2022-01-18 13:25:42 -05:00
pooling.mlir Bump LLVM at 8361c5da30588d3d4a48eae648f53be1feb5cfad 2022-03-18 13:16:14 -04:00
unsqueeze.mlir Update external/llvm-project 2022-01-18 13:25:42 -05:00