Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-hip-driver-args.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Test that driver has the correct flags for SYCL HIP compilation

// RUN: %clangxx -### %s -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=gfx1031 -fno-sycl-libspirv -nogpulib --sysroot=%S/Inputs/SYCL %s 2>&1 \
// RUN: %clangxx -### %s -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=gfx1031 -fno-sycl-libspirv -nogpulib %s 2>&1 \
// RUN: | FileCheck %s

// CHECK: sycl-post-link{{.*}} "-emit-program-metadata" {{.*}}
Expand Down
10 changes: 5 additions & 5 deletions clang/test/Driver/sycl-nvptx-link.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@

// RUN: %clang -### -resource-dir %{resource_dir} -fsycl -fsycl-targets=nvptx64-nvidia-cuda \
// RUN: -Xsycl-target-backend --cuda-gpu-arch=sm_30 \
// RUN: --sysroot=%S/Inputs/SYCL --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \
// RUN: -ccc-install-dir %S/Inputs/SYCL/bin --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \
// RUN: | FileCheck %s --check-prefixes=CHECK,LIBDEVICE30
// RUN: %clang -### -resource-dir %{resource_dir} -fsycl -fsycl-targets=nvptx64-nvidia-cuda \
// RUN: -Xsycl-target-backend --cuda-gpu-arch=sm_35 \
// RUN: --sysroot=%S/Inputs/SYCL --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \
// RUN: -ccc-install-dir %S/Inputs/SYCL/bin --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \
// RUN: | FileCheck %s --check-prefixes=CHECK,LIBDEVICE35
// RUN: %clang -### -resource-dir %{resource_dir} -fsycl -fsycl-targets=nvptx64-nvidia-cuda \
// RUN: -Xsycl-target-backend --cuda-gpu-arch=sm_50 \
// RUN: --sysroot=%S/Inputs/SYCL --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \
// RUN: -ccc-install-dir %S/Inputs/SYCL/bin --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \
// RUN: | FileCheck %s --check-prefixes=CHECK,LIBDEVICE50

// CUDA-9+ uses the same libdevice for all GPU variants
// RUN: %clang -### -resource-dir %{resource_dir} -fsycl -fsycl-targets=nvptx64-nvidia-cuda \
// RUN: -Xsycl-target-backend --cuda-gpu-arch=sm_35 \
// RUN: --sysroot=%S/Inputs/SYCL --cuda-path=%S/Inputs/CUDA_90/usr/local/cuda %s 2>&1 \
// RUN: -ccc-install-dir %S/Inputs/SYCL/bin --cuda-path=%S/Inputs/CUDA_90/usr/local/cuda %s 2>&1 \
// RUN: | FileCheck %s --check-prefixes=CHECK,LIBDEVICE10

// Check also that -nocudalib is obeyed
// RUN: %clang -### -resource-dir %{resource_dir} -fsycl -fsycl-targets=nvptx64-nvidia-cuda -nocudalib \
// RUN: -Xsycl-target-backend --cuda-gpu-arch=sm_35 \
// RUN: --sysroot=%S/Inputs/SYCL --cuda-path=%S/Inputs/CUDA_90/usr/local/cuda %s 2>&1 \
// RUN: --cuda-path=%S/Inputs/CUDA_90/usr/local/cuda %s 2>&1 \
// RUN: | FileCheck %s --check-prefixes=CHECK,NOLIBDEVICE

// First link command: ignored
Expand Down
16 changes: 8 additions & 8 deletions clang/test/Driver/sycl-offload-new-driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@
// RUN: -DTRIPLE=spir64_gen-unknown-unknown -DARCH=pvc %s
// RUN: %clangxx -### --target=x86_64-unknown-linux-gnu -fsycl \
// RUN: -fno-sycl-libspirv -fsycl-targets=amd_gpu_gfx900 \
// RUN: -nogpulib --offload-new-driver --sysroot=%S/Inputs/SYCL %s 2>&1 \
// RUN: -nogpulib --offload-new-driver %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK_ARCH \
// RUN: -DTRIPLE=amdgpu9.00-amd-amdhsa -DARCH=gfx900 %s
// RUN: %clangxx -### --target=x86_64-unknown-linux-gnu -fsycl \
// RUN: -fno-sycl-libspirv -fsycl-targets=nvidia_gpu_sm_75 \
// RUN: -nogpulib --offload-new-driver --sysroot=%S/Inputs/SYCL %s 2>&1 \
// RUN: -nogpulib --offload-new-driver %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK_ARCH \
// RUN: -DTRIPLE=nvptx64-nvidia-cuda -DARCH=sm_75 %s
// CHK_ARCH: clang{{.*}} "-triple" "[[TRIPLE]]"
Expand Down Expand Up @@ -233,20 +233,20 @@

