Skip to content

Commit 8c873f7

Browse files
Guard SYCL SinKernelGraph graph mode on PVC
Co-authored-by: lukaszstolarczuk <29728779+lukaszstolarczuk@users.noreply.github.com>
1 parent 0e92e47 commit 8c873f7

2 files changed

Lines changed: 13 additions & 6 deletions

File tree

devops/scripts/benchmarks/benches/compute/compute.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,11 @@ def benchmarks(self) -> list[Benchmark]:
214214
continue
215215
if (
216216
"pvc" in device_arch
217-
and runtime == RUNTIMES.SYCL
217+
and options.ur_adapter == "level_zero_v2"
218+
and runtime in SYCL_RUNTIMES
218219
and with_graphs == 1
219220
):
220-
# PVC does not support graph record/replay for this benchmark.
221+
# PVC does not support graph record/replay for this benchmark on L0 v2.
221222
continue
222223
benches.append(
223224
GraphApiSinKernelGraph(self, runtime, with_graphs, num_kernels)

devops/scripts/benchmarks/tests/test_compute_bench.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
from options import options
88

99

10-
def _sin_kernel_graph_sycl_cases(ur_adapter: str, device_architecture: str) -> list[str]:
10+
def _sin_kernel_graph_cases(
11+
ur_adapter: str, device_architecture: str, runtime: str
12+
) -> list[str]:
1113
old_adapter = options.ur_adapter
1214
old_arch = getattr(options, "device_architecture", None)
1315
try:
@@ -16,7 +18,7 @@ def _sin_kernel_graph_sycl_cases(ur_adapter: str, device_architecture: str) -> l
1618
return [
1719
b.name()
1820
for b in ComputeBench().benchmarks()
19-
if "graph_api_benchmark_sycl SinKernelGraph graphs:1" in b.name()
21+
if f"graph_api_benchmark_{runtime} SinKernelGraph graphs:1" in b.name()
2022
]
2123
finally:
2224
options.ur_adapter = old_adapter
@@ -25,11 +27,11 @@ def _sin_kernel_graph_sycl_cases(ur_adapter: str, device_architecture: str) -> l
2527

2628
class TestComputeBench(unittest.TestCase):
2729
def test_sycl_sin_kernel_graph_mode_skipped_on_pvc(self):
28-
cases = _sin_kernel_graph_sycl_cases("level_zero_v2", "pvc")
30+
cases = _sin_kernel_graph_cases("level_zero_v2", "pvc", "sycl")
2931
self.assertFalse(cases)
3032

3133
def test_sycl_sin_kernel_graph_mode_kept_on_non_pvc(self):
32-
cases = _sin_kernel_graph_sycl_cases("level_zero_v2", "bmg")
34+
cases = _sin_kernel_graph_cases("level_zero_v2", "bmg", "sycl")
3335
self.assertEqual(
3436
sorted(cases),
3537
sorted(
@@ -40,6 +42,10 @@ def test_sycl_sin_kernel_graph_mode_kept_on_non_pvc(self):
4042
),
4143
)
4244

45+
def test_syclpreview_sin_kernel_graph_mode_skipped_on_pvc(self):
46+
cases = _sin_kernel_graph_cases("level_zero_v2", "pvc", "syclpreview")
47+
self.assertFalse(cases)
48+
4349

4450
if __name__ == "__main__":
4551
unittest.main()

0 commit comments

Comments
 (0)