mirror of https://github.com/llvm/torch-mlir
f18b2be911
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. |
||
---|---|---|
.. | ||
AdjustCallingConventions.cpp | ||
CMakeLists.txt | ||
DecomposeComplexOps.cpp | ||
DropShapeCalculations.cpp | ||
GlobalizeObjectGraph.cpp | ||
InlineGlobalSlots.cpp | ||
MaximizeValueSemantics.cpp | ||
PassDetail.h | ||
Passes.cpp | ||
PrepareForGlobalizeObjectGraph.cpp | ||
ReduceOpVariants.cpp | ||
RefinePublicReturn.cpp | ||
RefineTypes.cpp | ||
ReifyShapeCalculations.cpp | ||
ShapeLibrary.cpp | ||
SimplifyShapeCalculations.cpp |