mirror of https://github.com/llvm/torch-mlir
a893c7d5cf
* 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. |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
DataMovement.cpp | ||
IndirectDataMovement.cpp | ||
Linear.cpp | ||
Pooling.cpp | ||
PopulatePatterns.h | ||
Random.cpp | ||
Reduction.cpp | ||
TensorConstructors.cpp | ||
TensorScalarInterop.cpp | ||
TorchToLinalg.cpp | ||
Uncategorized.cpp | ||
Utils.cpp | ||
Utils.h |