mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
fix: remove unnecessary comments from graph dump
Add section comments only when corresponding edges are present. Related-To: NEO-15377 Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
fa1645eab8
commit
e31d052328
@@ -119,6 +119,22 @@ TEST_F(GraphDotExporterTest, GivenGraphWithMultipleCommandsWhenWriteEdgesThenGen
|
||||
EXPECT_NE(output.find("L0_S0_C0 -> L0_S0_C1"), std::string::npos);
|
||||
}
|
||||
|
||||
TEST_F(GraphDotExporterTest, GivenGraphWithSingleCommandWhenWriteEdgesThenDoesNotGenerateSequentialSectionComment) {
|
||||
Graph testGraph{&ctx, true};
|
||||
Mock<Event> event;
|
||||
Mock<CommandList> cmdlist;
|
||||
cmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
|
||||
|
||||
testGraph.capture<CaptureApi::zeCommandListAppendBarrier>(&cmdlist, &event, 0U, nullptr);
|
||||
testGraph.stopCapturing();
|
||||
|
||||
std::ostringstream dot;
|
||||
exporter.writeEdges(dot, testGraph, 0, 0);
|
||||
std::string output = dot.str();
|
||||
|
||||
EXPECT_EQ(output.find("// Sequential edges:"), std::string::npos);
|
||||
}
|
||||
|
||||
TEST_F(GraphDotExporterTest, GivenGraphWithCommandWhenGetCommandNodeLabelThenReturnsCorrectLabel) {
|
||||
Graph testGraph{&ctx, true};
|
||||
Mock<Event> event;
|
||||
@@ -466,6 +482,16 @@ TEST_F(GraphDotExporterTest, GivenGraphWithEmptySubgraphWhenWriteForkJoinEdgesTh
|
||||
EXPECT_EQ(output.find("->"), std::string::npos);
|
||||
}
|
||||
|
||||
TEST_F(GraphDotExporterTest, GivenGraphWithNoJoinedForksWhenWriteForkJoinEdgesThenNoSectionComment) {
|
||||
Graph testGraph{&ctx, true};
|
||||
|
||||
std::ostringstream dot;
|
||||
exporter.writeForkJoinEdges(dot, testGraph, 0, 0);
|
||||
std::string output = dot.str();
|
||||
|
||||
EXPECT_EQ(output.find("// Fork/Join edges:"), std::string::npos);
|
||||
}
|
||||
|
||||
TEST_F(GraphDotExporterTest, GivenGraphWithUnjoinedForksWhenWriteUnjoinedForkEdgesThenGeneratesUnjoinedEdges) {
|
||||
Graph testGraph{&ctx, true};
|
||||
Mock<Event> forkEvent;
|
||||
@@ -525,6 +551,16 @@ TEST_F(GraphDotExporterTest, GivenGraphWithEmptyUnjoinedSubgraphWhenWriteUnjoine
|
||||
testGraph.stopCapturing();
|
||||
}
|
||||
|
||||
TEST_F(GraphDotExporterTest, GivenGraphWithNoUnjoinedForksWhenWriteUnjoinedForkEdgesThenNoSectionComment) {
|
||||
Graph testGraph{&ctx, true};
|
||||
|
||||
std::ostringstream dot;
|
||||
exporter.writeUnjoinedForkEdges(dot, testGraph, 0, 0);
|
||||
std::string output = dot.str();
|
||||
|
||||
EXPECT_EQ(output.find("// Unjoined forks:"), std::string::npos);
|
||||
}
|
||||
|
||||
class GraphDotExporterSimpleStyleTest : public ::testing::Test {
|
||||
protected:
|
||||
GraphsCleanupGuard graphCleanup;
|
||||
|
||||
Reference in New Issue
Block a user