-
Notifications
You must be signed in to change notification settings - Fork 8
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
[feat] Add support for nonlinear operations #27
base: master
Are you sure you want to change the base?
Changes from all commits
ede67e7
3d060fd
32a9671
219d1d8
b7f2926
e26df4f
7fb0f61
7fbd95f
be01199
c7df862
f405e5e
42df212
73df393
e9d6c61
67ffd08
050f675
daceefd
88840d2
f0967de
553c187
514b909
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,28 @@ CGRA::CGRA(int t_rows, int t_columns, bool t_diagonalVectorization, | |
m_rows = t_rows; | ||
m_columns = t_columns; | ||
m_FUCount = t_rows * t_columns; | ||
m_supportComplex = new list<string>(); | ||
m_supportCall = new list<string>(); | ||
nodes = new CGRANode**[t_rows]; | ||
|
||
// Initialize the m_supportComplex & m_supportCall list. | ||
for (auto x: *t_additionalFunc) { | ||
string func = x.first; | ||
if (func.find("call") != string::npos) { | ||
if (func.length() == 4) { | ||
m_supportCall->push_back(""); | ||
} else { | ||
m_supportCall->push_back(func.substr(func.find("call") + 5)); | ||
} | ||
} else if (func.find("complex") != string::npos) { | ||
if (func.length() == 7) { | ||
m_supportComplex->push_back(""); | ||
} else { | ||
m_supportComplex->push_back(func.substr(func.find("complex") + 8)); | ||
} | ||
} | ||
} | ||
|
||
if (t_parameterizableCGRA) { | ||
|
||
int node_id = 0; | ||
|
@@ -143,11 +163,11 @@ CGRA::CGRA(int t_rows, int t_columns, bool t_diagonalVectorization, | |
|
||
// Some other basic operations that can be indicated in the param.json: | ||
// Enable the specialized 'call' functionality. | ||
for (int r=0; r<t_rows; ++r) { | ||
for (int c=0; c<t_columns; ++c) { | ||
nodes[r][c]->enableCall(); | ||
} | ||
} | ||
// for (int r=0; r<t_rows; ++r) { | ||
// for (int c=0; c<t_columns; ++c) { | ||
// nodes[r][c]->enableCall(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is a bug fix, right? So from now on, And is this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, |
||
// } | ||
// } | ||
|
||
// Enable the vectorization. | ||
if (t_diagonalVectorization) { | ||
|
@@ -168,12 +188,12 @@ CGRA::CGRA(int t_rows, int t_columns, bool t_diagonalVectorization, | |
|
||
// Enable the heterogeneity. | ||
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) | ||
nodes[r][c]->enableComplex(); | ||
} | ||
} | ||
// for (int r=0; r<t_rows; ++r) { | ||
// for (int c=0; c<t_columns; ++c) { | ||
// // if(c == 0 || (r%2==1 and c%2 == 1)) | ||
// nodes[r][c]->enableComplex(); | ||
// } | ||
// } | ||
Comment on lines
+191
to
+196
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Means There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No. Here I mean complex operations should be manually specified in the param.json rather than we configure it for the default. |
||
} | ||
|
||
for (int r=0; r<t_rows; ++r) { | ||
|
@@ -255,6 +275,14 @@ CGRA::CGRA(int t_rows, int t_columns, bool t_diagonalVectorization, | |
|
||
} | ||
|
||
list<string>* CGRA::getSupportComplex() { | ||
return m_supportComplex; | ||
} | ||
|
||
list<string>* CGRA::getSupportCall() { | ||
return m_supportCall; | ||
} | ||
|
||
void CGRA::disableSpecificConnections() { | ||
// nodes[0][0]->disable(); | ||
// nodes[0][1]->disable(); | ||
|
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.
idiv_test
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.
ok