Skip to content

Commit c51ca91

Browse files
[SYCL][E2E] Expand fp64 emulation testing (#16259)
Updated the test to cover more HW so that there is a less change that we will simply skip it. Note that FP64 emulation is only enabled by default on DG2. Therefore, we include HW which natively supports `fp64`, but can't include any HW without `fp64` support except for DG2 unless we tweak the environment to force-enable emulation on those platforms.
1 parent 06e5737 commit c51ca91

File tree

2 files changed

+38
-5
lines changed

2 files changed

+38
-5
lines changed

sycl/test-e2e/OptionalKernelFeatures/fp64-conv-emu-1.cpp

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
1-
// REQUIRES: ocloc, gpu, linux, arch-intel_gpu_dg2_g10
1+
// -fsycl-fp64-conv-emu is not a language feature, but an implementation
2+
// feature that is only available for Intel GPUs. In this test we recreate a
3+
// user-provided scenario of a kernel which only uses double for conversions
4+
// (the only thing which can be emulated) to make sure that both compilation
5+
// and execution of such scenario works fine on different HW (w/ and w/o fp64
6+
// support).
7+
//
8+
// REQUIRES: ocloc
9+
//
10+
// We require a certain HW here, because we specifically want to exercise AOT
11+
// compilation and not JIT fallback. However, to make this test run in more
12+
// environments (and therefore cover more scenarios), the list of HW is bigger
13+
// than just a single target.
14+
//
15+
// REQUIRES: arch-intel_gpu_dg2_g10 || arch-intel_gpu_dg2_g11 || arch-intel_gpu_dg2_g12 || arch-intel_gpu_pvc || arch-intel_gpu_mtl_h || arch-intel_gpu_mtl_u
16+
//
217
// UNSUPPORTED: cuda, hip
318
// UNSUPPORTED-REASON: FP64 emulation is an Intel specific feature.
419

5-
// RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_dg2_g10 -fsycl-fp64-conv-emu -O0 %s -o %t_opt.out
6-
// RUN: %{run} %t_opt.out
20+
// RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_dg2_g10,intel_gpu_dg2_g11,intel_gpu_dg2_g12,intel_gpu_pvc,intel_gpu_mtl_h,intel_gpu_mtl_u -fsycl-fp64-conv-emu -O0 %s -o %t.out
21+
// RUN: %{run} %t.out
722

823
// Tests that aspect::fp64 is not emitted correctly when -fsycl-fp64-conv-emu
924
// flag is used.

sycl/test-e2e/OptionalKernelFeatures/fp64-conv-emu-2.cpp

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
1-
// REQUIRES: ocloc, linux, arch-intel_gpu_dg2_g10
1+
// -fsycl-fp64-conv-emu is not a language feature, but an implementation
2+
// feature that is only available for Intel GPUs. In this test we recreate a
3+
// user-provided scenario where an application has two kinds of kernels: ones
4+
// which require full fp64 support and ones which can be emulated.
5+
//
6+
// The test ensures that the application can be successfully AOT compiled and
7+
// ran on different HW (w/ and w/o native fp64 support), i.e. it also serves
8+
// as an integration test for two features: fp64 emulation and optional kernel
9+
// features AOT.
10+
//
11+
// REQUIRES: ocloc
12+
//
13+
// We require a certain HW here, because we specifically want to exercise AOT
14+
// compilation and not JIT fallback. However, to make this test run in more
15+
// environments (and therefore cover more scenarios), the list of HW is bigger
16+
// than just a single target.
17+
//
18+
// REQUIRES: arch-intel_gpu_dg2_g10 || arch-intel_gpu_dg2_g11 || arch-intel_gpu_dg2_g12 || arch-intel_gpu_pvc || arch-intel_gpu_mtl_h || arch-intel_gpu_mtl_u
19+
//
220
// UNSUPPORTED: cuda, hip
321
// UNSUPPORTED-REASON: FP64 emulation is an Intel specific feature.
422

5-
// RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_dg2_g10 -fsycl-fp64-conv-emu -O0 %s -o %t.out
23+
// RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_dg2_g10,intel_gpu_dg2_g11,intel_gpu_dg2_g12,intel_gpu_pvc,intel_gpu_mtl_h,intel_gpu_mtl_u -fsycl-fp64-conv-emu -O0 %s -o %t.out
624
// RUN: %{run} %t.out
725

826
#include <sycl/detail/core.hpp>

0 commit comments

Comments
 (0)