Skip to content

Commit 95cdbba

Browse files
author
Pavel Samolysov
authored
[SYCL] Fix the non-uniform-wk-gp-test (intel#597)
The test must return a value larger than zero if an error occurs. The expected warning from the runtime has been actualized. Signed-off-by: Pavel Samolysov <[email protected]>
1 parent 29cf1b2 commit 95cdbba

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

SYCL/Basic/diagnostics/non-uniform-wk-gp-test.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
22
// RUN: %GPU_RUN_PLACEHOLDER %t.out
3-
// XFAIL: opencl
43
// REQUIRES: level_zero
54
//==------- non-uniform-wk-gp-test.cpp -------==//
65
// This is a diagnostic test which verifies that
@@ -33,8 +32,8 @@ int test() {
3332

3433
} catch (sycl::runtime_error &E) {
3534
if (std::string(E.what()).find(
36-
"Specified local size doesn't match the required work-group size "
37-
"specified in the program source") != std::string::npos) {
35+
"Non-uniform work-groups are not supported by the target device") !=
36+
std::string::npos) {
3837
std::cout << E.what() << std::endl;
3938
std::cout << "Test passed: caught the expected error." << std::endl;
4039
return 0;
@@ -50,17 +49,16 @@ int test() {
5049
}
5150

5251
int main() {
53-
54-
int pltCount = 0, ret;
52+
int pltCount = 0, ret = 0;
5553
for (const auto &plt : platform::get_platforms()) {
5654
if (!plt.has(aspect::host)) {
5755
std::cout << "Platform #" << pltCount++ << ":" << std::endl;
5856
if (plt.get_backend() == backend::ext_oneapi_level_zero) {
5957
std::cout << "Backend: Level Zero" << std::endl;
60-
ret = test();
58+
ret += test();
6159
}
6260
}
6361
std::cout << std::endl;
6462
}
65-
return 0;
63+
return pltCount > 0 ? ret : -1;
6664
}

0 commit comments

Comments
 (0)