torch-mlir/lib/Conversion/TorchToLinalg
Gaurav Shukla 1be604bfd3 [LINALG] Lower `aten.Matmul` to `linalg.BatchMatmul`
This commit lowers `aten.matmul` to `linalg.BatchMatmul` under the
following conditions:
1. The result of matrix multiplication must have batch dimensions,
   i.e., rank greater than 2.
2. The resultant matrix must have at most 1 dynamic batch dimension.

It also handles broadcasting of batch dimensions when batch dimensions
of the matrices are broadcastable.

Signed-Off-by: Gaurav Shukla <gaurav@nod-labs.com>
2022-06-25 10:58:06 +05:30
..
CMakeLists.txt Bump LLVM (#958) 2022-06-22 22:23:46 -05:00
DataMovement.cpp [LINALG] Lower `aten.Matmul` to `linalg.BatchMatmul` 2022-06-25 10:58:06 +05:30
IndirectDataMovement.cpp [LINALG] Fix shape function of index.Tensor + support N-rank inputs (#972) 2022-06-24 09:45:44 -07:00
Linear.cpp [LINALG] Lower `aten.Matmul` to `linalg.BatchMatmul` 2022-06-25 10:58:06 +05:30
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 [LINALG] Lower `aten.Matmul` to `linalg.BatchMatmul` 2022-06-25 10:58:06 +05:30
Utils.h [LINALG] Lower `aten.Matmul` to `linalg.BatchMatmul` 2022-06-25 10:58:06 +05:30