[Mlir-commits] [mlir] [mlir] Add `res()` method to `linalg::ContractionOpInterface` (PR #76539)
Jerry Wu
llvmlistbot at llvm.org
Sun Dec 31 22:47:17 PST 2023
https://github.com/pzread updated https://github.com/llvm/llvm-project/pull/76539
>From 524cf6b787d0289d8855cf055a73013c37746f44 Mon Sep 17 00:00:00 2001
From: Jerry Wu <cheyuw at google.com>
Date: Thu, 28 Dec 2023 21:50:40 +0000
Subject: [PATCH] Add res() method
---
mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
index fbf3f19cde0e9b..033cd25a99c025 100644
--- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
+++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
@@ -54,6 +54,14 @@ def LinalgContractionOpInterface : OpInterface<"ContractionOpInterface"> {
return $_op.getOperation()->getOperand(1);
}]>,
InterfaceMethod<
+ /*desc=*/"Returns the result value.",
+ /*retTy=*/"OpResult",
+ /*methodName=*/"res",
+ /*args=*/(ins),
+ /*methodBody=*/[{
+ return $_op.getOperation()->getResult(1);
+ }]>,
+ InterfaceMethod<
/*desc=*/[{
Returns whether the given op has indexing maps that correspond to a
row-major matmul operation.
More information about the Mlir-commits
mailing list