Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit f66a122

Browse files
author
Artem Gindinson
committed
[SYCL] Rely on automatic enabling of native/emulated FP atomics
After OpenCL CPU support of SPV_EXT_shader_atomic_float_* has arrived, the compiler is switched to defining the SYCL_USE_NATIVE_FP_ATOMICS internally for non-FPGA, non-NVPTX targets. Any further compiler changes that may come after NVPTX/FPGA HW support lands will not require test change, as the guarantee will remain that correct (native or emulated) versions of FP atomic functions get emitted and executed by the HW. Signed-off-by: Artem Gindinson <[email protected]>
1 parent e572f6e commit f66a122

File tree

4 files changed

+4
-20
lines changed

4 files changed

+4
-20
lines changed

SYCL/AtomicRef/add-native.cpp renamed to SYCL/AtomicRef/add.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -DSYCL_USE_NATIVE_FP_ATOMICS \
2-
// RUN: -fsycl-targets=%sycl_triple %s -o %t.out \
1+
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out \
32
// RUN: -Xsycl-target-backend=nvptx64-nvidia-cuda-sycldevice --cuda-gpu-arch=sm_60
43
// RUN: %HOST_RUN_PLACEHOLDER %t.out
54
// RUN: %GPU_RUN_PLACEHOLDER %t.out
65
// RUN: %CPU_RUN_PLACEHOLDER %t.out
7-
// TODO: Remove items from UNSUPPORTED once corresponding backends support
8-
// "native" implementation
9-
// UNSUPPORTED: cpu
106

117
#include <CL/sycl.hpp>
128
#include <algorithm>

SYCL/AtomicRef/max-native.cpp renamed to SYCL/AtomicRef/max.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -DSYCL_USE_NATIVE_FP_ATOMICS \
2-
// RUN: -fsycl-targets=%sycl_triple %s -o %t.out
1+
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out
32
// RUN: %HOST_RUN_PLACEHOLDER %t.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t.out
54
// RUN: %CPU_RUN_PLACEHOLDER %t.out
6-
// TODO: Remove items from UNSUPPORTED once corresponding backends support
7-
// "native" implementation
8-
// UNSUPPORTED: cpu, cuda
95

106
#include <CL/sycl.hpp>
117
#include <algorithm>

SYCL/AtomicRef/min-native.cpp renamed to SYCL/AtomicRef/min.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -DSYCL_USE_NATIVE_FP_ATOMICS \
2-
// RUN: -fsycl-targets=%sycl_triple %s -o %t.out
1+
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out
32
// RUN: %HOST_RUN_PLACEHOLDER %t.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t.out
54
// RUN: %CPU_RUN_PLACEHOLDER %t.out
6-
// TODO: Remove items from UNSUPPORTED once corresponding backends support
7-
// "native" implementation
8-
// UNSUPPORTED: cpu, cuda
95

106
#include <CL/sycl.hpp>
117
#include <algorithm>

SYCL/AtomicRef/sub-native.cpp renamed to SYCL/AtomicRef/sub.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -DSYCL_USE_NATIVE_FP_ATOMICS \
2-
// RUN: -fsycl-targets=%sycl_triple %s -o %t.out \
1+
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out \
32
// RUN: -Xsycl-target-backend=nvptx64-nvidia-cuda-sycldevice --cuda-gpu-arch=sm_60
43
// RUN: %HOST_RUN_PLACEHOLDER %t.out
54
// RUN: %GPU_RUN_PLACEHOLDER %t.out
65
// RUN: %CPU_RUN_PLACEHOLDER %t.out
7-
// TODO: Remove items from UNSUPPORTED once corresponding backends support
8-
// "native" implementation
9-
// UNSUPPORTED: cpu
106

117
#include <CL/sycl.hpp>
128
#include <algorithm>

0 commit comments

Comments
 (0)