torch-mlir/lib/Conversion/TorchToLinalg
Ashay Rane 234fc7fe0c
linalg: lower `aten.triu` op to `linalg.generic` (#965)
Prior to this patch, the torch dialect included `AtenTriuOp` for
computing the upper triangular part of the input matrix, but there was
no code for lowering the op to the linalg dialect.

This patch adds code to generate a `linalg.generic` operation that
compares indices (computed using `linalg.index`) to choose between zero
or the original value (using `arith.select`).  The lowering fails if the
number of dimensions are less than two.  This patch also adds a few
end-to-end tests.
2022-06-23 22:45:48 -07:00
..
CMakeLists.txt Bump LLVM (#958) 2022-06-22 22:23:46 -05:00
DataMovement.cpp [LINALG] Fix handling of size-1 dims in `aten.view` (#962) 2022-06-22 15:58:40 -07:00
IndirectDataMovement.cpp [LINALG] Fix typo in conversion pattern of `aten.embedding` (#942) 2022-06-15 09:45:10 -07:00
Linear.cpp Handle `nn.Linear(..., bias=False)` case for TorchToLinalg (#919) 2022-06-08 21:13:43 -05:00
Pooling.cpp [MLIR][TORCH] Add decomposition of aten.adaptive_avg_pool2d op 2022-05-27 07:56:37 +05:30
PopulatePatterns.h Temporarily revert support for custom op extensions. (#944) 2022-06-14 18:24:40 -07:00
Random.cpp Improve "pseudo" op terminology. 2022-03-15 17:57:52 -07:00
Reduction.cpp torch,linalg: add support for translating aten.linalg.vector_norm (#839) 2022-05-19 15:48:15 -07:00
TensorConstructors.cpp [LINALG] Add support for preserve memory format in aten_empty_like op. 2022-05-10 09:37:55 +05:30
TensorScalarInterop.cpp [MLIR][TORCH] Add E2E support for ScalarImplicit, Int.Scalar op 2022-05-10 22:40:49 +05:30
TorchToLinalg.cpp Temporarily revert support for custom op extensions. (#944) 2022-06-14 18:24:40 -07:00
Uncategorized.cpp linalg: lower `aten.triu` op to `linalg.generic` (#965) 2022-06-23 22:45:48 -07:00
Utils.cpp torch,linalg: add support for translating aten.linalg.vector_norm (#839) 2022-05-19 15:48:15 -07:00
Utils.h torch,linalg: add support for translating aten.linalg.vector_norm (#839) 2022-05-19 15:48:15 -07:00