torch-mlir/lib/Dialect/Torch/Transforms
Ashay Rane f18b2be911
torch,linalg: add support for translating aten.linalg.vector_norm (#839)
This patch adds support for the torch.linalg.vector_norm op to the torch
dialect, including the necessary shape function.  It also extends the
conversion of reduction operators to support lowering of
AtenLinalgVectorNormOp, in addition to adding a handful of end-to-end
tests to validate the lowering.

There exist several opportunities to make this lowering optimal and
robust.  For instance, in its current form, the translation does not
support ord = 0, +inf, or -inf.  For L1 norms, we don't need to raise
each element to the power 1.0.  Similarly, L2 norms could benefit from
strength reduction.  Since the canonicalization pass is not able to
apply these optimizations, we should consider applying them during the
linalg lowering itself.
2022-05-19 15:48:15 -07:00
..
AdjustCallingConventions.cpp llvm: bump tag to e1318078 (#781) 2022-04-26 12:27:51 -07:00
CMakeLists.txt Introduce new shape library design. 2022-03-15 12:41:58 -07:00
DecomposeComplexOps.cpp Add shape info to `rand_like` + support for `dtype` flag (#851) 2022-05-12 16:00:59 -07:00
DropShapeCalculations.cpp llvm: bump tag to e1318078 (#781) 2022-04-26 12:27:51 -07:00
GlobalizeObjectGraph.cpp llvm: bump tag to e1318078 (#781) 2022-04-26 12:27:51 -07:00
InlineGlobalSlots.cpp Dual license the torch-mlir project. 2021-10-01 10:46:08 -07:00
MaximizeValueSemantics.cpp [TORCH] Add folding of aten.detach op. 2022-05-10 21:54:45 +05:30
PassDetail.h llvm: bump tag to e1318078 (#781) 2022-04-26 12:27:51 -07:00
Passes.cpp changed name option to decompose-complex-ops 2022-05-05 00:38:51 -07:00
PrepareForGlobalizeObjectGraph.cpp llvm: bump tag to e1318078 (#781) 2022-04-26 12:27:51 -07:00
ReduceOpVariants.cpp llvm: bump tag to e1318078 (#781) 2022-04-26 12:27:51 -07:00
RefinePublicReturn.cpp llvm: bump tag to e1318078 (#781) 2022-04-26 12:27:51 -07:00
RefineTypes.cpp torch,linalg: add support for translating aten.linalg.vector_norm (#839) 2022-05-19 15:48:15 -07:00
ReifyShapeCalculations.cpp llvm: bump tag to e1318078 (#781) 2022-04-26 12:27:51 -07:00
ShapeLibrary.cpp torch,linalg: add support for translating aten.linalg.vector_norm (#839) 2022-05-19 15:48:15 -07:00
SimplifyShapeCalculations.cpp llvm: bump tag to e1318078 (#781) 2022-04-26 12:27:51 -07:00