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

Commit 8fafb9e

Browse files
authored
[SYCL] Remove test case using host accessor in interop_handle::get_native_mem() (#269)
This check verifies a situation that is always wrong and causing an exception at runtime. The patch intel/llvm#3685 removes the method throwing exception at runtime and lets see the error at compile time. The temporarily removed test6() will be returned and improved in consequent changes: #263 Removal of test6() is needed to have a clean CI run for #3685 Signed-off-by: Vyacheslav N Klochkov <[email protected]>
1 parent b14fdbc commit 8fafb9e

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

SYCL/HostInteropTask/interop-task.cpp

-30
Original file line numberDiff line numberDiff line change
@@ -221,43 +221,13 @@ void test5() {
221221
checkBufferValues(Buffer2, static_cast<int>(123));
222222
}
223223

224-
// The test checks that an exception which is thrown from host_task body
225-
// is reported as asynchronous.
226-
void test6() {
227-
queue Queue([](sycl::exception_list ExceptionList) {
228-
if (ExceptionList.size() != 1) {
229-
std::cerr << "Should be one exception in exception list" << std::endl;
230-
std::abort();
231-
}
232-
std::rethrow_exception(*ExceptionList.begin());
233-
});
234-
235-
try {
236-
size_t size = 1;
237-
buffer<int, 1> Buf{size};
238-
Queue.submit([&](sycl::handler &CGH) {
239-
auto acc = Buf.get_access<mode::write, target::host_buffer>(CGH);
240-
CGH.codeplay_host_task(
241-
[=](interop_handle IH) { (void)IH.get_native_mem(acc); });
242-
});
243-
Queue.wait_and_throw();
244-
assert(!"Expected exception was not caught");
245-
} catch (sycl::exception &ExpectedException) {
246-
assert(std::string(ExpectedException.what())
247-
.find("memory object out of accessor for specified target "
248-
"is not allowed") != std::string::npos &&
249-
"Unexpected error was caught!");
250-
}
251-
}
252-
253224
int main() {
254225
test1();
255226
test2();
256227
test2_1();
257228
test3();
258229
test4();
259230
test5();
260-
test6();
261231
std::cout << "Test PASSED" << std::endl;
262232
return 0;
263233
}

0 commit comments

Comments
 (0)