Skip to content

Commit 800e452

Browse files
author
Alexander Johnston
authored
[SYCL][CUDA] Update default gpu arch to SM_50 (#2032)
This fixes a couple of the atomic tests in the process. Signed-off-by: Alexander Johnston <alexander@codeplay.com>
1 parent 76bf2ed commit 800e452

File tree

4 files changed

+14
-16
lines changed

4 files changed

+14
-16
lines changed

clang/lib/Driver/Driver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4059,9 +4059,9 @@ class OffloadingActionBuilder final {
40594059
}
40604060
}
40614061

4062-
// If there are no CUDA architectures provided then default to SM_30.
4062+
// If there are no CUDA architectures provided then default to SM_50.
40634063
if (GpuArchList.empty()) {
4064-
GpuArchList.push_back(CudaArch::SM_30);
4064+
GpuArchList.push_back(CudaArch::SM_50);
40654065
}
40664066

40674067
return false;

clang/test/Driver/sycl-offload-nvptx.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,30 @@
88
// RUN: -fsycl-targets=nvptx64-nvidia-nvcl-sycldevice --cuda-path=%S/Inputs/CUDA/usr/local/cuda \
99
// RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/libspirv.bc %s 2>&1 \
1010
// RUN: | FileCheck -check-prefix=CHK-ACTIONS %s
11-
// CHK-ACTIONS: "-cc1" "-triple" "nvptx64-nvidia-nvcl-sycldevice"{{.*}} "-fsycl-is-device"{{.*}} "-aux-triple" "x86_64-unknown-linux-gnu"{{.*}} "-Wno-sycl-strict" "-sycl-std=2017" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libdevice{{.*}}.10.bc"{{.*}} "-target-feature" "+ptx42"{{.*}} "-target-sdk-version=[[CUDA_VERSION:[0-9.]+]]"{{.*}} "-target-cpu" "sm_30"{{.*}} "-std=c++11"{{.*}}
11+
// CHK-ACTIONS: "-cc1" "-triple" "nvptx64-nvidia-nvcl-sycldevice"{{.*}} "-fsycl-is-device"{{.*}} "-aux-triple" "x86_64-unknown-linux-gnu"{{.*}} "-Wno-sycl-strict" "-sycl-std=2017" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libdevice{{.*}}.10.bc"{{.*}} "-target-feature" "+ptx42"{{.*}} "-target-sdk-version=[[CUDA_VERSION:[0-9.]+]]"{{.*}} "-target-cpu" "sm_50"{{.*}} "-std=c++11"{{.*}}
1212
// CHK-ACTIONS: clang-offload-wrapper"{{.*}} "-host=x86_64-unknown-linux-gnu" "-target=nvptx64" "-kind=sycl"{{.*}}
13-
// CHK-ACTIONS: "-cc1" "-triple" "nvptx64-nvidia-nvcl-sycldevice"{{.*}} "-fsycl-is-device"{{.*}} "-aux-triple" "x86_64-unknown-linux-gnu"{{.*}} "-Wno-sycl-strict" "-sycl-std=2017" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libdevice{{.*}}.10.bc"{{.*}} "-target-feature" "+ptx42"{{.*}} "-target-sdk-version=[[CUDA_VERSION]]"{{.*}} "-target-cpu" "sm_30"{{.*}} "-std=c++11"{{.*}}
13+
// CHK-ACTIONS: "-cc1" "-triple" "nvptx64-nvidia-nvcl-sycldevice"{{.*}} "-fsycl-is-device"{{.*}} "-aux-triple" "x86_64-unknown-linux-gnu"{{.*}} "-Wno-sycl-strict" "-sycl-std=2017" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libdevice{{.*}}.10.bc"{{.*}} "-target-feature" "+ptx42"{{.*}} "-target-sdk-version=[[CUDA_VERSION]]"{{.*}} "-target-cpu" "sm_50"{{.*}} "-std=c++11"{{.*}}
1414

