diff --git a/SYCL/ESIMD/lsc/Inputs/lsc_surf_load.hpp b/SYCL/ESIMD/lsc/Inputs/lsc_surf_load.hpp index e1454ec6bc..523b04e05b 100644 --- a/SYCL/ESIMD/lsc/Inputs/lsc_surf_load.hpp +++ b/SYCL/ESIMD/lsc/Inputs/lsc_surf_load.hpp @@ -30,8 +30,6 @@ bool test(uint32_t pmask = 0xffffffff) { } static_assert(DS != lsc_data_size::u16u32h, "D16U32h not supported in HW"); - static_assert(sizeof(T) >= 4, - "D8 and D16 are valid only in 2D block load/store"); if constexpr (!transpose && VS > 1) { static_assert(VL == 16 || VL == 32, diff --git a/SYCL/ESIMD/lsc/Inputs/lsc_surf_store.hpp b/SYCL/ESIMD/lsc/Inputs/lsc_surf_store.hpp index 142a42235a..8def84e688 100644 --- a/SYCL/ESIMD/lsc/Inputs/lsc_surf_store.hpp +++ b/SYCL/ESIMD/lsc/Inputs/lsc_surf_store.hpp @@ -29,8 +29,6 @@ bool test(uint32_t pmask = 0xffffffff) { } static_assert(DS != lsc_data_size::u16u32h, "D16U32h not supported in HW"); - static_assert(sizeof(T) >= 4, - "D8 and D16 are valid only in 2D block load/store"); if constexpr (!transpose && VS > 1) { static_assert(VL == 16 || VL == 32, diff --git a/SYCL/ESIMD/lsc/Inputs/lsc_usm_load.hpp b/SYCL/ESIMD/lsc/Inputs/lsc_usm_load.hpp index b7896c5314..e9170fa6fe 100644 --- a/SYCL/ESIMD/lsc/Inputs/lsc_usm_load.hpp +++ b/SYCL/ESIMD/lsc/Inputs/lsc_usm_load.hpp @@ -30,8 +30,6 @@ bool test(uint32_t pmask = 0xffffffff) { } static_assert(DS != lsc_data_size::u16u32h, "D16U32h not supported in HW"); - static_assert(sizeof(T) >= 4, - "D8 and D16 are valid only in 2D block load/store"); if constexpr (!transpose && VS > 1) { static_assert(VL == 16 || VL == 32, diff --git a/SYCL/ESIMD/lsc/Inputs/lsc_usm_store.hpp b/SYCL/ESIMD/lsc/Inputs/lsc_usm_store.hpp index 181bfe27a9..5be20237c9 100644 --- a/SYCL/ESIMD/lsc/Inputs/lsc_usm_store.hpp +++ b/SYCL/ESIMD/lsc/Inputs/lsc_usm_store.hpp @@ -29,8 +29,6 @@ bool test(uint32_t pmask = 0xffffffff) { } static_assert(DS != lsc_data_size::u16u32h, "D16U32h not supported in HW"); - static_assert(sizeof(T) >= 4, - "D8 and D16 are valid only in 2D block load/store"); if constexpr (!transpose && VS > 1) { static_assert(VL == 16 || VL == 32, diff --git a/SYCL/ESIMD/lsc/lsc_surf_load_u8_u16.cpp b/SYCL/ESIMD/lsc/lsc_surf_load_u8_u16.cpp new file mode 100644 index 0000000000..767a1648e2 --- /dev/null +++ b/SYCL/ESIMD/lsc/lsc_surf_load_u8_u16.cpp @@ -0,0 +1,35 @@ +//==------- lsc_surf_load_u8_u16.cpp - DPC++ ESIMD on-device test ---------==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// REQUIRES: gpu-intel-pvc || esimd_emulator +// UNSUPPORTED: cuda || hip +// RUN: %clangxx -fsycl %s -o %t.out +// RUN: %GPU_RUN_PLACEHOLDER %t.out + +#include "Inputs/lsc_surf_load.hpp" + +constexpr uint32_t seed = 199; + +template bool tests() { + bool passed = true; + passed &= test(); + passed &= test(); + passed &= test(); + + return passed; +} + +int main(void) { + srand(seed); + bool passed = true; + + passed &= tests<0, uint8_t>(); + passed &= tests<3, uint16_t>(); + + std::cout << (passed ? "Passed\n" : "FAILED\n"); + return passed ? 0 : 1; +} diff --git a/SYCL/ESIMD/lsc/lsc_surf_store_u8_u16.cpp b/SYCL/ESIMD/lsc/lsc_surf_store_u8_u16.cpp new file mode 100644 index 0000000000..74d66bd3da --- /dev/null +++ b/SYCL/ESIMD/lsc/lsc_surf_store_u8_u16.cpp @@ -0,0 +1,35 @@ +//==------- lsc_surf_store_u8_u16.cpp - DPC++ ESIMD on-device test ---------==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// REQUIRES: gpu-intel-pvc || esimd_emulator +// UNSUPPORTED: cuda || hip +// RUN: %clangxx -fsycl %s -o %t.out +// RUN: %GPU_RUN_PLACEHOLDER %t.out + +#include "Inputs/lsc_surf_store.hpp" + +constexpr uint32_t seed = 199; + +template bool tests() { + bool passed = true; + passed &= test(); + passed &= test(); + passed &= test(); + + return passed; +} + +int main(void) { + srand(seed); + bool passed = true; + + passed &= tests<0, uint8_t>(); + passed &= tests<3, uint16_t>(); + + std::cout << (passed ? "Passed\n" : "FAILED\n"); + return passed ? 0 : 1; +} diff --git a/SYCL/ESIMD/lsc/lsc_usm_load_u8_u16.cpp b/SYCL/ESIMD/lsc/lsc_usm_load_u8_u16.cpp new file mode 100644 index 0000000000..112e6f28eb --- /dev/null +++ b/SYCL/ESIMD/lsc/lsc_usm_load_u8_u16.cpp @@ -0,0 +1,35 @@ +//==------- lsc_usm_load_u8_u16.cpp - DPC++ ESIMD on-device test ---------==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// REQUIRES: gpu-intel-pvc || esimd_emulator +// UNSUPPORTED: cuda || hip +// RUN: %clangxx -fsycl %s -o %t.out +// RUN: %GPU_RUN_PLACEHOLDER %t.out + +#include "Inputs/lsc_usm_load.hpp" + +constexpr uint32_t seed = 199; + +template bool tests() { + bool passed = true; + passed &= test(); + passed &= test(); + passed &= test(); + + return passed; +} + +int main(void) { + srand(seed); + bool passed = true; + + passed &= tests<0, uint8_t>(); + passed &= tests<3, uint16_t>(); + + std::cout << (passed ? "Passed\n" : "FAILED\n"); + return passed ? 0 : 1; +} diff --git a/SYCL/ESIMD/lsc/lsc_usm_store_u8_u16.cpp b/SYCL/ESIMD/lsc/lsc_usm_store_u8_u16.cpp new file mode 100644 index 0000000000..5cfc841c11 --- /dev/null +++ b/SYCL/ESIMD/lsc/lsc_usm_store_u8_u16.cpp @@ -0,0 +1,35 @@ +//==------- lsc_usm_store_u8_u16.cpp - DPC++ ESIMD on-device test ---------==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// REQUIRES: gpu-intel-pvc || esimd_emulator +// UNSUPPORTED: cuda || hip +// RUN: %clangxx -fsycl %s -o %t.out +// RUN: %GPU_RUN_PLACEHOLDER %t.out + +#include "Inputs/lsc_usm_store.hpp" + +constexpr uint32_t seed = 199; + +template bool tests() { + bool passed = true; + passed &= test(); + passed &= test(); + passed &= test(); + + return passed; +} + +int main(void) { + srand(seed); + bool passed = true; + + passed &= tests<0, uint8_t>(); + passed &= tests<3, uint16_t>(); + + std::cout << (passed ? "Passed\n" : "FAILED\n"); + return passed ? 0 : 1; +}