Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippGrulich committed Dec 8, 2024
1 parent 2473659 commit 852034f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
21 changes: 10 additions & 11 deletions nautilus/src/nautilus/compiler/ir/util/GraphVizUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ class GraphvizWriter {
stream << " graph " << write_attrs(attrs) << ";" << std::endl;
}

void write_block_argument_edges(const std::shared_ptr<IRGraph>&,
const BasicBlockInvocation& bi,
void write_block_argument_edges(const std::shared_ptr<IRGraph>&, const BasicBlockInvocation& bi,
[[maybe_unused]] bool hideIntermediateBlockArguments, std::string label) {
// crate an edge from the src block op to the argument in the target block.
for (size_t i = 0; i < bi.getArguments().size(); i++) {
Expand Down Expand Up @@ -274,10 +273,10 @@ class GraphvizWriter {
hideIntermediateBlockArguments, "false");
write_block_argument_edges(graph, ifOp->getFalseBlockInvocation(),
hideIntermediateBlockArguments, "true");
} else if (op->getOperationType() == Operation::OperationType::BranchOp) {
[[maybe_unused]] auto branchOp = as<BranchOperation>(op);
write_block_argument_edges(graph, branchOp->getNextBlockInvocation(),
hideIntermediateBlockArguments, "");
} else if (op->getOperationType() == Operation::OperationType::BranchOp) {
[[maybe_unused]] auto branchOp = as<BranchOperation>(op);
write_block_argument_edges(graph, branchOp->getNextBlockInvocation(),
hideIntermediateBlockArguments, "");
}
}
}
Expand Down Expand Up @@ -324,8 +323,8 @@ class GraphvizWriter {
}
}

virtualvoid write_edge(const std::string& from, const std::string& to, const std::string type,
const std::string& label = "") {
virtual void write_edge(const std::string& from, const std::string& to, const std::string type,
const std::string& label = "") {
std::map<std::string, std::string> attrs;
attrs["label"] = label; // Example label
attrs["fontname"] = "arial";
Expand All @@ -350,8 +349,8 @@ class GraphvizWriter {
write_edges(graph, false, drawBlocksOnly);
end_graph();
}
virtualvoid write_node(const std::string& indent, const std::string& label, const std::string& id,
const std::string type) {
virtual void write_node(const std::string& indent, const std::string& label, const std::string& id,
const std::string type) {
std::map<std::string, std::string> attrs;
attrs["label"] = label;
attrs["shape"] = "rectangle"; // Example shape
Expand Down Expand Up @@ -584,7 +583,7 @@ class MermaidWriter : public GraphvizWriter {
stream << " end" << std::endl;
}

virtual std::string getNodeLabelForOp(Operation* op) {
virtual std::string getNodeLabelForOp(Operation* op) override {
switch (op->getOperationType()) {
case Operation::OperationType::AddOp:
return "#plus;";
Expand Down
2 changes: 1 addition & 1 deletion nautilus/test/execution-tests/ExecutionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ TEST_CASE("Engine Compiler Test") {
options.setOption("dump.all", true);
options.setOption("dump.graph", true);
options.setOption("dump.graph.type", "mermaid");
options.setOption("dump.graph.full", false);
options.setOption("dump.graph.full", true);
auto engine = engine::NautilusEngine(options);
runAllTests(engine);
}
Expand Down

0 comments on commit 852034f

Please sign in to comment.