Skip to content

Commit

Permalink
Adding new data to the skeleton dot file.
Browse files Browse the repository at this point in the history
  • Loading branch information
massimim committed Nov 23, 2023
1 parent 53b02a0 commit 2b81ae7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
7 changes: 6 additions & 1 deletion libNeonSet/src/set/container/graph/GraphDependency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ auto GraphDependency::
getLabel()
const -> std::string
{
return GraphDependencyTypeUtil::toString(getType());
std::stringstream s;
s << GraphDependencyTypeUtil::toString(getType());
for(auto const& token : mTokens) {
s << "\\l" << token.toString();
}
return s.str();
}

auto GraphDependency::
Expand Down
6 changes: 5 additions & 1 deletion libNeonSet/src/set/container/graph/GraphNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,11 @@ auto GraphNode::
s << "\\l - Execution: " << getContainer().getContainerExecutionType();
s << "\\lGraph ";
s << "\\l - Node id: " << this->getGraphData().getUid();

auto tokens = this->getContainer().getContainerInterface().getTokens();
s << "\\lTokens ";
for(auto t: tokens) {
s << "\\l - Token: " << t.toString();
}
addSchedulingInfo(s);

s << "\\l ---- ";
Expand Down
2 changes: 1 addition & 1 deletion libNeonSkeleton/include/Neon/skeleton/Skeleton.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct Skeleton
}
mOptions = options;
mMultiGraph.init(mBackend, opWithSequenceExpanded, name, options);
mMultiGraph.ioToDot("DB_multiGpuGraph", name);
mMultiGraph.ioToDot("DB_multiGpuGraph", name, true);
}


Expand Down
12 changes: 6 additions & 6 deletions libNeonSkeleton/src/skeleton/internal/multiGpuGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ namespace Neon::skeleton::internal {

void MultiXpuGraph::init(Neon::Backend& bk,
const std::vector<Neon::set::Container>& operations,
std::string /*name*/,
Options options)
[[maybe_unused]] std::string name,
Options options)
{
getGraph() = Neon::set::container::Graph(bk);
parse(bk.devSet().setCardinality(),
Expand All @@ -17,16 +17,16 @@ void MultiXpuGraph::init(Neon::Backend& bk,
// We fix them manually after all redundant dependencies are cleaned.
fixingDependenciesWithBeginNode();

// h_ioToDot("t0_" + name + ".dot", "i");
ioToDot("t0_" + name + ".dot", "i", true);
optimizations(options);
// h_ioToDot("t1_" + name + ".dot", "i");
ioToDot("t1_" + name + ".dot", "i", true);
communications(options);
getGraph().removeRedundantDependencies();


// h_ioToDot("t2_" + name + ".dot", "i");
ioToDot("t2_" + name + ".dot", "i", true);
this->computeScheduling();
// h_ioToDot("final" + name + ".dot", "i");
ioToDot("final" + name + ".dot", "i", true);
}

void MultiXpuGraph::parse(int setCardinalty,
Expand Down

0 comments on commit 2b81ae7

Please sign in to comment.