-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathTaskflowPasses.td
More file actions
62 lines (54 loc) · 2.54 KB
/
TaskflowPasses.td
File metadata and controls
62 lines (54 loc) · 2.54 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// TaskflowPasses.td - Passes for the Taskflow dialect
#ifndef TASKFLOW_PASSES_TD
#define TASKFLOW_PASSES_TD
include "mlir/Pass/PassBase.td"
//=========================================================//
// Passes for Task Level Optimizations
//=========================================================//
def AffineLoopTreeSerialization : Pass<"affine-loop-tree-serialization", "ModuleOp">{
let summary = "Serializes top-level affine.for loops into minimized task operations";
let description = [{
This pass converts top-level affine.for loops in a function into
minimized and canonicalized task operations.
}];
let constructor = "taskflow::createAffineLoopTreeSerializationPass()";
let dependentDialects = [
"mlir::taskflow::TaskflowDialect",
"mlir::affine::AffineDialect",
"mlir::func::FuncDialect"];
}
//=========================================================//
// Passes for the Taskflow dialect
//=========================================================//
def ConstructHyperblockFromTask : Pass<"construct-hyperblock-from-task", "func::FuncOp">{
let summary = "Constructs hyperblocks from Taskflow tasks.";
let description = [{
This passes selected two transform modes based on the input architecture specification.
1. With counter support: This pass constructs hyperblocks from Taskflow tasks by detecting perfect nested loop bands.
2. Without counter support: This pass constructs hyperblocks from Taskflow tasks by wrapping the innermost loop as a hyperblock.
}];
let constructor = "taskflow::createConstructHyperblockFromTaskPass()";
}
def ClassifyCounters : Pass<"classify-counters", "ModuleOp">{
let summary = "Classifies counters as root/relay/leaf";
let description = [{
Analyzes the counter hierarchy within taskflow.task operations and
classifies each counter:
- root: Top-level counter with no parent
- relay: Intermediate counter with both parent and child counters
- leaf: Innermost counter with no child counters
Leaf counters are mapped to CGRA tile arrays.
}];
let constructor = "taskflow::createClassifyCountersPass()";
}
def MapTaskOnCgra : Pass<"map-task-on-cgra", "func::FuncOp"> {
let summary = "Maps Taskflow tasks onto a 2D CGRA grid array";
let description = [{
This pass maps Taskflow tasks onto a 2D CGRA grid array.
Fusion candidates (same-header SSA dependencies) are placed on adjacent
CGRAs to enable direct data forwarding.
Uses a default 3x3 CGRA grid.
}];
let constructor = "taskflow::createMapTaskOnCgraPass()";
}
#endif // TASKFLOW_PASSES_TD