torch-mlir/lib/Dialect/Torch
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
..
IR torch.prim.TupleIndex: Adjust tensor types when folding. 2022-05-19 09:36:27 -07:00
Transforms torch,linalg: add support for translating aten.linalg.vector_norm (#839) 2022-05-19 15:48:15 -07:00
Utils Fix type promotion code for scalar only operations 2022-05-07 10:37:21 -04:00
CMakeLists.txt E2e support for aten.softmax.int and aten.embedding 2021-10-18 17:57:45 -04:00