Skip to content
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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

MeowMJ
Copy link
Collaborator

@MeowMJ MeowMJ commented Dec 24, 2024

There should be a detailed inspect. I will do it.

@@ -7,15 +7,15 @@
* Author : Cheng Tan
* Date : Jan 9, 2023
*/

Copy link
Owner

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,
Copy link
Owner

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?

Copy link
Collaborator Author

@MeowMJ MeowMJ Jan 10, 2025

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");
Copy link
Owner

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;
Copy link
Owner

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){
Copy link
Owner

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.
Copy link
Owner

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.
Copy link
Owner

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) {
Copy link
Owner

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){
Copy link
Owner

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);
Copy link
Owner

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?

@tancheng
Copy link
Owner

Plz also resolve the conflicts and add tests like this:

Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants