Skip to content

Commit

Permalink
[SYCL] Fix LIT if OpenCL GPU is missing (#1714)
Browse files Browse the repository at this point in the history
Fix LIT tests to not run on PI_CUDA backend if only a CUDA GPU and
OpenCL CPU are available but no OpenCL GPU.

Signed-off-by: Bjoern Knafla <bjoern@codeplay.com>
  • Loading branch information
bjoernknafla authored May 26, 2020
1 parent db3e5a6 commit b84ae1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sycl/test/kernel_from_file/hw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//-fsycl-targets=%sycl_triple
// RUN: %clangxx -fsycl-device-only -fno-sycl-use-bitcode -Xclang -fsycl-int-header=%t.h -c %s -o %t.spv -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning -Wno-sycl-strict
// RUN: %clangxx -include %t.h -g %s -o %t.out -lsycl -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning
// RUN: env SYCL_USE_KERNEL_SPV=%t.spv %t.out | FileCheck %s
// RUN: env SYCL_BE=%sycl_be SYCL_USE_KERNEL_SPV=%t.spv %t.out | FileCheck %s
// CHECK: Passed

// TODO: InvalidTargetTriple: Expects spir-unknown-unknown or spir64-unknown-unknown. Actual target triple is x86_64-unknown-linux-gnu
Expand Down
7 changes: 4 additions & 3 deletions sycl/test/separate-compile/test.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// UNSUPPORTED: cuda
// CUDA does not support SPIR-V.

// >> ---- compile src1
// >> device compilation...
// RUN: %clangxx -fsycl-device-only -Xclang -fsycl-int-header=sycl_ihdr_a.h %s -c -o a_kernel.bc -I %sycl_include -Wno-sycl-strict
Expand Down Expand Up @@ -34,11 +37,9 @@
//
// >> ---- link the full hetero app
// RUN: %clangxx wrapper.o a.o b.o -o app.exe -lsycl
// RUN: ./app.exe | FileCheck %s
// RUN: env SYCL_BE=%sycl_be ./app.exe | FileCheck %s
// CHECK: pass

// UNSUPPORTED: cuda

//==----------- test.cpp - Tests SYCL separate compilation -----------------==//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
Expand Down

0 comments on commit b84ae1f

Please sign in to comment.