65
65
// in SYCL Runtime, so it doesn't look into a device extensions list and always
66
66
// link the fallback library.
67
67
//
68
- // NOTE that Intel OpenCL CPU Vectorizer crashes when an `unreachable'
69
- // instruction is found in IR. Workaround it for now using
70
- // CL_CONFIG_USE_VECTORIZER=False environment variable.
71
68
//
72
69
// We also skip the native test entirely (see SKIP_IF_NO_EXT), since the assert
73
70
// extension is a new feature and may not be supported by the runtime used with
74
71
// SYCL.
75
72
//
76
73
// Overall this sounds stable enough. What could possibly go wrong?
77
74
//
78
- // RUN: env SYCL_PI_TRACE=2 SHOULD_CRASH=1 CL_CONFIG_USE_VECTORIZER=False SYCL_DEVICE_TYPE=CPU EXPECTED_SIGNAL=SIGABRT SKIP_IF_NO_EXT=1 %t.out 2>%t.stderr.native >%t.stdout.native
75
+ // RUN: env SYCL_PI_TRACE=2 SHOULD_CRASH=1 SYCL_DEVICE_TYPE=CPU EXPECTED_SIGNAL=SIGABRT SKIP_IF_NO_EXT=1 %t.out 2>%t.stderr.native >%t.stdout.native
79
76
// RUN: FileCheck %s --input-file %t.stdout.native --check-prefixes=CHECK-NATIVE || FileCheck %s --input-file %t.stderr.native --check-prefix CHECK-NOTSUPPORTED
80
77
// RUN: FileCheck %s --input-file %t.stderr.native --check-prefixes=CHECK-MESSAGE || FileCheck %s --input-file %t.stderr.native --check-prefix CHECK-NOTSUPPORTED
81
78
//
82
- // RUN: env SYCL_PI_TRACE=2 SYCL_DEVICELIB_INHIBIT_NATIVE=cl_intel_devicelib_assert CL_CONFIG_USE_VECTORIZER=False SYCL_DEVICE_TYPE=CPU EXPECTED_SIGNAL=SIGSEGV %t.out >%t.stdout.pi.fallback
83
- // RUN: env SHOULD_CRASH=1 SYCL_DEVICELIB_INHIBIT_NATIVE=cl_intel_devicelib_assert CL_CONFIG_USE_VECTORIZER=False SYCL_DEVICE_TYPE=CPU EXPECTED_SIGNAL=SIGSEGV %t.out >%t.stdout.msg.fallback
79
+ // RUN: env SYCL_PI_TRACE=2 SYCL_DEVICELIB_INHIBIT_NATIVE=cl_intel_devicelib_assert SYCL_DEVICE_TYPE=CPU %t.out >%t.stdout.pi.fallback
80
+ // RUN: env SYCL_DEVICELIB_INHIBIT_NATIVE=cl_intel_devicelib_assert SYCL_DEVICE_TYPE=CPU %t.out >%t.stdout.msg.fallback
84
81
// RUN: FileCheck %s --input-file %t.stdout.pi.fallback --check-prefixes=CHECK-FALLBACK
85
82
// RUN: FileCheck %s --input-file %t.stdout.msg.fallback --check-prefixes=CHECK-MESSAGE
86
83
//
@@ -141,7 +138,6 @@ void simple_vadd(const std::array<T, N> &VA, const std::array<T, N> &VB,
141
138
exit (EXIT_SKIP_TEST);
142
139
}
143
140
144
- int shouldCrash = getenv (" SHOULD_CRASH" ) ? 1 : 0 ;
145
141
146
142
cl::sycl::range<1 > numOfItems{N};
147
143
cl::sycl::buffer<T, 1 > bufferA (VA.data (), numOfItems);
@@ -155,9 +151,7 @@ void simple_vadd(const std::array<T, N> &VA, const std::array<T, N> &VB,
155
151
156
152
cgh.parallel_for <class SimpleVaddT >(numOfItems, [=](cl::sycl::id<1 > wiID) {
157
153
accessorC[wiID] = accessorA[wiID] + accessorB[wiID];
158
- if (shouldCrash) {
159
154
assert (accessorC[wiID] == 0 && " Invalid value" );
160
- }
161
155
});
162
156
});
163
157
deviceQueue.wait_and_throw ();
0 commit comments