Skip to content

Commit

Permalink
[SYCL][CUDA] LIT XFAIL/UNSUPPORTED (intel#1303)
Browse files Browse the repository at this point in the history
  • Loading branch information
fwyzard committed Mar 14, 2020
2 parents ff1f483 + 604b5f4 commit 2066690
Show file tree
Hide file tree
Showing 37 changed files with 93 additions and 78 deletions.
4 changes: 3 additions & 1 deletion sycl/test/aot/gpu.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 2 additions & 0 deletions sycl/test/aot/multiple-devices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 3 additions & 13 deletions sycl/test/backend/cuda/primary_context.cpp
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -11,24 +11,14 @@
//
//===----------------------------------------------------------------------===//

#include "../../helpers.hpp"
#include <CL/sycl.hpp>
#include <CL/sycl/detail/pi_cuda.hpp>
#include <cuda.h>
#include <iostream>
#include <pi_cuda.hpp>

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<info::device::platform>();
const std::string platformVersion =
Expand Down
2 changes: 0 additions & 2 deletions sycl/test/basic_tests/boolean.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <CL/sycl.hpp>

#include <cassert>
Expand Down
6 changes: 3 additions & 3 deletions sycl/test/basic_tests/buffer/buffer_full_copy.cpp
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions sycl/test/basic_tests/buffer/subbuffer.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
14 changes: 2 additions & 12 deletions sycl/test/basic_tests/kernel_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,11 @@
//
//===----------------------------------------------------------------------===//

#include "../helpers.hpp"
#include <CL/sycl.hpp>

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;

Expand Down Expand Up @@ -64,4 +54,4 @@ int main() {
const cl_ulong prvMemSize =
krn.get_work_group_info<info::kernel_work_group::private_mem_size>(dev);
CHECK(prvMemSize == 0);
}
}
6 changes: 4 additions & 2 deletions sycl/test/basic_tests/parallel_for_range.cpp
Original file line number Diff line number Diff line change
@@ -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 "../helpers.hpp"
#include <CL/sycl.hpp>
Expand Down
2 changes: 1 addition & 1 deletion sycl/test/fpga_tests/fpga_pipes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion sycl/test/fpga_tests/fpga_queue.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// REQUIRES: opencl
// UNSUPPORTED: cuda

// 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.
Expand Down
6 changes: 4 additions & 2 deletions sycl/test/function-pointers/fp-as-kernel-arg.cpp
Original file line number Diff line number Diff line change
@@ -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 <CL/sycl.hpp>

Expand Down
6 changes: 4 additions & 2 deletions sycl/test/function-pointers/pass-fp-through-buffer.cpp
Original file line number Diff line number Diff line change
@@ -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 <CL/sycl.hpp>

Expand Down
2 changes: 1 addition & 1 deletion sycl/test/hier_par/hier_par_wgscope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions sycl/test/kernel_from_file/hw.cpp
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 <CL/sycl.hpp>
#include <iostream>

Expand Down
2 changes: 1 addition & 1 deletion sycl/test/linear_id/linear-sub_group.cpp
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion sycl/test/linear_id/opencl-interop.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// REQUIRES: opencl
// UNSUPPORTED: cuda

// 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
// UNSUPPORTED: cuda
//==---------------- opencl-interop.cpp - SYCL linear id test --------------==//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
Expand Down
3 changes: 2 additions & 1 deletion sycl/test/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,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) )

Expand Down
5 changes: 3 additions & 2 deletions sycl/test/lit.site.cfg.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@"

Expand Down
2 changes: 2 additions & 0 deletions sycl/test/ordered_queue/ordered_queue.cpp
Original file line number Diff line number Diff line change
@@ -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 -----------------==//
Expand Down
4 changes: 3 additions & 1 deletion sycl/test/ordered_queue/prop.cpp
Original file line number Diff line number Diff line change
@@ -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

Expand Down
5 changes: 4 additions & 1 deletion sycl/test/program_manager/env_vars.cpp
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
7 changes: 2 additions & 5 deletions sycl/test/regression/image_access.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 -----------==//
//
Expand Down
2 changes: 1 addition & 1 deletion sycl/test/sub_group/attributes.cpp
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion sycl/test/sub_group/barrier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 5 additions & 1 deletion sycl/test/sub_group/broadcast.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion sycl/test/sub_group/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion sycl/test/sub_group/common_ocl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,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.
Expand Down
4 changes: 3 additions & 1 deletion sycl/test/sub_group/info.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 3 additions & 1 deletion sycl/test/sub_group/load_store.cpp
Original file line number Diff line number Diff line change
@@ -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 ------------==//
//
Expand Down
7 changes: 5 additions & 2 deletions sycl/test/sub_group/reduce.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Loading

0 comments on commit 2066690

Please sign in to comment.