Add General Test for Taskflow Dialect#233
Conversation
tancheng
left a comment
There was a problem hiding this comment.
Can you show a unsupported example? I thought we anyway can represent any example with a naive way (w/o analyzing dependency, i.e., assume all data are dependent).
| @@ -0,0 +1,73 @@ | |||
| // RUN: mlir-neura-opt %s | FileCheck %s | |||
There was a problem hiding this comment.
How is the test/multi-cgra/taskflow/irregular-loop/irregular-loop.cpp compiled using lit?
There was a problem hiding this comment.
I just use the mlir-neura-opt to parse the input ir, to make sure the syntax is correct.
Here is a The expected output is like: Difficulties for automated conversion:
|
And I don't get what you mean by "assume all data are dependent"? In such a case, how can we guarantee the RAW dependency in a taskflow (task in a dataflow) manner? |
|
okay, let's discuss this later. BTW, task1 would run on one CGRA and task2 would run on another CGRA? Or task1 is on a controller? |
Task 1 will run on one CGRA and task 2 will run on another. The controller only handles the perfect nested part (like a counter). |
So in this case, CGRA1 might be low utilized as it only perform |
Correct. And an automated conversion could be extremely complex in such a case. |
|
Re-defined the |
Hi~ @tancheng,
I am trying to implement the ConvertAffineToTaskflow pass this week. The problem that I encountered these days is that we cannot exhaust all the affine structures in this pass. I have already written a 1.7K-line conversion pass to convert the following two cases (
multi-nestedandirregular-loop) successfully.But when I try to add a new case, the conversion pass cannot process that structure, and more specific handling code needs to be added.
For linalg dialect, it’s a good idea to implement such a pass as there are only data dependencies between different tasks. However, for affine.for (especially for imperfect-nested loops), the nested structures are too hard for us to analyze.
So in this pr, I just put the transformed ir of
multi-nestedandirregular-loopin the tests. Just to make sure that the defined dialect is correct and can represent such structures.More discussions are needed for converting from high-level representations.