[Mlir-commits] [mlir] [mlir][CAPI][python] expose the python bindings for linalg::isaContractionOpInterface and linalg::inferContractionDims (PR #134935)

Jakub Kuderski llvmlistbot at llvm.org
Wed Apr 9 07:08:14 PDT 2025


================
@@ -41,4 +41,36 @@ void mlirLinalgFillBuiltinNamedOpRegion(MlirOperation mlirOp) {
   fun(b, *body, op->getAttrs());
 }
 
+MLIR_CAPI_EXPORTED bool mlirLinalgIsContractionOp(MlirOperation op) {
+  auto linalgOp = llvm::dyn_cast<mlir::linalg::LinalgOp>(unwrap(op));
----------------
kuhar wrote:

Can you add a comment explaining that `isaContractionOpInterface` handles null inputs?

https://github.com/llvm/llvm-project/pull/134935


More information about the Mlir-commits mailing list