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

Commit 82e88e1

Browse files
authored
[SYCL] Fix program_link test (#331)
Signed-off-by: Sergey Kanaev <[email protected]>
1 parent 9ea18d7 commit 82e88e1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

SYCL/Config/program_link.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
using namespace cl::sycl;
1313
class DUMMY {
1414
public:
15-
void operator()(item<1>){};
15+
void operator()(item<1>) const {};
1616
};
1717

1818
int main(void) {
@@ -22,6 +22,7 @@ int main(void) {
2222
return 0;
2323
}
2424
context c(p);
25+
queue Q(c, s);
2526
program prog1(c);
2627
prog1.compile_with_kernel_type<DUMMY>();
2728
prog1.link("-cl-finite-math-only");
@@ -40,5 +41,11 @@ int main(void) {
4041
// CHECK-IS-OPT-DISABLE-NOT: -cl-mad-enable
4142
assert(prog2.get_compile_options() == "-cl-mad-enable" &&
4243
"program::get_compile_options() output is wrong");
44+
45+
// enforce SYCL toolchain to emit device image but no enqueue in run-time
46+
if (false) {
47+
Q.submit([&](handler &CGH) { CGH.parallel_for(range<1>{2}, DUMMY{}); });
48+
}
49+
4350
return 0;
44-
}
51+
}

0 commit comments

Comments
 (0)