diff --git a/sycl/test/aot/gpu.cpp b/sycl/test/aot/gpu.cpp index ee81bba768143..32d0ac474188b 100644 --- a/sycl/test/aot/gpu.cpp +++ b/sycl/test/aot/gpu.cpp @@ -1,9 +1,11 @@ // REQUIRES: ocloc, gpu +// UNSUPPORTED: cuda +// CUDA is not compatible with SPIR. // RUN: %clangxx -fsycl -fsycl-targets=spir64_gen-unknown-unknown-sycldevice -Xsycl-target-backend=spir64_gen-unknown-unknown-sycldevice "-device skl" %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out -// XFAIL: cuda + //==----- gpu.cpp - AOT compilation for gen devices using GEN compiler ------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/sycl/test/aot/multiple-devices.cpp b/sycl/test/aot/multiple-devices.cpp index d516c5cd443b5..0bea3d89ea08a 100644 --- a/sycl/test/aot/multiple-devices.cpp +++ b/sycl/test/aot/multiple-devices.cpp @@ -7,6 +7,8 @@ //===------------------------------------------------------------------------===// // REQUIRES: opencl-aot, ocloc, aoc, cpu, gpu, accelerator +// UNSUPPORTED: cuda +// CUDA is not compatible with SPIR. // 1-command compilation case // Targeting CPU, GPU, FPGA diff --git a/sycl/test/backend/cuda/primary_context.cpp b/sycl/test/backend/cuda/primary_context.cpp index d02b4bca35f60..322c1593e5c33 100644 --- a/sycl/test/backend/cuda/primary_context.cpp +++ b/sycl/test/backend/cuda/primary_context.cpp @@ -1,5 +1,5 @@ // REQUIRES: cuda -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -I%opencl_include_dir -I%cuda_toolkit_include -o %t.out -lcuda -lsycl +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -I%opencl_include_dir -I%cuda_toolkit_include -I%sycl_plugins_dir/cuda -o %t.out -lcuda -lsycl // RUN: env SYCL_DEVICE_TYPE=GPU %t.out // NOTE: OpenCL is required for the runtime, even when using the CUDA BE. @@ -11,24 +11,14 @@ // //===----------------------------------------------------------------------===// +#include "../../helpers.hpp" #include -#include #include #include +#include using namespace cl::sycl; -void check(bool condition, const char *conditionString, const char *filename, - const long line) noexcept { - if (!condition) { - std::cerr << "CHECK failed in " << filename << "#" << line << " " - << conditionString << "\n"; - std::abort(); - } -} - -#define CHECK(CONDITION) check(CONDITION, #CONDITION, __FILE__, __LINE__) - bool isCudaDevice(const device &dev) { const platform platform = dev.get_info(); const std::string platformVersion = diff --git a/sycl/test/basic_tests/boolean.cpp b/sycl/test/basic_tests/boolean.cpp index 041cf492786d4..cac65ddaa80bd 100644 --- a/sycl/test/basic_tests/boolean.cpp +++ b/sycl/test/basic_tests/boolean.cpp @@ -3,8 +3,6 @@ // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out -// XFAIL: cuda -// TODO: investigate incorrect results on cuda backend #include #include diff --git a/sycl/test/basic_tests/buffer/buffer_full_copy.cpp b/sycl/test/basic_tests/buffer/buffer_full_copy.cpp index f729f8d6d96a4..86f738c8bf184 100644 --- a/sycl/test/basic_tests/buffer/buffer_full_copy.cpp +++ b/sycl/test/basic_tests/buffer/buffer_full_copy.cpp @@ -1,3 +1,6 @@ +// XFAIL: cuda +// TODO: Fix fail for CUDA. +// // RUN: %clangxx %s -o %t1.out -lsycl // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t2.out @@ -6,9 +9,6 @@ // RUN: %GPU_RUN_PLACEHOLDER %t2.out // RUN: %ACC_RUN_PLACEHOLDER %t2.out -// TODO: cuda_piEnqueueMemBufferCopy not implemented -// XFAIL: cuda - //==------------- buffer_full_copy.cpp - SYCL buffer basic test ------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/sycl/test/basic_tests/buffer/subbuffer.cpp b/sycl/test/basic_tests/buffer/subbuffer.cpp index 6014fa716d400..929a412321c01 100644 --- a/sycl/test/basic_tests/buffer/subbuffer.cpp +++ b/sycl/test/basic_tests/buffer/subbuffer.cpp @@ -1,11 +1,11 @@ -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out +// XFAIL: cuda +// TODO: Fix fail for CUDA. +// +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out -// XFAIL: cuda -// TODO: cuda fail due to unimplemented param_name 4121 in cuda_piDeviceGetInfo - //==---------- subbuffer.cpp --- sub-buffer basic test ---------------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/sycl/test/basic_tests/buffer/subbuffer_interop.cpp b/sycl/test/basic_tests/buffer/subbuffer_interop.cpp index 092eda64f7df6..90ae13b1fdf0b 100644 --- a/sycl/test/basic_tests/buffer/subbuffer_interop.cpp +++ b/sycl/test/basic_tests/buffer/subbuffer_interop.cpp @@ -1,10 +1,10 @@ +// REQUIRES: opencl +// // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -L %opencl_libs_dir -lOpenCL // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out -// REQUIRES: opencl - //==------------ subbuffer_interop.cpp - SYCL buffer basic test ------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/sycl/test/basic_tests/event.cpp b/sycl/test/basic_tests/event.cpp index af4f8b1bbaaf3..16145ddf3bc5b 100644 --- a/sycl/test/basic_tests/event.cpp +++ b/sycl/test/basic_tests/event.cpp @@ -1,3 +1,5 @@ +// REQUIRES: opencl +// // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -L %opencl_libs_dir -lOpenCL // RUN: env SYCL_DEVICE_TYPE=HOST %t.out //==--------------- event.cpp - SYCL event test ----------------------------==// diff --git a/sycl/test/basic_tests/image_api.cpp b/sycl/test/basic_tests/image_api.cpp index 4e7976311416d..3c2acf9acc0c1 100644 --- a/sycl/test/basic_tests/image_api.cpp +++ b/sycl/test/basic_tests/image_api.cpp @@ -1,3 +1,5 @@ +// REQUIRES: opencl +// // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -I %sycl_source_dir %s -o %t1.out // RUN: %clangxx -I %sycl_source_dir %s -o %t3.out -lsycl // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out diff --git a/sycl/test/basic_tests/kernel_info.cpp b/sycl/test/basic_tests/kernel_info.cpp index 541892023ba24..6c50968cee77f 100644 --- a/sycl/test/basic_tests/kernel_info.cpp +++ b/sycl/test/basic_tests/kernel_info.cpp @@ -11,21 +11,11 @@ // //===----------------------------------------------------------------------===// +#include "../helpers.hpp" #include using namespace cl::sycl; -void check(bool condition, const char *conditionString, const char *filename, - const long line) noexcept { - if (!condition) { - std::cerr << "CHECK failed in " << filename << "#" << line << " " - << conditionString << "\n"; - std::abort(); - } -} - -#define CHECK(CONDITION) check(CONDITION, #CONDITION, __FILE__, __LINE__) - int main() { queue q; @@ -64,4 +54,4 @@ int main() { const cl_ulong prvMemSize = krn.get_work_group_info(dev); CHECK(prvMemSize == 0); -} \ No newline at end of file +} diff --git a/sycl/test/basic_tests/kernel_interop.cpp b/sycl/test/basic_tests/kernel_interop.cpp index 5e24cd66d058d..0916b5b278906 100644 --- a/sycl/test/basic_tests/kernel_interop.cpp +++ b/sycl/test/basic_tests/kernel_interop.cpp @@ -1,10 +1,10 @@ +// REQUIRES: opencl +// // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -L %opencl_libs_dir -lOpenCL // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out -// REQUIRES: opencl - //==--------------- kernel_interop.cpp - SYCL kernel ocl interop test ------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/sycl/test/basic_tests/parallel_for_range.cpp b/sycl/test/basic_tests/parallel_for_range.cpp index 106cdb31419a1..6ada54399b1f7 100644 --- a/sycl/test/basic_tests/parallel_for_range.cpp +++ b/sycl/test/basic_tests/parallel_for_range.cpp @@ -1,8 +1,10 @@ -// RUN: %clangxx -fsycl %s -o %t.out +// XFAIL: cuda +// CUDA exposes broken hierarchical parallelism. + +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out -// XFAIL: cuda #include diff --git a/sycl/test/fpga_tests/fpga_pipes.cpp b/sycl/test/fpga_tests/fpga_pipes.cpp index 8dc6dab9c4f4b..1eba903d9972e 100644 --- a/sycl/test/fpga_tests/fpga_pipes.cpp +++ b/sycl/test/fpga_tests/fpga_pipes.cpp @@ -3,7 +3,7 @@ // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out -// UNSUPPORTED: cuda + //==------------- fpga_pipes.cpp - SYCL FPGA pipes test --------------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/sycl/test/fpga_tests/fpga_queue.cpp b/sycl/test/fpga_tests/fpga_queue.cpp index f9f4a3a72b98b..e9379ec9ad485 100644 --- a/sycl/test/fpga_tests/fpga_queue.cpp +++ b/sycl/test/fpga_tests/fpga_queue.cpp @@ -1,9 +1,11 @@ +// REQUIRES: opencl +// // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -L %opencl_libs_dir -lOpenCL // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out -// UNSUPPORTED: cuda + //==------------- fpga_queue.cpp - SYCL FPGA queues test -------------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/sycl/test/function-pointers/fp-as-kernel-arg.cpp b/sycl/test/function-pointers/fp-as-kernel-arg.cpp index 5a5c350a71aaa..034635e5b46b8 100644 --- a/sycl/test/function-pointers/fp-as-kernel-arg.cpp +++ b/sycl/test/function-pointers/fp-as-kernel-arg.cpp @@ -1,11 +1,13 @@ +// UNSUPPORTED: windows +// UNSUPPORTED: cuda +// CUDA does not support the function pointer as kernel argument extension. + // RUN: %clangxx -Xclang -fsycl-allow-func-ptr -std=c++14 -fsycl %s -o %t.out -L %opencl_libs_dir -lOpenCL // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out // FIXME: This test should use runtime early exit once correct check for // corresponding extension is implemented -// UNSUPPORTED: windows -// XFAIL: cuda #include diff --git a/sycl/test/function-pointers/pass-fp-through-buffer.cpp b/sycl/test/function-pointers/pass-fp-through-buffer.cpp index 744ff30caaa9a..3b3cf9f26faa1 100644 --- a/sycl/test/function-pointers/pass-fp-through-buffer.cpp +++ b/sycl/test/function-pointers/pass-fp-through-buffer.cpp @@ -1,11 +1,13 @@ +// UNSUPPORTED: windows +// UNSUPPORTED: cuda +// CUDA does not support the function pointer as kernel argument extension. + // RUN: %clangxx -Xclang -fsycl-allow-func-ptr -std=c++14 -fsycl %s -o %t.out -L %opencl_libs_dir -lOpenCL // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out // FIXME: This test should use runtime early exit once correct check for // corresponding extension is implemented -// UNSUPPORTED: windows -// XFAIL: cuda #include diff --git a/sycl/test/hier_par/hier_par_wgscope.cpp b/sycl/test/hier_par/hier_par_wgscope.cpp index ae346a1789547..637e22eb707f3 100644 --- a/sycl/test/hier_par/hier_par_wgscope.cpp +++ b/sycl/test/hier_par/hier_par_wgscope.cpp @@ -18,8 +18,8 @@ // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out +// XFAIL: cuda // TODO: ptxas fatal : Unresolved extern function '__spirv_ControlBarrier' -// UNSUPPORTED: cuda // This test checks correctness of hierarchical kernel execution when there is // code and data in the work group scope. diff --git a/sycl/test/kernel_from_file/hw.cpp b/sycl/test/kernel_from_file/hw.cpp index 9f9417ac1eaa1..f2987b7db71c2 100644 --- a/sycl/test/kernel_from_file/hw.cpp +++ b/sycl/test/kernel_from_file/hw.cpp @@ -1,3 +1,6 @@ +// UNSUPPORTED: cuda +// CUDA does not support SPIR-V. + //-fsycl-targets=%sycl_triple // RUN: %clangxx -fsycl-device-only -fno-sycl-use-bitcode -Xclang -fsycl-int-header=%t.h -c %s -o %t.spv // RUN: %clangxx -include %t.h -g %s -o %t.out -lsycl @@ -6,9 +9,6 @@ // TODO: InvalidTargetTriple: Expects spir-unknown-unknown or spir64-unknown-unknown. Actual target triple is x86_64-unknown-linux-gnu -// XFAIL: cuda -// Currently unsupported on cuda as this test specifically tests a SPV path. - #include #include diff --git a/sycl/test/linear_id/linear-sub_group.cpp b/sycl/test/linear_id/linear-sub_group.cpp index ba50b0e592777..2b3f75ae2182e 100644 --- a/sycl/test/linear_id/linear-sub_group.cpp +++ b/sycl/test/linear_id/linear-sub_group.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl %s -o %t.out +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out diff --git a/sycl/test/linear_id/opencl-interop.cpp b/sycl/test/linear_id/opencl-interop.cpp index 98df80f531374..7d24fdf39ebbc 100644 --- a/sycl/test/linear_id/opencl-interop.cpp +++ b/sycl/test/linear_id/opencl-interop.cpp @@ -3,7 +3,7 @@ // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out // REQUIRES: opencl -// UNSUPPORTED: cuda + //==---------------- opencl-interop.cpp - SYCL linear id test --------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/sycl/test/lit.cfg.py b/sycl/test/lit.cfg.py index 18cf02cd52745..1bec6219f869a 100644 --- a/sycl/test/lit.cfg.py +++ b/sycl/test/lit.cfg.py @@ -69,8 +69,9 @@ config.substitutions.append( ('%sycl_libs_dir', config.sycl_libs_dir ) ) config.substitutions.append( ('%sycl_include', config.sycl_include ) ) -config.substitutions.append( ('%opencl_libs_dir', config.opencl_libs_dir) ) config.substitutions.append( ('%sycl_source_dir', config.sycl_source_dir) ) +config.substitutions.append( ('%sycl_plugins_dir', config.sycl_plugins_dir) ) +config.substitutions.append( ('%opencl_libs_dir', config.opencl_libs_dir) ) config.substitutions.append( ('%opencl_include_dir', config.opencl_include_dir) ) config.substitutions.append( ('%cuda_toolkit_include', config.cuda_toolkit_include) ) diff --git a/sycl/test/lit.site.cfg.py.in b/sycl/test/lit.site.cfg.py.in index 4ce4d38cdc914..601a30a5626ca 100644 --- a/sycl/test/lit.site.cfg.py.in +++ b/sycl/test/lit.site.cfg.py.in @@ -3,15 +3,16 @@ import sys config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" -config.sycl_tools_dir = lit_config.params.get('SYCL_TOOLS_DIR', "@LLVM_TOOLS_DIR@") config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@" +config.sycl_tools_dir = lit_config.params.get('SYCL_TOOLS_DIR', "@LLVM_TOOLS_DIR@") config.sycl_include = lit_config.params.get('SYCL_INCLUDE', "@SYCL_INCLUDE@") config.sycl_obj_root = "@SYCL_BINARY_DIR@" config.sycl_source_dir = "@SYCL_SOURCE_DIR@/source" -config.opencl_libs_dir = os.path.dirname("@OpenCL_LIBRARIES@") config.sycl_libs_dir = lit_config.params.get('SYCL_LIBS_DIR', "@LLVM_LIBS_DIR@") +config.sycl_plugins_dir = "@sycl_plugin_dir@" config.target_triple = "@TARGET_TRIPLE@" config.host_triple = "@LLVM_HOST_TRIPLE@" +config.opencl_libs_dir = os.path.dirname("@OpenCL_LIBRARIES@") config.opencl_include_dir = "@OpenCL_INCLUDE_DIR@" config.cuda_toolkit_include = "@CUDA_TOOLKIT_INCLUDE@" diff --git a/sycl/test/ordered_queue/ordered_queue.cpp b/sycl/test/ordered_queue/ordered_queue.cpp index 442b8db358594..b2f055d88e7c4 100644 --- a/sycl/test/ordered_queue/ordered_queue.cpp +++ b/sycl/test/ordered_queue/ordered_queue.cpp @@ -1,3 +1,5 @@ +// REQUIRES: opencl +// // RUN: %clangxx -fsycl %s -o %t.out -L %opencl_libs_dir -lOpenCL // RUN: env SYCL_DEVICE_TYPE=HOST %t.out //==---------- ordered_queue.cpp - SYCL ordered queue test -----------------==// diff --git a/sycl/test/ordered_queue/prop.cpp b/sycl/test/ordered_queue/prop.cpp index 733a121067e0a..c2667d66a3fce 100644 --- a/sycl/test/ordered_queue/prop.cpp +++ b/sycl/test/ordered_queue/prop.cpp @@ -1,4 +1,6 @@ -// RUN: %clangxx -fsycl %s -o %t1.out -L %opencl_libs_dir -lOpenCL +// REQUIRES: opencl +// +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out -L %opencl_libs_dir -lOpenCL // RUN: %CPU_RUN_PLACEHOLDER %t1.out // RUN: %GPU_RUN_PLACEHOLDER %t1.out diff --git a/sycl/test/program_manager/env_vars.cpp b/sycl/test/program_manager/env_vars.cpp index e747eab855e12..d469bf666e3bc 100644 --- a/sycl/test/program_manager/env_vars.cpp +++ b/sycl/test/program_manager/env_vars.cpp @@ -1,4 +1,7 @@ -// RUN: %clangxx -O0 -fsycl %s -o %t.out -lsycl +// REQUIRES: opencl +// Env vars are used to pass OpenCL-specific flags to PI compiling/linking. +// +// RUN: %clangxx -O0 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -lsycl // // Deprecated SYCL_PROGRAM_BUILD_OPTIONS should work as an alias to // SYCL_PROGRAM_COMPILE_OPTIONS: diff --git a/sycl/test/regression/image_access.cpp b/sycl/test/regression/image_access.cpp index 9c11b787c78f8..aa9303559c422 100644 --- a/sycl/test/regression/image_access.cpp +++ b/sycl/test/regression/image_access.cpp @@ -5,11 +5,8 @@ // TODO: For now PI checks are skipped for ACC device. To decide if it's good. // RUN: env %ACC_RUN_PLACEHOLDER %t.out -// TODO: No CUDA image support -// XFAIL: cuda - -// TODO: No CUDA image support -// XFAIL: cuda +// UNSUPPORTED: cuda +// CUDA cannot support OpenCL spec conform images. //==-------------- image_access.cpp - SYCL image accessors test -----------==// // diff --git a/sycl/test/sub_group/attributes.cpp b/sycl/test/sub_group/attributes.cpp index 027327324329e..fd41f3d6ce303 100644 --- a/sycl/test/sub_group/attributes.cpp +++ b/sycl/test/sub_group/attributes.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl %s -o %t.out +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUNx: %GPU_RUN_PLACEHOLDER %t.out diff --git a/sycl/test/sub_group/barrier.cpp b/sycl/test/sub_group/barrier.cpp index b31311179eed2..4ba9e7ee494c4 100644 --- a/sycl/test/sub_group/barrier.cpp +++ b/sycl/test/sub_group/barrier.cpp @@ -3,7 +3,7 @@ // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out -// UNSUPPORTED: cuda + //==---------- barrier.cpp - SYCL sub_group barrier test -------*- C++ -*---==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/sycl/test/sub_group/broadcast.cpp b/sycl/test/sub_group/broadcast.cpp index 41e73b22fc8a3..f0d42fc67dbdd 100644 --- a/sycl/test/sub_group/broadcast.cpp +++ b/sycl/test/sub_group/broadcast.cpp @@ -1,10 +1,14 @@ +// XFAIL: cuda +// CUDA compilation and runtime do not yet support sub groups. + + // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -D SG_GPU %s -o %t_gpu.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t_gpu.out // RUN: %ACC_RUN_PLACEHOLDER %t.out -// UNSUPPORTED: cuda + //==--------- broadcast.cpp - SYCL sub_group broadcast test ----*- C++ -*---==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/sycl/test/sub_group/common.cpp b/sycl/test/sub_group/common.cpp index 530a3049d740d..f8551f9918f33 100644 --- a/sycl/test/sub_group/common.cpp +++ b/sycl/test/sub_group/common.cpp @@ -3,7 +3,7 @@ // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out -// UNSUPPORTED: cuda + //==-------------- common.cpp - SYCL sub_group common test -----*- C++ -*---==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/sycl/test/sub_group/common_ocl.cpp b/sycl/test/sub_group/common_ocl.cpp index ca033fe955bf3..d999b446cb671 100644 --- a/sycl/test/sub_group/common_ocl.cpp +++ b/sycl/test/sub_group/common_ocl.cpp @@ -1,3 +1,5 @@ +// REQUIRES: opencl + // RUN: %clang_cc1 -x cl -cl-std=CL2.0 %S/sg.cl -triple spir64-unknown-unknown -emit-llvm-bc -o %T/kernel_ocl.bc -include opencl-c.h // RUN: llvm-spirv %T/kernel_ocl.bc -o %T/kernel_ocl.spv // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -L %opencl_libs_dir -lOpenCL @@ -5,7 +7,7 @@ // RUN: %CPU_RUN_PLACEHOLDER %t.out %T/kernel_ocl.spv // RUN: %GPU_RUN_PLACEHOLDER %t.out %T/kernel_ocl.spv // RUN: %ACC_RUN_PLACEHOLDER %t.out %T/kernel_ocl.spv -// UNSUPPORTED: cuda + //==--- common_ocl.cpp - basic SG methods in SYCL vs OpenCL ---*- C++ -*---==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/sycl/test/sub_group/info.cpp b/sycl/test/sub_group/info.cpp index 9bbe571aa75e6..16a6fa1f38a1b 100644 --- a/sycl/test/sub_group/info.cpp +++ b/sycl/test/sub_group/info.cpp @@ -1,9 +1,11 @@ +// REQUIRES: opencl + // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out -// UNSUPPORTED: cuda + //==------------- info.cpp - SYCL sub_group parameters test ----*- C++ -*---==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/sycl/test/sub_group/load_store.cpp b/sycl/test/sub_group/load_store.cpp index 7f9b105ba2723..0a7e52aa5b5bc 100644 --- a/sycl/test/sub_group/load_store.cpp +++ b/sycl/test/sub_group/load_store.cpp @@ -1,9 +1,11 @@ +// XFAIL: cuda +// CUDA compilation and runtime do not yet support sub groups. + // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out -// UNSUPPORTED: cuda // //==----------- load_store.cpp - SYCL sub_group load/store test ------------==// // diff --git a/sycl/test/sub_group/reduce.cpp b/sycl/test/sub_group/reduce.cpp index 24d97cc276262..2d6b1b5adc1c5 100644 --- a/sycl/test/sub_group/reduce.cpp +++ b/sycl/test/sub_group/reduce.cpp @@ -1,11 +1,14 @@ +// XFAIL: cuda +// CUDA compilation and runtime do not yet support sub groups. + //-fsycl-targets=%sycl_triple // RUN: %clangxx -fsycl -std=c++14 %s -o %t.out -// RUN: %clangxx -fsycl -std=c++14 -D SG_GPU %s -o %t_gpu.out +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -std=c++14 -D SG_GPU %s -o %t_gpu.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t_gpu.out // RUN: %ACC_RUN_PLACEHOLDER %t.out -// UNSUPPORTED: cuda + //==--------------- reduce.cpp - SYCL sub_group reduce test ----*- C++ -*---==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/sycl/test/sub_group/scan.cpp b/sycl/test/sub_group/scan.cpp index bd3a653232127..881293b0325cc 100644 --- a/sycl/test/sub_group/scan.cpp +++ b/sycl/test/sub_group/scan.cpp @@ -1,11 +1,14 @@ +// XFAIL: cuda +// CUDA compilation and runtime do not yet support sub groups. + //-fsycl-targets=%sycl_triple // RUN: %clangxx -fsycl -std=c++14 %s -o %t.out -// RUN: %clangxx -fsycl -std=c++14 -D SG_GPU %s -o %t_gpu.out +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -std=c++14 -D SG_GPU %s -o %t_gpu.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t_gpu.out // RUN: %ACC_RUN_PLACEHOLDER %t.out -// UNSUPPORTED: cuda + //==--------------- scan.cpp - SYCL sub_group scan test --------*- C++ -*---==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/sycl/test/sub_group/shuffle.cpp b/sycl/test/sub_group/shuffle.cpp index df1818ed77ef7..e193c9f5283ab 100644 --- a/sycl/test/sub_group/shuffle.cpp +++ b/sycl/test/sub_group/shuffle.cpp @@ -1,9 +1,11 @@ +// XFAIL: cuda +// CUDA compilation and runtime do not yet support sub groups. + // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUNx: %GPU_RUN_PLACEHOLDER %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out -// UNSUPPORTED: cuda // //==------------ shuffle.cpp - SYCL sub_group shuffle test -----*- C++ -*---==// // diff --git a/sycl/test/sub_group/vote.cpp b/sycl/test/sub_group/vote.cpp index 16d0059d86f4d..392f43e6e5be7 100644 --- a/sycl/test/sub_group/vote.cpp +++ b/sycl/test/sub_group/vote.cpp @@ -1,9 +1,12 @@ +// XFAIL: cuda +// CUDA compilation and runtime do not yet support sub groups. + // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out -// UNSUPPORTED: cuda + //==--------------- vote.cpp - SYCL sub_group vote test --*- C++ -*---------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/sycl/test/usm/allocator_vector_fail.cpp b/sycl/test/usm/allocator_vector_fail.cpp index f77729f14b6d0..8a1375eed77d5 100644 --- a/sycl/test/usm/allocator_vector_fail.cpp +++ b/sycl/test/usm/allocator_vector_fail.cpp @@ -1,8 +1,10 @@ +// XFAIL: cuda +// CUDA does not support USM. + // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out // RUN: %CPU_RUN_PLACEHOLDER %t1.out // RUN: %GPU_RUN_PLACEHOLDER %t1.out -// XFAIL: cuda //==-- allocator_vector_fail.cpp - Device Memory Allocator fail test -------==// // diff --git a/sycl/test/usm/badmalloc.cpp b/sycl/test/usm/badmalloc.cpp index b99f1f50663cf..44f6707efd726 100644 --- a/sycl/test/usm/badmalloc.cpp +++ b/sycl/test/usm/badmalloc.cpp @@ -5,6 +5,7 @@ // UNSUPPORTED: windows // XFAIL: cuda +// CUDA does not support USM. //==----------------- badmalloc.cpp - Bad Mallocs test ---------------------==// // diff --git a/sycl/test/usm/memcpy.cpp b/sycl/test/usm/memcpy.cpp index e5871374ea3c2..8c38e67f234f4 100644 --- a/sycl/test/usm/memcpy.cpp +++ b/sycl/test/usm/memcpy.cpp @@ -5,10 +5,12 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// +// XFAIL: cuda +// CUDA does not support USM. +// // RUN: %clangxx -fsycl %s -o %t1.out // RUN: %CPU_RUN_PLACEHOLDER %t1.out // RUN: %GPU_RUN_PLACEHOLDER %t1.out -// XFAIL: cuda #include diff --git a/sycl/test/usm/memset.cpp b/sycl/test/usm/memset.cpp index 4e01415073f6d..b62c107711487 100644 --- a/sycl/test/usm/memset.cpp +++ b/sycl/test/usm/memset.cpp @@ -5,10 +5,12 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// +// XFAIL: cuda +// CUDA does not support USM. +// // RUN: %clangxx -fsycl %s -o %t1.out // RUN: %CPU_RUN_PLACEHOLDER %t1.out // RUN: %GPU_RUN_PLACEHOLDER %t1.out -// XFAIL: cuda #include diff --git a/sycl/test/usm/mixed2template.cpp b/sycl/test/usm/mixed2template.cpp index 4261187092d72..12ddc999b6812 100644 --- a/sycl/test/usm/mixed2template.cpp +++ b/sycl/test/usm/mixed2template.cpp @@ -1,4 +1,7 @@ -// RUN: %clangxx -fsycl %s -o %t1.out +// XFAIL: cuda +// CUDA does not support USM. +// +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out // RUN: %CPU_RUN_PLACEHOLDER %t1.out // RUN: %GPU_RUN_PLACEHOLDER %t1.out diff --git a/sycl/test/usm/queue_wait.cpp b/sycl/test/usm/queue_wait.cpp index 76bdaaf4c7b92..1f5b33b7fe97a 100644 --- a/sycl/test/usm/queue_wait.cpp +++ b/sycl/test/usm/queue_wait.cpp @@ -1,4 +1,7 @@ -// RUN: %clangxx -fsycl %s -o %t.out +// XFAIL: cuda +// CUDA does not support USM. +// +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out diff --git a/sycl/test/warnings/warnings.cpp b/sycl/test/warnings/warnings.cpp index aa737dd19b12e..ea2409f828f89 100644 --- a/sycl/test/warnings/warnings.cpp +++ b/sycl/test/warnings/warnings.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -Wall -Wpessimizing-move -Wunused-variable -Wmismatched-tags -Wunneeded-internal-declaration -Werror -fsycl %s -o %t.out +// RUN: %clangxx -Wall -Wpessimizing-move -Wunused-variable -Wmismatched-tags -Wunneeded-internal-declaration -Werror -Wno-unknown-cuda-version -fsycl %s -o %t.out #include