/// Verify arch settings for nvptx and amdgcn targets
// RUN: %clangxx -fsycl -### -fsycl-targets=amdgcn-amd-amdhsa -fno-sycl-libspirv \
// RUN: -nocudalib --offload-new-driver --sysroot=%S/Inputs/SYCL \
// RUN: -nocudalib --offload-new-driver \
// RUN: -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=gfx600 \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix AMD_ARCH %s
// AMD_ARCH: llvm-offload-binary{{.*}} "--image=file={{.*}},triple=amdgpu6.00-amd-amdhsa,arch=gfx600,kind=sycl,compile-opts=--offload-arch=gfx600"

// RUN: %clangxx -fsycl -### -fsycl-targets=nvptx64-nvidia-cuda \
// RUN: -fno-sycl-libspirv -nocudalib --offload-new-driver --sysroot=%S/Inputs/SYCL %s 2>&1 \
// RUN: -fno-sycl-libspirv -nocudalib --offload-new-driver %s 2>&1 \
// RUN: | FileCheck -check-prefix NVPTX_DEF_ARCH %s
// NVPTX_DEF_ARCH: llvm-offload-binary{{.*}} "--image=file={{.*}},triple=nvptx64-nvidia-cuda,arch=sm_75,kind=sycl"

/// check for -sycl-embed-ir transmission to clang-linker-wrapper tool
// RUN: %clangxx -fsycl -### -fsycl-targets=nvptx64-nvidia-cuda \
// RUN: -fno-sycl-libspirv -nocudalib --offload-new-driver --sysroot=%S/Inputs/SYCL \
// RUN: -fno-sycl-libspirv -nocudalib --offload-new-driver \
// RUN: -fsycl-embed-ir %s 2>&1 \
// RUN: | FileCheck -check-prefix CHECK_EMBED_IR %s
// CHECK_EMBED_IR: clang-linker-wrapper{{.*}} "-sycl-embed-ir"
Expand Down Expand Up @@ -320,7 +320,7 @@
/// Verify that --cuda-path is passed to clang-linker-wrapper for SYCL offload
// RUN: %clangxx -fsycl -### -fsycl-targets=nvptx64-nvidia-cuda -fno-sycl-libspirv \
// RUN: --cuda-gpu-arch=sm_20 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s \
// RUN: --offload-new-driver --sysroot=%S/Inputs/SYCL 2>&1 \
// RUN: --offload-new-driver -ccc-install-dir %S/Inputs/SYCL/bin 2>&1 \
// RUN: | FileCheck -check-prefix NVPTX_CUDA_PATH %s
// NVPTX_CUDA_PATH: clang-linker-wrapper{{.*}}--cuda-path={{.*}}Inputs/CUDA_80/usr/local/cuda"

Expand All @@ -342,11 +342,11 @@

// Check if fsycl-targets correctly processes multiple NVidia
// and AMD GPU targets.
// RUN: %clang -### -fsycl -fsycl-targets=nvidia_gpu_sm_60,nvidia_gpu_sm_70 -fno-sycl-libspirv -nocudalib --offload-new-driver --sysroot=%S/Inputs/SYCL %s 2>&1 \
// RUN: %clang -### -fsycl -fsycl-targets=nvidia_gpu_sm_60,nvidia_gpu_sm_70 -fno-sycl-libspirv -nocudalib --offload-new-driver %s 2>&1 \
// RUN: | FileCheck -check-prefixes=CHK-MACRO-SM-60,CHK-MACRO-SM-70 %s
// CHK-MACRO-SM-60: clang{{.*}} "-fsycl-is-device"{{.*}} "-D__SYCL_TARGET_NVIDIA_GPU_SM_60__"{{.*}}
// CHK-MACRO-SM-70: clang{{.*}} "-fsycl-is-device"{{.*}} "-D__SYCL_TARGET_NVIDIA_GPU_SM_70__"{{.*}}
// RUN: %clang -### -fsycl -fsycl-targets=amd_gpu_gfx90a,amd_gpu_gfx90c -fno-sycl-libspirv -nogpulib --offload-new-driver --sysroot=%S/Inputs/SYCL %s 2>&1 \
// RUN: %clang -### -fsycl -fsycl-targets=amd_gpu_gfx90a,amd_gpu_gfx90c -fno-sycl-libspirv -nogpulib --offload-new-driver %s 2>&1 \
// RUN: | FileCheck -check-prefixes=CHK-MACRO-GFX90A,CHK-MACRO-GFX90C %s
// CHK-MACRO-GFX90A: clang{{.*}} "-fsycl-is-device"{{.*}} "-D__SYCL_TARGET_AMD_GPU_GFX90A__"{{.*}}
// CHK-MACRO-GFX90C: clang{{.*}} "-fsycl-is-device"{{.*}} "-D__SYCL_TARGET_AMD_GPU_GFX90C__"{{.*}}
Expand Down
Loading