Skip to content

Commit 9876edf

Browse files
committed
[SYCL][Graph][L0 v2] Fix DG2 E2E tests
Fix and re-enable DG2 SYCL-Graph E2E tests for the Level-Zero V2 adapter. See: * #18668 * #18579
1 parent 5e801a3 commit 9876edf

13 files changed

+84
-28
lines changed

sycl/test-e2e/Graph/Explicit/basic_buffer.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// UNSUPPORTED: linux && run-mode && gpu-intel-dg2 && !igc-dev
2-
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/18668
3-
41
// RUN: %{build} -o %t.out
52
// RUN: %{run} %t.out
63
// Extra run to check for leaks in Level Zero using UR_L0_LEAKS_DEBUG

sycl/test-e2e/Graph/Explicit/buffer_copy.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// UNSUPPORTED: linux && run-mode && gpu-intel-dg2 && !igc-dev
2-
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/18668
3-
41
// RUN: %{build} -o %t.out
52
// RUN: %{run} %t.out
63
// Extra run to check for leaks in Level Zero using UR_L0_LEAKS_DEBUG

sycl/test-e2e/Graph/Explicit/buffer_copy_2d.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// UNSUPPORTED: linux && run-mode && gpu-intel-dg2 && !igc-dev
2-
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/18668
3-
41
// RUN: %{build} -o %t.out
52
// RUN: %{run} %t.out
63
// Extra run to check for leaks in Level Zero using UR_L0_LEAKS_DEBUG
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// RUN: %{build} -o %t.out
2+
// RUN: %{run} %t.out
3+
// Extra run to check for leaks in Level Zero using UR_L0_LEAKS_DEBUG
4+
// RUN: %if level_zero %{env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 %{l0_leak_check} %{run} %t.out 2>&1 | FileCheck %s --implicit-check-not=LEAK %}
5+
// Extra run to check for immediate-command-list in Level Zero
6+
// RUN: %if level_zero %{env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1 %{l0_leak_check} %{run} %t.out 2>&1 | FileCheck %s --implicit-check-not=LEAK %}
7+
//
8+
9+
#define GRAPH_E2E_EXPLICIT
10+
11+
#include "../Inputs/buffer_interleave_eager.cpp"

sycl/test-e2e/Graph/Explicit/buffer_ordering.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// UNSUPPORTED: run-mode && gpu-intel-dg2 && !igc-dev
2-
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/18579
31
// RUN: %{build} -o %t.out
42
// RUN: %{run} %t.out
53
// Extra run to check for leaks in Level Zero using UR_L0_LEAKS_DEBUG
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// Tests enqueueing an eager buffer submission followed by two executions
2+
// of the same graph which also use the buffer.
3+
4+
#include "../graph_common.hpp"
5+
6+
int main() {
7+
queue Queue{};
8+
9+
const size_t N = 10;
10+
std::vector<int> Arr(N, 0);
11+
12+
buffer<int> Buf{N};
13+
Buf.set_write_back(false);
14+
15+
{
16+
// Buffer elements set to 8
17+
Queue.submit([&](handler &CGH) {
18+
auto Acc = Buf.get_access(CGH);
19+
CGH.parallel_for(range<1>{N}, [=](id<1> idx) {
20+
size_t i = idx;
21+
Acc[i] = 8;
22+
});
23+
});
24+
25+
// Create graph than adds 2 to buffer elements
26+
exp_ext::command_graph Graph{
27+
Queue.get_context(),
28+
Queue.get_device(),
29+
{exp_ext::property::graph::assume_buffer_outlives_graph{}}};
30+
31+
add_node(Graph, Queue, [&](handler &CGH) {
32+
auto Acc = Buf.get_access(CGH);
33+
CGH.parallel_for(range<1>{N}, [=](id<1> idx) {
34+
size_t i = idx;
35+
Acc[i] += 2;
36+
});
37+
});
38+
39+
auto ExecGraph = Graph.finalize();
40+
41+
// Buffer elements set to 10
42+
Queue.ext_oneapi_graph(ExecGraph);
43+
44+
// Buffer elements set to 12
45+
Queue.ext_oneapi_graph(ExecGraph);
46+
47+
// Copy results back
48+
Queue.submit([&](handler &CGH) {
49+
auto Acc = Buf.get_access(CGH);
50+
CGH.copy(Acc, Arr.data());
51+
});
52+
Queue.wait();
53+
}
54+
55+
const int Expected = 12;
56+
for (size_t i = 0; i < N; i++) {
57+
assert(check_value(i, Expected, Arr[i], "Arr"));
58+
}
59+
60+
return 0;
61+
}

