Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

[SYCL] Align tests with the driver #411

Merged
merged 4 commits into from
Aug 20, 2021
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: 0 additions & 2 deletions SYCL/ESIMD/ext_math.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
// UNSUPPORTED: cuda || rocm
// RUN: %clangxx -fsycl %s -o %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// Enable when driver fixes will be propagated into the official release
// XFAIL: windows

// This test checks extended math operations.

Expand Down
1 change: 0 additions & 1 deletion SYCL/ESIMD/regression/store_zero_const.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
// UNSUPPORTED: cuda || rocm
// RUN: %clangxx -fsycl -fsycl-device-code-split=per_kernel -I%S/.. %s -o %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// XFAIL: windows

// This is a regression for vector BE bug:
// storing a constant zero through an USM pointer causes BE crash with
Expand Down
25 changes: 11 additions & 14 deletions SYCL/KernelAndProgram/build-log.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
// XFAIL: cuda
// 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
// RUN: %CPU_RUN_PLACEHOLDER SYCL_PROGRAM_COMPILE_OPTIONS="--unknown-option" %t.out
// RUN: %GPU_RUN_PLACEHOLDER SYCL_PROGRAM_COMPILE_OPTIONS="--unknown-option" %t.out
// RUN: %ACC_RUN_PLACEHOLDER SYCL_PROGRAM_COMPILE_OPTIONS="--unknown-option" %t.out
//
// Unknown options are silently ignored by IGC and CUDA JIT compilers. The issue
// is under investigation.
// XFAIL: (opencl || level_zero || cuda) && gpu

//==--- build-log.cpp - Test log message from faild build ----------==//
//
Expand All @@ -14,19 +17,12 @@

#include <CL/sycl.hpp>

SYCL_EXTERNAL
void symbol_that_does_not_exist();

void test() {
cl::sycl::queue Queue;

// Submitting this kernel should result in a compile_program_error exception
// with a message indicating that "symbol_that_does_not_exist" is undefined.
auto Kernel = []() {
#ifdef __SYCL_DEVICE_ONLY__
symbol_that_does_not_exist();
#endif
};
// with a message indicating "Unrecognized build options".
auto Kernel = []() {};

std::string Msg;
int Result;
Expand All @@ -38,7 +34,8 @@ void test() {
assert(false && "There must be compilation error");
} catch (const cl::sycl::compile_program_error &e) {
std::string Msg(e.what());
assert(Msg.find("symbol_that_does_not_exist") != std::string::npos);
std::cerr << Msg << std::endl;
assert(Msg.find("unknown-option") != std::string::npos);
} catch (...) {
assert(false && "There must be cl::sycl::compile_program_error");
}
Expand Down