-
Notifications
You must be signed in to change notification settings - Fork 11
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
[Support] nested-loop/ctrl-flow #34
base: master
Are you sure you want to change the base?
Conversation
@@ -7,15 +7,15 @@ | |||
* Author : Cheng Tan | |||
* Date : Jan 9, 2023 | |||
*/ | |||
|
|||
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.
Is there an unnecessary space added?
src/CGRA.cpp
Outdated
#include <fstream> | ||
#include "CGRA.h" | ||
#include "json.hpp" | ||
|
||
using json = nlohmann::json; | ||
|
||
CGRA::CGRA(int t_rows, int t_columns, bool t_diagonalVectorization, | ||
bool t_heterogeneity, bool t_parameterizableCGRA, | ||
bool t_heterogeneity, bool t_parameterizableCGRA, int t_pathSupportDim, |
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.
Why is it called pathSupportDim
? What does it actually mean? number of tiles that support path merging?
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.
pathSupportDim
is used to determine how many tiles can support path merging. I will reconstruct codes uploading in this PR and finish ASAP.
@@ -36,7 +36,7 @@ CGRA::CGRA(int t_rows, int t_columns, bool t_diagonalVectorization, | |||
} | |||
} | |||
|
|||
ifstream paramCGRA("./paramCGRA.json"); | |||
ifstream paramCGRA("./param.json"); |
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.
Would this change make our previous ICED or CGRA-Flow compilation fail on "file not found"?
src/CGRA.cpp
Outdated
@@ -170,8 +170,11 @@ CGRA::CGRA(int t_rows, int t_columns, bool t_diagonalVectorization, | |||
if (t_heterogeneity) { | |||
for (int r=0; r<t_rows; ++r) { | |||
for (int c=0; c<t_columns; ++c) { | |||
if(r%2==1 and c%2 == 1) | |||
if (((r*t_columns)+(c+1)) <= t_pathSupportDim){ | |||
std::cout<< "[MMJ] "<< t_pathSupportDim << "support fuse and merge." <<std::endl; |
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.
[MMJ]
-> [DEBUG]
? And space between "
and <<
.
src/CGRA.cpp
Outdated
@@ -170,8 +170,11 @@ CGRA::CGRA(int t_rows, int t_columns, bool t_diagonalVectorization, | |||
if (t_heterogeneity) { | |||
for (int r=0; r<t_rows; ++r) { | |||
for (int c=0; c<t_columns; ++c) { | |||
if(r%2==1 and c%2 == 1) | |||
if (((r*t_columns)+(c+1)) <= t_pathSupportDim){ |
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.
What does this condition indicate? Originally only [1,1]
, [1,3]
, [3,1]
, ..., support heterogeneity. What about now?
src/DFG.cpp
Outdated
return; | ||
} | ||
|
||
// dualIssue is used to identify 'br' with multiple output, it combines the ouput together with the same control edge. |
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.
dualIssue is used to identify
-> Identifies
.
src/DFG.cpp
Outdated
} | ||
|
||
// dualIssue is used to identify 'br' with multiple output, it combines the ouput together with the same control edge. | ||
// Note that the control edge is only one bit width since there is noly one 'br' input. |
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.
noly
-> only
.
src/DFG.cpp
Outdated
|
||
|
||
// findIFELPath finds succeed nodes after br with different path | ||
void DFG::findIFELPath(list<DFGNode*>* t_succList, const int t_mergeSize) { |
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.
findIFELPath
-> findAndMergeIfElsePaths
? Am I correct? It looks not only find
but also merge
?
src/DFG.cpp
Outdated
} | ||
|
||
// pathMerge is used to merge exclusive pathes | ||
void DFG::pathMerge(list<DFGNode*>* t_diffPathNode, const int t_mergeSize){ |
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.
pathMerge
-> mergePaths
.
src/DFG.cpp
Outdated
void DFG::ESCORT() { | ||
dualIssueNew(2,100); | ||
// If dualIssueNew fails | ||
dualIssue(3,100); |
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.
Not quite understand why we need two dualIssue()
funcs. And not sure why there are two tuneForDualIssue()
funcs. And what the difference between dualissue
and tuneFor
. Can you plz add comment here?
Plz also resolve the conflicts and add tests like this: CGRA-Mapper/.github/workflows/cmake.yml Line 59 in b19c2bb
Thanks for the PR! |
There should be a detailed inspect. I will do it.