-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTutorial.td
More file actions
43 lines (39 loc) · 1.04 KB
/
Tutorial.td
File metadata and controls
43 lines (39 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef TUTORIAL_TD_
#define TUTORIAL_TD_
include "mlir/IR/OpBase.td"
include "mlir/Interfaces/SideEffectInterfaces.td"
include "mlir/Interfaces/TilingInterface.td"
def Tutorial_Dialect : Dialect {
let name = "tutorial";
let cppNamespace = "::mlir::tutorial";
let summary = [{
Tutorial Dialect
}];
let description = [{
}];
}
def Tutorial_DequantOp : Op<Tutorial_Dialect,
"dequant",
[Pure,
DeclareOpInterfaceMethods<TilingInterface,
["getIterationDomain",
"getLoopIteratorTypes",
"getResultTilePosition",
"getTiledImplementation",
"generateResultTileValue",
"getIterationDomainTileFromResultTile",
"getIterationDomainTileFromOperandTile",
"getTiledImplementationFromOperandTile"]>
]> {
let arguments = (ins
AnyRankedTensor:$input,
AnyRankedTensor:$scale
);
let results = (outs
AnyRankedTensor:$output
);
let assemblyFormat = [{
$input `,` $scale attr-dict `:` type($input) `,` type($scale) `,` type($output)
}];
}
#endif // TUTORIAL_TD_