forked from intel/llvm
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCL][Graph] Add Graphs printing API (intel#11796)
Updates Sycl-Graph API with a graph print function outputting a dot graph that represents the created modifiable graph. Updates the Spec with the proposed API for debug print graph. Adds e2e tests that check the behaviour of this function.
- Loading branch information
1 parent
1957f75
commit 7736c42
Showing
12 changed files
with
563 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// REQUIRES: level_zero || cuda, gpu | ||
// RUN: %{build} -o %t.out | ||
// RUN: %if linux %{ %{run} %t.out ; FileCheck %s --input-file graph.dot %} | ||
// RUN: %if windows %{ %{run} %t.out %} | ||
// Windows output format differs from linux format. | ||
// The filecheck-based output checking is suited to linux standards. | ||
// On Windows, we only test that printing takes place correctly and does not | ||
// trigger errors or throw execeptions. | ||
// | ||
// CHECK: digraph dot { | ||
// CHECK-NEXT: "0x[[#%x,NODE1:]]" | ||
// CHECK-SAME: [style=bold, label="ID = 0x[[#NODE1]]\nTYPE = CGExecKernel \nNAME = _ZTSZZ11add_kernelsItEN4sycl3_V13ext6oneapi12experimental4nodeENS4_13command_graphILNS4_11graph_stateE0EEEmNS1_6bufferIT_Li1ENS1_6detail17aligned_allocatorINSt12remove_constISA_E4typeEEEvEESH_SH_ENKUlRNS1_7handlerEE_clESJ_EUlNS1_4itemILi1ELb1EEEE_\n"]; | ||
// CHECK-NEXT: "0x[[#%x,NODE2:]]" | ||
// CHECK-SAME: [style=bold, label="ID = 0x[[#NODE2]]\nTYPE = CGExecKernel \nNAME = _ZTSZZ11add_kernelsItEN4sycl3_V13ext6oneapi12experimental4nodeENS4_13command_graphILNS4_11graph_stateE0EEEmNS1_6bufferIT_Li1ENS1_6detail17aligned_allocatorINSt12remove_constISA_E4typeEEEvEESH_SH_ENKUlRNS1_7handlerEE0_clESJ_EUlNS1_4itemILi1ELb1EEEE_\n"]; | ||
// CHECK-NEXT: "0x[[#NODE1]]" -> "0x[[#NODE2]]" | ||
// CHECK-NEXT: "0x[[#%x,NODE3:]]" | ||
// CHECK-SAME: [style=bold, label="ID = 0x[[#NODE3]]\nTYPE = CGExecKernel \nNAME = _ZTSZZ11add_kernelsItEN4sycl3_V13ext6oneapi12experimental4nodeENS4_13command_graphILNS4_11graph_stateE0EEEmNS1_6bufferIT_Li1ENS1_6detail17aligned_allocatorINSt12remove_constISA_E4typeEEEvEESH_SH_ENKUlRNS1_7handlerEE1_clESJ_EUlNS1_4itemILi1ELb1EEEE_\n"]; | ||
// CHECK-NEXT: "0x[[#NODE2]]" -> "0x[[#NODE3]]" | ||
// CHECK-NEXT: "0x[[#%x,NODE4:]]" | ||
// CHECK-SAME: [style=bold, label="ID = 0x[[#NODE4]]\nTYPE = CGExecKernel \nNAME = _ZTSZZ11add_kernelsItEN4sycl3_V13ext6oneapi12experimental4nodeENS4_13command_graphILNS4_11graph_stateE0EEEmNS1_6bufferIT_Li1ENS1_6detail17aligned_allocatorINSt12remove_constISA_E4typeEEEvEESH_SH_ENKUlRNS1_7handlerEE2_clESJ_EUlNS1_4itemILi1ELb1EEEE_\n"]; | ||
// CHECK-DAG: "0x[[#NODE3]]" -> "0x[[#NODE4]]" | ||
// CHECK-DAG: "0x[[#NODE2]]" -> "0x[[#NODE4]]" | ||
// CHECK-NEXT: "0x[[#%x,NODE5:]]" | ||
// CHECK-SAME: [style=bold, label="ID = 0x[[#NODE5]]\nTYPE = CGCopy Device-to-Device \n"]; | ||
// CHECK-DAG: "0x[[#NODE3]]" -> "0x[[#NODE5]]" | ||
// CHECK-DAG: "0x[[#NODE4]]" -> "0x[[#NODE5]] | ||
// CHECK-NEXT: "0x[[#%x,NODE6:]]" | ||
// CHECK-SAME: [style=bold, label="ID = 0x[[#NODE6]]\nTYPE = CGCopy Device-to-Host \n"]; | ||
// CHECK-NEXT: "0x[[#%x,NODE7:]]" | ||
// CHECK-SAME: [style=bold, label="ID = 0x[[#NODE7]]\nTYPE = None \n"]; | ||
|
||
#define GRAPH_E2E_EXPLICIT | ||
|
||
#include "../Inputs/debug_print_graph.cpp" |
Oops, something went wrong.