From 8e987fe6f8da47bd5da1472d57fe98745c35f900 Mon Sep 17 00:00:00 2001 From: fineg74 <61437305+fineg74@users.noreply.github.com> Date: Fri, 1 Mar 2024 10:32:20 -0800 Subject: [PATCH] [SYCL][ESIMD][E2E] Enable tests on DG2 (#12847) --- sycl/test-e2e/ESIMD/lsc/lsc_surf_store_u64.cpp | 7 +++++-- sycl/test-e2e/ESIMD/lsc/lsc_surf_store_u64_stateless.cpp | 2 +- sycl/test-e2e/ESIMD/lsc/lsc_usm_atomic_cachehint.cpp | 2 +- sycl/test-e2e/ESIMD/lsc/lsc_usm_atomic_cachehint_64.cpp | 2 +- sycl/test-e2e/ESIMD/lsc/lsc_usm_gather_u64.cpp | 8 +++++--- sycl/test-e2e/ESIMD/lsc/lsc_usm_gather_u64_64.cpp | 2 +- 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/sycl/test-e2e/ESIMD/lsc/lsc_surf_store_u64.cpp b/sycl/test-e2e/ESIMD/lsc/lsc_surf_store_u64.cpp index ea5d6cf804ebf..a340edab0321c 100644 --- a/sycl/test-e2e/ESIMD/lsc/lsc_surf_store_u64.cpp +++ b/sycl/test-e2e/ESIMD/lsc/lsc_surf_store_u64.cpp @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// REQUIRES: gpu-intel-pvc +// REQUIRES: gpu-intel-pvc || gpu-intel-dg2 // RUN: %{build} -o %t.out // RUN: %{run} %t.out @@ -36,9 +36,12 @@ template bool tests() { int main(void) { srand(seed); bool passed = true; + auto Q = queue{gpu_selector_v}; passed &= tests<0, uint64_t>(); - passed &= tests<11, double>(); + if (Q.get_device().has(sycl::aspect::fp64)) { + passed &= tests<11, double>(); + } std::cout << (passed ? "Passed\n" : "FAILED\n"); return passed ? 0 : 1; diff --git a/sycl/test-e2e/ESIMD/lsc/lsc_surf_store_u64_stateless.cpp b/sycl/test-e2e/ESIMD/lsc/lsc_surf_store_u64_stateless.cpp index dba135e798c3e..a39ea4d865bbb 100644 --- a/sycl/test-e2e/ESIMD/lsc/lsc_surf_store_u64_stateless.cpp +++ b/sycl/test-e2e/ESIMD/lsc/lsc_surf_store_u64_stateless.cpp @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// REQUIRES: gpu-intel-pvc +// REQUIRES: gpu-intel-pvc || gpu-intel-dg2 // RUN: %{build} -fsycl-esimd-force-stateless-mem -o %t.out // RUN: %{run} %t.out diff --git a/sycl/test-e2e/ESIMD/lsc/lsc_usm_atomic_cachehint.cpp b/sycl/test-e2e/ESIMD/lsc/lsc_usm_atomic_cachehint.cpp index d797149205983..a6547ef539d24 100644 --- a/sycl/test-e2e/ESIMD/lsc/lsc_usm_atomic_cachehint.cpp +++ b/sycl/test-e2e/ESIMD/lsc/lsc_usm_atomic_cachehint.cpp @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// REQUIRES: gpu-intel-pvc +// REQUIRES: gpu-intel-pvc || gpu-intel-dg2 // TODO : Test uses 'kernel_bundle' that is not supported in ESIMD_EMULATOR // RUN: %{build} -o %t.out // RUN: %{run} %t.out diff --git a/sycl/test-e2e/ESIMD/lsc/lsc_usm_atomic_cachehint_64.cpp b/sycl/test-e2e/ESIMD/lsc/lsc_usm_atomic_cachehint_64.cpp index d9b07693ef028..06849c1e08876 100644 --- a/sycl/test-e2e/ESIMD/lsc/lsc_usm_atomic_cachehint_64.cpp +++ b/sycl/test-e2e/ESIMD/lsc/lsc_usm_atomic_cachehint_64.cpp @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// REQUIRES: gpu-intel-pvc +// REQUIRES: gpu-intel-pvc || gpu-intel-dg2 // TODO : Test uses 'kernel_bundle' that is not supported in ESIMD_EMULATOR // RUN: %{build} -o %t.out // RUN: %{run} %t.out diff --git a/sycl/test-e2e/ESIMD/lsc/lsc_usm_gather_u64.cpp b/sycl/test-e2e/ESIMD/lsc/lsc_usm_gather_u64.cpp index c777b897df925..b3e8516670d28 100644 --- a/sycl/test-e2e/ESIMD/lsc/lsc_usm_gather_u64.cpp +++ b/sycl/test-e2e/ESIMD/lsc/lsc_usm_gather_u64.cpp @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// REQUIRES: gpu-intel-pvc +// REQUIRES: gpu-intel-pvc || gpu-intel-dg2 // RUN: %{build} -o %t.out // RUN: %{run} %t.out @@ -13,12 +13,14 @@ int main(void) { constexpr uint32_t Seed = 185; + auto Q = queue{gpu_selector_v}; srand(Seed); bool Passed = true; Passed &= test_lsc_gather(); - Passed &= test_lsc_gather(); - + if (Q.get_device().has(sycl::aspect::fp64)) { + Passed &= test_lsc_gather(); + } std::cout << (Passed ? "Passed\n" : "FAILED\n"); return Passed ? 0 : 1; } diff --git a/sycl/test-e2e/ESIMD/lsc/lsc_usm_gather_u64_64.cpp b/sycl/test-e2e/ESIMD/lsc/lsc_usm_gather_u64_64.cpp index cb3c1518bcc85..2ee1e701de138 100644 --- a/sycl/test-e2e/ESIMD/lsc/lsc_usm_gather_u64_64.cpp +++ b/sycl/test-e2e/ESIMD/lsc/lsc_usm_gather_u64_64.cpp @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// REQUIRES: gpu-intel-pvc +// REQUIRES: gpu-intel-pvc || gpu-intel-dg2 // RUN: %{build} -o %t.out // RUN: %{run} %t.out