Skip to content

Commit b1d9368

Browse files
authored
[SYCL][E2E] Fix DeviceLib/assert-windows.cpp run-time errors (#17493)
1 parent 050ac51 commit b1d9368

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

sycl/test-e2e/DeviceLib/assert-windows.cpp

+6-13
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
1-
// REQUIRES: cpu,windows
1+
// REQUIRES: windows
2+
// XFAIL: opencl && gpu
3+
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/11364
24
//
3-
// RUN: %{build} -o %t.out
5+
// RUN: %{build} -DSYCL_FALLBACK_ASSERT=1 -o %t.out
46
//
5-
// MSVC implementation of assert does not call an unreachable built-in, so the
6-
// program doesn't terminate when fallback is used.
7-
//
8-
// FIXME: SPIR-V Unreachable should be called from the fallback
9-
// explicitly. Since the test is going to crash, we'll have to follow a similar
10-
// approach as on Linux - call the test in a subprocess.
11-
//
12-
// RUN: env SYCL_UR_TRACE=2 SYCL_DEVICELIB_INHIBIT_NATIVE=1 CL_CONFIG_USE_VECTORIZER=False %{run} %t.out | FileCheck %s --check-prefix=CHECK-FALLBACK
13-
// RUN: env SHOULD_CRASH=1 SYCL_DEVICELIB_INHIBIT_NATIVE=1 CL_CONFIG_USE_VECTORIZER=False %{run} %t.out | FileCheck %s --check-prefix=CHECK-MESSAGE
7+
// RUN: not env SHOULD_CRASH=1 SYCL_DEVICELIB_INHIBIT_NATIVE=1 CL_CONFIG_USE_VECTORIZER=False \
8+
// RUN: %{run} %t.out 2>&1 >/dev/null | FileCheck %s --check-prefix=CHECK-MESSAGE
149
//
1510
// CHECK-MESSAGE: {{.*}}assert-windows.cpp:{{[0-9]+}}: (null): global id:
1611
// [{{[0-3]}},0,0], local id: [{{[0-3]}},0,0] Assertion `accessorC[wiID] == 0 &&
1712
// "Invalid value"` failed.
18-
//
19-
// CHECK-FALLBACK: <--- urProgramLink
2013

2114
#include "../helpers.hpp"
2215
#include <array>

0 commit comments

Comments
 (0)