diff --git a/SYCL/Basic/image/image.cpp b/SYCL/Basic/image/image.cpp index 1b48bcc541..fa11b5bdf7 100644 --- a/SYCL/Basic/image/image.cpp +++ b/SYCL/Basic/image/image.cpp @@ -1,4 +1,4 @@ -// UNSUPPORTED: hip +// UNSUPPORTED: hip || gpu-intel-pvc // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out diff --git a/SYCL/Basic/image/image_accessor_range.cpp b/SYCL/Basic/image/image_accessor_range.cpp index 92d43b7d17..ec78f64339 100755 --- a/SYCL/Basic/image/image_accessor_range.cpp +++ b/SYCL/Basic/image/image_accessor_range.cpp @@ -1,7 +1,7 @@ // FIXME: Investigate OS-agnostic failures // REQUIRES: TEMPORARY_DISABLED -// UNSUPPORTED: cuda || hip +// UNSUPPORTED: cuda || hip || gpu-intel-pvc // CUDA does not support SYCL 1.2.1 images. // // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out diff --git a/SYCL/Basic/image/image_accessor_readsampler.cpp b/SYCL/Basic/image/image_accessor_readsampler.cpp index 6470ea1d64..622b4079a0 100644 --- a/SYCL/Basic/image/image_accessor_readsampler.cpp +++ b/SYCL/Basic/image/image_accessor_readsampler.cpp @@ -1,4 +1,4 @@ -// UNSUPPORTED: cuda || hip || (windows && level_zero) +// UNSUPPORTED: cuda || hip || (windows && level_zero) || gpu-intel-pvc // unsupported on windows (level-zero) due to fail of Jenkins/pre-ci-windows // CUDA cannot support SYCL 1.2.1 images. // @@ -67,10 +67,10 @@ void checkReadSampler(char *host_ptr, s::sampler Sampler, s::cl_float4 Coord, s::accessor ReadDataBufAcc( ReadDataBuf, cgh); - cgh.single_task>([=](){ - s::cl_float4 RetColor = ReadAcc.read(Coord, Sampler); - ReadDataBufAcc[0] = RetColor; - }); + cgh.single_task>([=]() { + s::cl_float4 RetColor = ReadAcc.read(Coord, Sampler); + ReadDataBufAcc[0] = RetColor; + }); }); } validateReadData(ReadData, ExpectedColor, precision); diff --git a/SYCL/Basic/image/image_accessor_readwrite.cpp b/SYCL/Basic/image/image_accessor_readwrite.cpp index 10a6653eb1..085d2d5824 100644 --- a/SYCL/Basic/image/image_accessor_readwrite.cpp +++ b/SYCL/Basic/image/image_accessor_readwrite.cpp @@ -1,4 +1,4 @@ -// UNSUPPORTED: cuda || hip +// UNSUPPORTED: cuda || hip || gpu-intel-pvc // CUDA cannot support SYCL 1.2.1 images. // // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out @@ -106,9 +106,9 @@ void write_type_order(char *HostPtr, const s::image_channel_order ImgOrder, s::queue Queue; Queue.submit([&](s::handler &cgh) { auto WriteAcc = Img.get_access(cgh); - cgh.single_task(ImgType), 0>>([=](){ - WriteAcc.write(Coord, Color); - }); + cgh.single_task< + class kernel_class(ImgType), 0>>( + [=]() { WriteAcc.write(Coord, Color); }); }); } } @@ -129,10 +129,11 @@ void check_read_type_order(char *HostPtr, const s::image_channel_order ImgOrder, s::accessor ReadDataBufAcc( ReadDataBuf, cgh); - cgh.single_task(ImgType), 1>>([=](){ - ReadDataT RetColor = ReadAcc.read(Coord); - ReadDataBufAcc[0] = RetColor; - }); + cgh.single_task< + class kernel_class(ImgType), 1>>([=]() { + ReadDataT RetColor = ReadAcc.read(Coord); + ReadDataBufAcc[0] = RetColor; + }); }); } check_read_data(ReadData, ExpectedColor); diff --git a/SYCL/Basic/image/image_accessor_readwrite_half.cpp b/SYCL/Basic/image/image_accessor_readwrite_half.cpp index 83a9f32691..9deec2ccb1 100644 --- a/SYCL/Basic/image/image_accessor_readwrite_half.cpp +++ b/SYCL/Basic/image/image_accessor_readwrite_half.cpp @@ -1,4 +1,4 @@ -// UNSUPPORTED: cuda || hip +// UNSUPPORTED: cuda || hip || gpu-intel-pvc // CUDA cannot support SYCL 1.2.1 images. // // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out @@ -73,9 +73,9 @@ void write_type_order(char *HostPtr, const s::image_channel_order ImgOrder, s::queue Queue; Queue.submit([&](s::handler &cgh) { auto WriteAcc = Img.get_access(cgh); - cgh.single_task(ImgType), 0>>([=](){ - WriteAcc.write(Coord, Color); - }); + cgh.single_task< + class kernel_class(ImgType), 0>>( + [=]() { WriteAcc.write(Coord, Color); }); }); } } @@ -96,10 +96,11 @@ void check_read_type_order(char *HostPtr, const s::image_channel_order ImgOrder, s::accessor ReadDataBufAcc( ReadDataBuf, cgh); - cgh.single_task(ImgType), 1>>([=](){ - ReadDataT RetColor = ReadAcc.read(Coord); - ReadDataBufAcc[0] = RetColor; - }); + cgh.single_task< + class kernel_class(ImgType), 1>>([=]() { + ReadDataT RetColor = ReadAcc.read(Coord); + ReadDataBufAcc[0] = RetColor; + }); }); } check_read_data(ReadData, ExpectedColor); diff --git a/SYCL/Basic/image/image_max_size.cpp b/SYCL/Basic/image/image_max_size.cpp index 6d44181eed..efff893bcb 100644 --- a/SYCL/Basic/image/image_max_size.cpp +++ b/SYCL/Basic/image/image_max_size.cpp @@ -2,7 +2,7 @@ // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out -// UNSUPPORTED: cuda || hip || (windows && opencl && gpu) +// UNSUPPORTED: cuda || hip || (windows && opencl && gpu) || gpu-intel-pvc // CUDA does not support info::device::image3d_max_width query. // TODO: Irregular runtime fails on Windows/opencl:gpu require analysis. diff --git a/SYCL/Basic/image/image_read.cpp b/SYCL/Basic/image/image_read.cpp index 9d94a1378a..f14c833bf3 100644 --- a/SYCL/Basic/image/image_read.cpp +++ b/SYCL/Basic/image/image_read.cpp @@ -1,4 +1,4 @@ -// UNSUPPORTED: hip +// UNSUPPORTED: hip || gpu-intel-pvc // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out diff --git a/SYCL/Basic/image/image_read_fp16.cpp b/SYCL/Basic/image/image_read_fp16.cpp index beee757400..9e8b258a3a 100644 --- a/SYCL/Basic/image/image_read_fp16.cpp +++ b/SYCL/Basic/image/image_read_fp16.cpp @@ -1,4 +1,4 @@ -// UNSUPPORTED: hip +// UNSUPPORTED: hip || gpu-intel-pvc // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out diff --git a/SYCL/Basic/image/image_sample.cpp b/SYCL/Basic/image/image_sample.cpp index 1e54b8e13b..2d1171eb3f 100644 --- a/SYCL/Basic/image/image_sample.cpp +++ b/SYCL/Basic/image/image_sample.cpp @@ -2,7 +2,7 @@ // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out // Temporarily disable test on Windows due to regressions in GPU driver. -// UNSUPPORTED: hip, windows +// UNSUPPORTED: hip, windows, gpu-intel-pvc #include diff --git a/SYCL/Basic/image/image_write.cpp b/SYCL/Basic/image/image_write.cpp index d5680dd57c..8b451fb3af 100644 --- a/SYCL/Basic/image/image_write.cpp +++ b/SYCL/Basic/image/image_write.cpp @@ -2,7 +2,7 @@ // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out -// UNSUPPORTED: cuda || hip +// UNSUPPORTED: cuda || hip || gpu-intel-pvc // TODO: re-enable on cuda device. // See https://github.com/intel/llvm/issues/1542#issuecomment-707877817 for more // details. diff --git a/SYCL/Basic/image/image_write_fp16.cpp b/SYCL/Basic/image/image_write_fp16.cpp index 559cae990c..c9ca4b0feb 100644 --- a/SYCL/Basic/image/image_write_fp16.cpp +++ b/SYCL/Basic/image/image_write_fp16.cpp @@ -1,4 +1,4 @@ -// UNSUPPORTED: hip || cuda +// UNSUPPORTED: hip || cuda || gpu-intel-pvc // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out diff --git a/SYCL/ESIMD/histogram.cpp b/SYCL/ESIMD/histogram.cpp index c34bcb4dee..0b7aed43ef 100644 --- a/SYCL/ESIMD/histogram.cpp +++ b/SYCL/ESIMD/histogram.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// // REQUIRES: gpu -// UNSUPPORTED: cuda || hip +// UNSUPPORTED: cuda || hip || gpu-intel-pvc // RUN: %clangxx -fsycl %s -o %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out diff --git a/SYCL/ESIMD/histogram_2d.cpp b/SYCL/ESIMD/histogram_2d.cpp index b2555a212b..597054f391 100644 --- a/SYCL/ESIMD/histogram_2d.cpp +++ b/SYCL/ESIMD/histogram_2d.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// // REQUIRES: gpu -// UNSUPPORTED: cuda || hip +// UNSUPPORTED: cuda || hip || gpu-intel-pvc // RUN: %clangxx -fsycl %s -o %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out diff --git a/SYCL/ESIMD/histogram_raw_send.cpp b/SYCL/ESIMD/histogram_raw_send.cpp index eedc2df141..fcb4f24096 100644 --- a/SYCL/ESIMD/histogram_raw_send.cpp +++ b/SYCL/ESIMD/histogram_raw_send.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// // REQUIRES: gpu-intel-gen9 -// UNSUPPORTED: gpu-intel-dg1,gpu-intel-dg2,cuda,hip +// UNSUPPORTED: gpu-intel-dg1,gpu-intel-dg2,cuda,hip, gpu-intel-pvc // UNSUPPORTED: ze_debug-1,ze_debug4 // RUN: %clangxx -fsycl %s -o %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out diff --git a/SYCL/ESIMD/linear/linear.cpp b/SYCL/ESIMD/linear/linear.cpp index 8892c0741b..a4bcbf34de 100644 --- a/SYCL/ESIMD/linear/linear.cpp +++ b/SYCL/ESIMD/linear/linear.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// // REQUIRES: gpu -// UNSUPPORTED: cuda || hip +// UNSUPPORTED: cuda || hip || gpu-intel-pvc // RUN: %clangxx -fsycl %s -I%S/.. -o %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out %S/linear_in.bmp %S/linear_gold_hw.bmp diff --git a/SYCL/ESIMD/mandelbrot/mandelbrot.cpp b/SYCL/ESIMD/mandelbrot/mandelbrot.cpp index 0267597713..33eea39d32 100644 --- a/SYCL/ESIMD/mandelbrot/mandelbrot.cpp +++ b/SYCL/ESIMD/mandelbrot/mandelbrot.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // REQUIRES: gpu -// UNSUPPORTED: cuda || hip +// UNSUPPORTED: cuda || hip || gpu-intel-pvc // RUN: %clangxx -fsycl %s -I%S/.. -o %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out %T/output.ppm %S/golden_hw.ppm diff --git a/SYCL/ESIMD/mandelbrot/mandelbrot_spec.cpp b/SYCL/ESIMD/mandelbrot/mandelbrot_spec.cpp index a0b77853c6..8b3f6d3161 100644 --- a/SYCL/ESIMD/mandelbrot/mandelbrot_spec.cpp +++ b/SYCL/ESIMD/mandelbrot/mandelbrot_spec.cpp @@ -8,7 +8,7 @@ // TODO enable on Windows // REQUIRES: linux && gpu -// UNSUPPORTED: cuda || hip +// UNSUPPORTED: cuda || hip || gpu-intel-pvc // TODO online_compiler check fails for esimd_emulator // XFAIL: esimd_emulator // RUN: %clangxx -fsycl %s -I%S/.. -o %t.out diff --git a/SYCL/ESIMD/matrix_transpose2.cpp b/SYCL/ESIMD/matrix_transpose2.cpp index 00dd924a9d..81d0d758ff 100644 --- a/SYCL/ESIMD/matrix_transpose2.cpp +++ b/SYCL/ESIMD/matrix_transpose2.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // FIXME: Investigate Windows-specific failures // REQUIRES: TEMPORARY_DISABLED -// UNSUPPORTED: cuda || hip +// UNSUPPORTED: cuda || hip || gpu-intel-pvc // TODO: esimd_emulator fails due to outdated __esimd_media_ld // XFAIL: esimd_emulator // RUN: %clangxx -fsycl %s -o %t.out diff --git a/SYCL/ESIMD/vadd_2d.cpp b/SYCL/ESIMD/vadd_2d.cpp index cc40bec6bf..7f9f7eeab3 100644 --- a/SYCL/ESIMD/vadd_2d.cpp +++ b/SYCL/ESIMD/vadd_2d.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// // REQUIRES: gpu -// UNSUPPORTED: cuda || hip +// UNSUPPORTED: cuda || hip || gpu-intel-pvc // RUN: %clangxx -fsycl %s -o %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out diff --git a/SYCL/Plugin/enqueue-arg-order-image.cpp b/SYCL/Plugin/enqueue-arg-order-image.cpp index 8329792b2e..6975f4aab1 100644 --- a/SYCL/Plugin/enqueue-arg-order-image.cpp +++ b/SYCL/Plugin/enqueue-arg-order-image.cpp @@ -1,4 +1,4 @@ -// UNSUPPORTED: hip +// UNSUPPORTED: hip, gpu-intel-pvc // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // Native images are created with host pointers only with host unified memory // support, enforce it for this test. diff --git a/SYCL/Plugin/interop-level-zero-interop-task-mem.cpp b/SYCL/Plugin/interop-level-zero-interop-task-mem-buffer.cpp similarity index 78% rename from SYCL/Plugin/interop-level-zero-interop-task-mem.cpp rename to SYCL/Plugin/interop-level-zero-interop-task-mem-buffer.cpp index ee9ff55f6a..cd7631512a 100644 --- a/SYCL/Plugin/interop-level-zero-interop-task-mem.cpp +++ b/SYCL/Plugin/interop-level-zero-interop-task-mem-buffer.cpp @@ -2,8 +2,7 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %level_zero_options %s -o %t.out // RUN: env SYCL_BE=PI_LEVEL_ZERO %GPU_RUN_PLACEHOLDER %t.out -// Test for Level Zero interop_task. - +// Test for Level Zero interop_task for buffer. // Level-Zero #include #include @@ -20,8 +19,6 @@ int main() { try { buffer buffer(SIZE); - image<2> image(image_channel_order::rgba, image_channel_type::fp32, - {SIZE, SIZE}); ze_context_handle_t ze_context = get_native(queue.get_context()); @@ -29,7 +26,6 @@ int main() { queue .submit([&](handler &cgh) { auto buffer_acc = buffer.get_access(cgh); - auto image_acc = image.get_access(cgh); cgh.interop_task([=](const interop_handler &ih) { void *device_ptr = ih.get_mem(buffer_acc); @@ -37,10 +33,6 @@ int main() { ze_result_t res = zeMemGetAllocProperties( ze_context, device_ptr, &memAllocProperties, nullptr); assert(res == ZE_RESULT_SUCCESS); - - ze_image_handle_t ze_image = - ih.get_mem(image_acc); - assert(ze_image != nullptr); }); }) .wait(); diff --git a/SYCL/Plugin/interop-level-zero-interop-task-mem-image.cpp b/SYCL/Plugin/interop-level-zero-interop-task-mem-image.cpp new file mode 100644 index 0000000000..563bfaab9c --- /dev/null +++ b/SYCL/Plugin/interop-level-zero-interop-task-mem-image.cpp @@ -0,0 +1,47 @@ +// REQUIRES: level_zero, level_zero_dev_kit +// UNSUPPORTED: gpu-intel-pvc +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %level_zero_options %s -o %t.out +// RUN: env SYCL_BE=PI_LEVEL_ZERO %GPU_RUN_PLACEHOLDER %t.out + +// Test for Level Zero interop_task for image. +// Level-Zero +#include +#include +// SYCL +#include +#include + +using namespace sycl; + +constexpr size_t SIZE = 16; + +int main() { + queue queue{}; + + try { + image<2> image(image_channel_order::rgba, image_channel_type::fp32, + {SIZE, SIZE}); + + ze_context_handle_t ze_context = + get_native(queue.get_context()); + + queue + .submit([&](handler &cgh) { + auto image_acc = image.get_access(cgh); + cgh.interop_task([=](const interop_handler &ih) { + ze_image_handle_t ze_image = + ih.get_mem(image_acc); + assert(ze_image != nullptr); + }); + }) + .wait(); + } catch (exception const &e) { + std::cout << "SYCL exception caught: " << e.what() << std::endl; + return e.get_cl_code(); + } catch (const char *msg) { + std::cout << "Exception caught: " << msg << std::endl; + return 1; + } + + return 0; +} diff --git a/SYCL/Tracing/image_printers.cpp b/SYCL/Tracing/image_printers.cpp index 199db1eb92..076ff5c6c5 100644 --- a/SYCL/Tracing/image_printers.cpp +++ b/SYCL/Tracing/image_printers.cpp @@ -3,7 +3,7 @@ // RUN: %GPU_RUN_PLACEHOLDER %t.out // // Unsupported hip call on AMD -// UNSUPPORTED: hip_amd +// UNSUPPORTED: hip_amd, gpu-intel-pvc // Test image-specific printers of the Plugin Interace //