forked from OSchip/llvm-project
[mlir][Linalg] Add interface methods to get lhs and rhs of contraction
Differential Revision: https://reviews.llvm.org/D102301
This commit is contained in:
parent
e7d26aceca
commit
b7911e80d6
|
@ -35,6 +35,22 @@ def LinalgContractionOpInterface : OpInterface<"ContractionOpInterface"> {
|
|||
let cppNamespace = "::mlir::linalg";
|
||||
let verify = [{ return detail::verifyContractionInterface($_op); }];
|
||||
let methods = [
|
||||
InterfaceMethod<
|
||||
/*desc=*/"Returns the left-hand side operand.",
|
||||
/*retTy=*/"Value",
|
||||
/*methodName=*/"lhs",
|
||||
/*args=*/(ins),
|
||||
/*methodBody=*/[{
|
||||
return $_op.getOperation()->getOperand(0);
|
||||
}]>,
|
||||
InterfaceMethod<
|
||||
/*desc=*/"Returns the right-hand side operand.",
|
||||
/*retTy=*/"Value",
|
||||
/*methodName=*/"rhs",
|
||||
/*args=*/(ins),
|
||||
/*methodBody=*/[{
|
||||
return $_op.getOperation()->getOperand(1);
|
||||
}]>,
|
||||
InterfaceMethod<
|
||||
/*desc=*/[{
|
||||
Returns whether the given op has indexing maps that correspond to a
|
||||
|
|
Loading…
Reference in New Issue