sycl/test-e2e/Graph/Inputs/buffer_ordering.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ int main() {
7373
});
7474

7575
// Buffer elements set to 10
76-
auto Event =
77-
Queue.submit([&](handler &CGH) { CGH.ext_oneapi_graph(ExecGraph); });
76+
Queue.submit([&](handler &CGH) { CGH.ext_oneapi_graph(ExecGraph); });
7877

7978
// Buffer elements set to 20
8079
Queue.submit([&](handler &CGH) {

sycl/test-e2e/Graph/RecordReplay/basic_buffer.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// UNSUPPORTED: linux && run-mode && gpu-intel-dg2 && !igc-dev
2-
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/18668
3-
41
// RUN: %{build} -o %t.out
52
// RUN: %{run} %t.out
63
// Extra run to check for leaks in Level Zero using UR_L0_LEAKS_DEBUG

sycl/test-e2e/Graph/RecordReplay/buffer_copy.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// UNSUPPORTED: linux && run-mode && gpu-intel-dg2 && !igc-dev
2-
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/18668
3-
41
// RUN: %{build} -o %t.out
52
// RUN: %{run} %t.out
63
// Extra run to check for leaks in Level Zero using UR_L0_LEAKS_DEBUG
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// RUN: %{build} -o %t.out
2+
// RUN: %{run} %t.out
3+
// Extra run to check for leaks in Level Zero using UR_L0_LEAKS_DEBUG
4+
// RUN: %if level_zero %{env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 %{l0_leak_check} %{run} %t.out 2>&1 | FileCheck %s --implicit-check-not=LEAK %}
5+
// Extra run to check for immediate-command-list in Level Zero
6+
// RUN: %if level_zero %{env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1 %{l0_leak_check} %{run} %t.out 2>&1 | FileCheck %s --implicit-check-not=LEAK %}
7+
//
8+
9+
#define GRAPH_E2E_RECORD_REPLAY
10+
11+
#include "../Inputs/buffer_interleave_eager.cpp"

sycl/test-e2e/Graph/RecordReplay/buffer_ordering.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// UNSUPPORTED: run-mode && gpu-intel-dg2 && !igc-dev
2-
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/18579
31
// RUN: %{build} -o %t.out
42
// RUN: %{run} %t.out
53
// Extra run to check for leaks in Level Zero using UR_L0_LEAKS_DEBUG

sycl/test-e2e/Graph/RecordReplay/queue_constructor_buffer.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// UNSUPPORTED: linux && run-mode && gpu-intel-dg2 && !igc-dev
2-
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/18668
3-
41
// RUN: %{build} -o %t.out
52
// RUN: %{run} %t.out
63
// Extra run to check for leaks in Level Zero using UR_L0_LEAKS_DEBUG

sycl/test-e2e/Graph/lit.local.cfg

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
# https://github.com/intel/llvm/issues/17165
22
if 'windows' in config.available_features:
33
config.unsupported_features += ['arch-intel_gpu_bmg_g21']
4-
5-
# https://github.com/intel/llvm/issues/18668
6-
# https://github.com/intel/llvm/issues/18579
7-
config.unsupported_features += ['gpu-intel-dg2 && level_zero_v2_adapter']

0 commit comments

Comments
 (0)