-
Notifications
You must be signed in to change notification settings - Fork 15
Enable lowering from taskflow.task to neura.kernel & Mapping #247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Would a task be driven by multiple counters? What the IRs look like when there are |
| for (OpOperand &use : result.getUses()) { | ||
| Operation *user = use.getOwner(); | ||
|
|
||
| // Case 1: Operand of a branch/cond_br → grant_once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only Case 1 here? If so, is live_out_non_arg_values redundant here?
Sorry for this too large pr......
Counter Classification
We classify the counter into three types:
root: no parent, has child(ren)relay: has parent, has child(ren)leaf: has parent, no childWe need to map each counter op onto the tile array. But only
leafcounter has the self-increment logic in FU. For other two types, they only have a register to store the counter values, the values are updated through off-array affine controller.Task Classification
We classify tasks into two categories:
taskflow.counter:This kind of task is driven by the counter; it is also terminated by the (
root) counter (leafcounter when there is only one counter).This kind of task can be further classified into two categories:
a. hyperblock with yield results: We introduce an
extract_predicateop to extract the predicate bit from therootcounter andgrant_predicatethe return valueb. hyperblock without yield results: The hyperblock execution terminates when the root counter sends a signal to the controller
taskflow.counter:This kind of task is self-driven, so we utilize an existing method similar to
func::FuncOpto handle this task.Taskflow to Neura Conversion
neura.kernelwith theIsolatedFromAbovetrait.convert-taskflow-to-neurato convert thetaskflow.hyperblockintoneura.kerneltaskflow.taskhastaskflow.counters outside thehyperblock, we embed them into the entry block of theneura.kernelasneura.countertaskflow.taskMappingtaskflow.taskis converted to ataskthat contains oneneura.kernelneura.kernelis mapped onto the tile array