summaryrefslogtreecommitdiff
path: root/mlir/lib/CAPI/Dialect/Linalg.cpp
AgeCommit message (Collapse)Author
2025-11-12[mlir][linalg][python] Add Python Bindings for Inferring Contraction ↵Bangtian Liu
Dimensions from Affine Maps (#167587) This PR exposes `linalg::inferContractionDims(ArrayRef<AffineMap>)` to Python, allowing users to infer contraction dimensions (batch/m/n/k) directly from a list of affine maps without needing an operation. --------- Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
2025-09-14[MLIR] Apply clang-tidy fixes for ↵Mehdi Amini
performance-unnecessary-copy-initialization in Linalg.cpp (NFC)
2025-06-26[MLIR][Linalg] Harden parsing Linalg named ops (#145337)Mehdi Amini
This thread through proper error handling / reporting capabilities to avoid hitting llvm_unreachable while parsing linalg ops. Fixes #132755 Fixes #132740 Fixes #129185
2025-04-17[MLIR][CAPI][python] expose the python binding for linalgOp.getIndexingMaps ↵Bangtian Liu
(#136054) This PR is mainly about exposing the python bindings for `linalgOp.getIndexingMaps`. --------- Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
2025-04-10[mlir][CAPI][python] expose the python bindings for ↵Bangtian Liu
linalg::isaConvolutionOpInterface and linalg::inferConvolutionDims (#135253) This PR is mainly about exposing the python bindings for `linalg::isaConvolutionOpInterface` and `linalg::inferConvolutionDims`. --------- Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
2025-04-09[mlir][CAPI][python] expose the python bindings for ↵Bangtian Liu
linalg::isaContractionOpInterface and linalg::inferContractionDims (#134935) This PR is mainly about exposing the python bindings for` linalg::isaContractionOpInterface` and` linalg::inferContractionDims`. --------- Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
2022-10-17[mlir] Simplify DestinationStyleOpInterface.Alexander Belyaev
Differential Revision: https://reviews.llvm.org/D135348
2022-02-14[mlir][linalg] Add attributes to region builder (NFC).gysit
Adapt the region builder signature to hand in the attributes of the created ops. The revision is a preparation step the support named ops that need access to the operation attributes during op creation. Depends On D119692 Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D119693
2022-01-19[mlir] Make locations required when adding/creating block argumentsRiver Riddle
BlockArguments gained the ability to have locations attached a while ago, but they have always been optional. This goes against the core tenant of MLIR where location information is a requirement, so this commit updates the API to require locations. Fixes #53279 Differential Revision: https://reviews.llvm.org/D117633
2022-01-05[mlir] Use public PybindAdaptors in Linalg dialect bindingsAlex Zinenko
Previously, the Python bindings for the Linalg dialect relied on the internal implementation of core bindings. Most of that functionality was moved, and the remaining one does not need access to the implementation: it used to accept a dialect pointer as argument, but it can always be extracted from the operation that it also accepts; operations are available through PybindAdaptors in an opaque way. Change the bindings in that direction. This enables the decoupling of the Linalg dialect Python extension from the core IR Python extension. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D116649
2021-12-15[mlir][linalg] Replace LinalgOps.h and LinalgTypes.h by a single header.gysit
After removing the range type, Linalg does not define any type. The revision thus consolidates the LinalgOps.h and LinalgTypes.h into a single Linalg.h header. Additionally, LinalgTypes.cpp is renamed to LinalgDialect.cpp to follow the convention adopted by other dialects such as the tensor dialect. Depends On D115727 Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D115728
2021-06-28[mlir][linalg] Remove the StructuredOp capture mechanism.Tobias Gysi
After https://reviews.llvm.org/D104109, structured ops support scalar inputs. As a result, the capture mechanism meant to pass non-shaped parameters got redundant. The patch removes the capture semantics after the FillOp migrated to use scalar operands https://reviews.llvm.org/D104121. Differential Revision: https://reviews.llvm.org/D104785
2021-06-03[mlir][linalg] Cleanup LinalgOp usage in capi.Tobias Gysi
Replace the uses of deprecated Structured Op Interface methods in Linalg.cpp. This patch is based on https://reviews.llvm.org/D103394. Differential Revision: https://reviews.llvm.org/D103619
2021-05-20[mlir][Linalg] NFC - Drop Linalg EDSC usageNicolas Vasilache
Drop the Linalg dialect EDSC subdirectory and update all uses. Differential Revision: https://reviews.llvm.org/D102848
2021-04-16[mlir][Python][Linalg] Add support for captures in body builder.Nicolas Vasilache
When Linalg named ops support was added, captures were omitted from the body builder. This revision adds support for captures which allows us to write FillOp in a more idiomatic fashion using the _linalg_ops_ext mixin support. This raises an issue in the generation of `_linalg_ops_gen.py` where ``` @property def result(self): return self.operation.results[0] if len(self.operation.results) > 1 else None ```. The condition should be `== 1`. This will be fixed in a separate commit. Differential Revision: https://reviews.llvm.org/D100363
2021-03-31[mlir][Linalg][Python] Create the body of builtin named Linalg opsNicolas Vasilache
This revision adds support to properly add the body of registered builtin named linalg ops. At this time, indexing_map and iterator_type support is still missing so the op is not executable yet. Differential Revision: https://reviews.llvm.org/D99578
2021-01-19Fix a few GCC compiler warnings (NFC)Mehdi Amini
2021-01-11[mlir][CAPI] Introduce standard source layout for mlir-c dialect registration.Stella Laurenzo
* Registers a small set of sample dialects. * NFC with respect to existing C-API symbols but some headers have been moved down a level to the Dialect/ sub-directory. * Adds an additional entry point per dialect that is needed for dynamic discovery/loading. * See discussion: https://llvm.discourse.group/t/dialects-and-the-c-api/2306/16 Differential Revision: https://reviews.llvm.org/D94370