feat: toy tutorial chapter 3.
Signed-off-by: jackfiled <xcrenchangjun@outlook.com>
This commit is contained in:
@@ -246,6 +246,8 @@ def ReshapeOp : Hello_Op<"reshape"> {
|
||||
let assemblyFormat = [{
|
||||
`(` $input `:` type($input) `)` attr-dict `to` type(results)
|
||||
}];
|
||||
|
||||
let hasCanonicalizer = 1;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
@@ -294,7 +296,7 @@ def ReturnOp : Hello_Op<"return", [Pure, HasParent<"FuncOp">,
|
||||
// TransposeOp
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
def TransposeOp : Hello_Op<"transpose"> {
|
||||
def TransposeOp : Hello_Op<"transpose", [Pure]> {
|
||||
let summary = "transpose operation";
|
||||
|
||||
let arguments = (ins F64Tensor:$input);
|
||||
@@ -311,6 +313,7 @@ def TransposeOp : Hello_Op<"transpose"> {
|
||||
|
||||
// Invoke a static verify method to verify this transpose operation.
|
||||
let hasVerifier = 1;
|
||||
let hasCanonicalizer = 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user