|
| 1 | +// Each combination of 64/32 bit atomic, relaxed/acquire/release/acq_rel |
| 2 | +// semantic order and sub_group/work_group/device/system scope is tested |
| 3 | +// separately. This is controlled by macros, defined by RUN commands. Defaults |
| 4 | +// (no macro for a group) are: 32 bit, relaxed and device. |
| 5 | + |
| 6 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 |
| 7 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 8 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 9 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 10 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 11 | + |
| 12 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 -DATOMIC64 |
| 13 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 14 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 15 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 16 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 17 | + |
| 18 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 -DWORK_GROUP |
| 19 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 20 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 21 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 22 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 23 | + |
| 24 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 -DWORK_GROUP -DATOMIC64 |
| 25 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 26 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 27 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 28 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 29 | + |
| 30 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 -DSYSTEM |
| 31 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 32 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 33 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 34 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 35 | + |
| 36 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60 -DSYSTEM -DATOMIC64 |
| 37 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 38 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 39 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 40 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 41 | + |
| 42 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 -DACQUIRE |
| 43 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 44 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 45 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 46 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 47 | + |
| 48 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 -DACQUIRE -DATOMIC64 |
| 49 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 50 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 51 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 52 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 53 | + |
| 54 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 -DACQUIRE -DWORK_GROUP |
| 55 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 56 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 57 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 58 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 59 | + |
| 60 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 -DACQUIRE -DWORK_GROUP -DATOMIC64 |
| 61 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 62 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 63 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 64 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 65 | + |
| 66 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 -DACQUIRE -DSYSTEM |
| 67 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 68 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 69 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 70 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 71 | + |
| 72 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 -DACQUIRE -DSYSTEM -DATOMIC64 |
| 73 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 74 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 75 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 76 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 77 | + |
| 78 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 -DRELEASE |
| 79 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 80 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 81 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 82 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 83 | + |
| 84 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 -DRELEASE -DATOMIC64 |
| 85 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 86 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 87 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 88 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 89 | + |
| 90 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 -DRELEASE -DWORK_GROUP |
| 91 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 92 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 93 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 94 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 95 | + |
| 96 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 -DRELEASE -DWORK_GROUP -DATOMIC64 |
| 97 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 98 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 99 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 100 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 101 | + |
| 102 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 -DRELEASE -DSYSTEM |
| 103 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 104 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 105 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 106 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 107 | + |
| 108 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 -DRELEASE -DSYSTEM -DATOMIC64 |
| 109 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 110 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 111 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 112 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 113 | + |
| 114 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 -DACQ_REL |
| 115 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 116 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 117 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 118 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 119 | + |
| 120 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 -DACQ_REL -DATOMIC64 |
| 121 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 122 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 123 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 124 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 125 | + |
| 126 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 -DACQ_REL -DWORK_GROUP |
| 127 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 128 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 129 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 130 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 131 | + |
| 132 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 -DACQ_REL -DWORK_GROUP -DATOMIC64 |
| 133 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 134 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 135 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 136 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 137 | + |
| 138 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 -DACQ_REL -DSYSTEM |
| 139 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 140 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 141 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 142 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 143 | + |
| 144 | +// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70 -DACQ_REL -DSYSTEM -DATOMIC64 |
| 145 | +// RUN: %HOST_RUN_PLACEHOLDER %t.out |
| 146 | +// RUN: %GPU_RUN_PLACEHOLDER %t.out |
| 147 | +// RUN: %CPU_RUN_PLACEHOLDER %t.out |
| 148 | +// RUN: %ACC_RUN_PLACEHOLDER %t.out |
| 149 | + |
| 150 | +// CUDA and HIP backends have had no support for the generic address space yet. |
| 151 | +// Host does not support barrier. |
| 152 | +// XFAIL: cuda || hip || host |
| 153 | + |
| 154 | +// hip, level zero and opencl do not support native floating point atomics |
| 155 | +// XFAIL: hip, level_zero, opencl |
| 156 | + |
| 157 | +#define SYCL_USE_NATIVE_FP_ATOMICS |
| 158 | +#define FP_TESTS_ONLY |
| 159 | +#define TEST_GENERIC_IN_LOCAL 1 |
| 160 | + |
| 161 | +#include "add.h" |
| 162 | + |
| 163 | +int main() { add_test_all<access::address_space::generic_space>(); } |
0 commit comments