diff --git a/sycl/test-e2e/OptionalKernelFeatures/fp64-conv-emu.cpp b/sycl/test-e2e/OptionalKernelFeatures/fp64-conv-emu-1.cpp similarity index 64% rename from sycl/test-e2e/OptionalKernelFeatures/fp64-conv-emu.cpp rename to sycl/test-e2e/OptionalKernelFeatures/fp64-conv-emu-1.cpp index 81934fd4d2184..28ae4c88556e2 100644 --- a/sycl/test-e2e/OptionalKernelFeatures/fp64-conv-emu.cpp +++ b/sycl/test-e2e/OptionalKernelFeatures/fp64-conv-emu-1.cpp @@ -1,7 +1,8 @@ -// REQUIRES: ocloc, gpu, linux, aspect-fp64 +// REQUIRES: ocloc, gpu, linux, arch-intel_gpu_dg2_g10 // UNSUPPORTED: cuda, hip +// UNSUPPORTED-REASON: FP64 emulation is an Intel specific feature. -// RUN: %clangxx -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend "-device pvc" -fsycl-fp64-conv-emu -O0 %s -o %t_opt.out +// RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_dg2_g10 -fsycl-fp64-conv-emu -O0 %s -o %t_opt.out // RUN: %{run} %t_opt.out // Tests that aspect::fp64 is not emitted correctly when -fsycl-fp64-conv-emu diff --git a/sycl/test-e2e/OptionalKernelFeatures/fp64-conv-emu-2.cpp b/sycl/test-e2e/OptionalKernelFeatures/fp64-conv-emu-2.cpp new file mode 100644 index 0000000000000..129dca7ec9b06 --- /dev/null +++ b/sycl/test-e2e/OptionalKernelFeatures/fp64-conv-emu-2.cpp @@ -0,0 +1,54 @@ +// REQUIRES: ocloc, linux, arch-intel_gpu_dg2_g10 +// UNSUPPORTED: cuda, hip +// UNSUPPORTED-REASON: FP64 emulation is an Intel specific feature. + +// RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_dg2_g10 -fsycl-fp64-conv-emu -O0 %s -o %t.out +// RUN: %{run} %t.out + +#include +using namespace sycl; + +template struct Increment { + T operator()(T x) const { return x + 1; } +}; + +template struct IntCastThenIncrement { + int operator()(T x) const { return static_cast(x) + 1; } +}; + +template int test(queue &q) { + double res[] = {1.}; + { + buffer buf(res, 1); + q.submit([&](handler &cgh) { + accessor acc(buf, cgh); + cgh.single_task([=] { acc[0] = Op()(acc[0]); }); + }).wait(); + } + double ref = 1.; + ref = Op()(ref); + if (res[0] != ref) { + std::cout << typeid(Op).name() << " fail: got " << res[0] << ", expected " + << ref << "\n"; + return 1; + } + return 0; +} + +int main() { + int nfail = 0; + queue q; + + nfail += test>(q); + nfail += test>(q); + nfail += test>(q); + + if (q.get_device().has(aspect::fp64)) + nfail += test>(q); + + nfail += test>(q); + + if (nfail == 0) + std::cout << "success\n"; + return nfail; +} diff --git a/sycl/test/e2e_test_requirements/no-unsupported-without-info.cpp b/sycl/test/e2e_test_requirements/no-unsupported-without-info.cpp index c49d06b0dc67d..713d1b7ff73d5 100644 --- a/sycl/test/e2e_test_requirements/no-unsupported-without-info.cpp +++ b/sycl/test/e2e_test_requirements/no-unsupported-without-info.cpp @@ -54,7 +54,7 @@ // tests to match the required format and in that case you should just update // (i.e. reduce) the number and the list below. // -// NUMBER-OF-UNSUPPORTED-WITHOUT-INFO: 382 +// NUMBER-OF-UNSUPPORTED-WITHOUT-INFO: 381 // // List of improperly UNSUPPORTED tests. // Remove the CHECK once the test has been properly UNSUPPORTED. @@ -282,7 +282,6 @@ // CHECK-NEXT: NonUniformGroups/opportunistic_group.cpp // CHECK-NEXT: NonUniformGroups/tangle_group.cpp // CHECK-NEXT: NonUniformGroups/tangle_group_algorithms.cpp -// CHECK-NEXT: OptionalKernelFeatures/fp64-conv-emu.cpp // CHECK-NEXT: OptionalKernelFeatures/is_compatible/is_compatible_with_aspects.cpp // CHECK-NEXT: OptionalKernelFeatures/large-reqd-work-group-size.cpp // CHECK-NEXT: OptionalKernelFeatures/no-fp64-optimization-declared-aspects.cpp