diff --git a/sycl/test/basic_tests/buffer/buffer.cpp b/sycl/test/basic_tests/buffer/buffer.cpp index 2521a20c85358..c587a8d9ee865 100644 --- a/sycl/test/basic_tests/buffer/buffer.cpp +++ b/sycl/test/basic_tests/buffer/buffer.cpp @@ -1,3 +1,5 @@ +// REQUIRES: opencl + // 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 diff --git a/sycl/test/basic_tests/buffer/buffer_interop.cpp b/sycl/test/basic_tests/buffer/buffer_interop.cpp index 13a002bd1a2f2..9885fc7dcf66c 100644 --- a/sycl/test/basic_tests/buffer/buffer_interop.cpp +++ b/sycl/test/basic_tests/buffer/buffer_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 - //==------------------- buffer.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_interop.cpp b/sycl/test/basic_tests/buffer/subbuffer_interop.cpp index 092eda64f7df6..8c010984f8416 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..e8e30015079f7 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..81548d1d3a0b0 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_interop.cpp b/sycl/test/basic_tests/kernel_interop.cpp index 5e24cd66d058d..9e3beed3858d8 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/sampler/sampler.cpp b/sycl/test/basic_tests/sampler/sampler.cpp index 7dcdc08eccfc1..d9c19b9a7aa04 100644 --- a/sycl/test/basic_tests/sampler/sampler.cpp +++ b/sycl/test/basic_tests/sampler/sampler.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 // RUN: %CPU_RUN_PLACEHOLDER %t.out diff --git a/sycl/test/basic_tests/set_arg_interop.cpp b/sycl/test/basic_tests/set_arg_interop.cpp index 37127f97f0ca7..ef028a8b15765 100644 --- a/sycl/test/basic_tests/set_arg_interop.cpp +++ b/sycl/test/basic_tests/set_arg_interop.cpp @@ -1,11 +1,10 @@ +// REQUIRES: opencl + // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -L %opencl_libs_dir -lOpenCL -O3 // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out -// REQUIRES: opencl - - #include #include diff --git a/sycl/test/fpga_tests/fpga_queue.cpp b/sycl/test/fpga_tests/fpga_queue.cpp index f9f4a3a72b98b..4491e481aac9a 100644 --- a/sycl/test/fpga_tests/fpga_queue.cpp +++ b/sycl/test/fpga_tests/fpga_queue.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 // RUN: %ACC_RUN_PLACEHOLDER %t.out diff --git a/sycl/test/kernel-and-program/cache.cpp b/sycl/test/kernel-and-program/cache.cpp index 8c89ebe7e6278..8b5638ac95723 100644 --- a/sycl/test/kernel-and-program/cache.cpp +++ b/sycl/test/kernel-and-program/cache.cpp @@ -1,3 +1,5 @@ +// REQUIRES: opencl + // RUN: %clangxx -fsycl -I %sycl_source_dir %s -o %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out //==---------------- cache.cpp - SYCL kernel/program test ------------------==// diff --git a/sycl/test/kernel-and-program/kernel-and-program.cpp b/sycl/test/kernel-and-program/kernel-and-program.cpp index 5f06b6dc3aae3..8d3f57eb5a671 100644 --- a/sycl/test/kernel-and-program/kernel-and-program.cpp +++ b/sycl/test/kernel-and-program/kernel-and-program.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 // RUN: %CPU_RUN_PLACEHOLDER %t.out diff --git a/sycl/test/linear_id/opencl-interop.cpp b/sycl/test/linear_id/opencl-interop.cpp index 98df80f531374..f9705a7932031 100644 --- a/sycl/test/linear_id/opencl-interop.cpp +++ b/sycl/test/linear_id/opencl-interop.cpp @@ -1,8 +1,9 @@ +// REQUIRES: opencl + // RUN: %clangxx -fsycl %s -o %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out -// REQUIRES: opencl // UNSUPPORTED: cuda //==---------------- opencl-interop.cpp - SYCL linear id test --------------==// // diff --git a/sycl/test/lit.cfg.py b/sycl/test/lit.cfg.py index 999b6d1cd5584..b0ba26b2661b1 100644 --- a/sycl/test/lit.cfg.py +++ b/sycl/test/lit.cfg.py @@ -67,6 +67,9 @@ if 'OCL_ICD_FILENAMES' in os.environ: config.environment['OCL_ICD_FILENAMES'] = os.environ['OCL_ICD_FILENAMES'] +if 'SYCL_DEVICE_WHITE_LIST' in os.environ: + config.environment['SYCL_DEVICE_WHITE_LIST'] = os.environ['SYCL_DEVICE_WHITE_LIST'] + 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) ) diff --git a/sycl/test/ordered_queue/ordered_buffs.cpp b/sycl/test/ordered_queue/ordered_buffs.cpp index cfe9b573481f6..f163da2e81c0f 100644 --- a/sycl/test/ordered_queue/ordered_buffs.cpp +++ b/sycl/test/ordered_queue/ordered_buffs.cpp @@ -1,3 +1,5 @@ +// REQUIRES: opencl + // RUN: %clangxx -fsycl %s -o %t.out -L %opencl_libs_dir -lOpenCL // RUN: %ACC_RUN_PLACEHOLDER %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out diff --git a/sycl/test/ordered_queue/ordered_dmemll.cpp b/sycl/test/ordered_queue/ordered_dmemll.cpp index 8f95f1285f9da..c25716fb5cbef 100644 --- a/sycl/test/ordered_queue/ordered_dmemll.cpp +++ b/sycl/test/ordered_queue/ordered_dmemll.cpp @@ -1,3 +1,5 @@ +// REQUIRES: opencl + // RUN: %clangxx -fsycl %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/sub_group/common_ocl.cpp b/sycl/test/sub_group/common_ocl.cpp index 9a8e4afe7cd3f..7bcb862123584 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