1515
/// Check phases w/out specifying a compute capability.
1616
// RUN: %clangxx -ccc-print-phases -std=c++11 -target x86_64-unknown-linux-gnu -fsycl \
1717
// RUN: -fsycl-targets=nvptx64-nvidia-nvcl-sycldevice %s 2>&1 \
1818
// RUN: | FileCheck -check-prefix=CHK-PHASES-NO-CC %s
1919
// CHK-PHASES-NO-CC: 0: input, "{{.*}}", c++, (host-sycl)
2020
// CHK-PHASES-NO-CC: 1: preprocessor, {0}, c++-cpp-output, (host-sycl)
21-
// CHK-PHASES-NO-CC: 2: input, "{{.*}}", c++, (device-sycl, sm_30)
22-
// CHK-PHASES-NO-CC: 3: preprocessor, {2}, c++-cpp-output, (device-sycl, sm_30)
23-
// CHK-PHASES-NO-CC: 4: compiler, {3}, sycl-header, (device-sycl, sm_30)
24-
// CHK-PHASES-NO-CC: 5: offload, "host-sycl (x86_64-unknown-linux-gnu)" {1}, "device-sycl (nvptx64-nvidia-nvcl-sycldevice:sm_30)" {4}, c++-cpp-output
21+
// CHK-PHASES-NO-CC: 2: input, "{{.*}}", c++, (device-sycl, sm_50)
22+
// CHK-PHASES-NO-CC: 3: preprocessor, {2}, c++-cpp-output, (device-sycl, sm_50)
23+
// CHK-PHASES-NO-CC: 4: compiler, {3}, sycl-header, (device-sycl, sm_50)
24+
// CHK-PHASES-NO-CC: 5: offload, "host-sycl (x86_64-unknown-linux-gnu)" {1}, "device-sycl (nvptx64-nvidia-nvcl-sycldevice:sm_50)" {4}, c++-cpp-output
2525
// CHK-PHASES-NO-CC: 6: compiler, {5}, ir, (host-sycl)
2626
// CHK-PHASES-NO-CC: 7: backend, {6}, assembler, (host-sycl)
2727
// CHK-PHASES-NO-CC: 8: assembler, {7}, object, (host-sycl)
2828
// CHK-PHASES-NO-CC: 9: linker, {8}, image, (host-sycl)
29-
// CHK-PHASES-NO-CC: 10: compiler, {3}, ir, (device-sycl, sm_30)
30-
// CHK-PHASES-NO-CC: 11: linker, {10}, ir, (device-sycl, sm_30)
31-
// CHK-PHASES-NO-CC: 12: sycl-post-link, {11}, ir, (device-sycl, sm_30)
32-
// CHK-PHASES-NO-CC: 13: backend, {12}, assembler, (device-sycl, sm_30)
33-
// CHK-PHASES-NO-CC: 14: clang-offload-wrapper, {13}, object, (device-sycl, sm_30)
34-
// CHK-PHASES-NO-CC: 15: offload, "host-sycl (x86_64-unknown-linux-gnu)" {9}, "device-sycl (nvptx64-nvidia-nvcl-sycldevice:sm_30)" {14}, image
29+
// CHK-PHASES-NO-CC: 10: compiler, {3}, ir, (device-sycl, sm_50)
30+
// CHK-PHASES-NO-CC: 11: linker, {10}, ir, (device-sycl, sm_50)
31+
// CHK-PHASES-NO-CC: 12: sycl-post-link, {11}, ir, (device-sycl, sm_50)
32+
// CHK-PHASES-NO-CC: 13: backend, {12}, assembler, (device-sycl, sm_50)
33+
// CHK-PHASES-NO-CC: 14: clang-offload-wrapper, {13}, object, (device-sycl, sm_50)
34+
// CHK-PHASES-NO-CC: 15: offload, "host-sycl (x86_64-unknown-linux-gnu)" {9}, "device-sycl (nvptx64-nvidia-nvcl-sycldevice:sm_50)" {14}, image
3535

3636
/// Check phases specifying a compute capability.
3737
// RUN: %clangxx -ccc-print-phases -std=c++11 -target x86_64-unknown-linux-gnu -fsycl \

sycl/test/atomic_ref/max.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t.out
5-
// XFAIL: cuda
65

76
#include <CL/sycl.hpp>
87
#include <algorithm>

sycl/test/atomic_ref/min.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t.out
5-
// XFAIL: cuda
65

76
#include <CL/sycl.hpp>
87
#include <algorithm>

0 commit comments

Comments
 (0)