Skip to content

Commit ce333dc

Browse files
committed
Throw exception instead of assert()-ing.
Signed-off-by: Julian Oppermann <[email protected]>
1 parent c60a528 commit ce333dc

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

sycl/source/detail/jit_compiler.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,9 +1160,13 @@ std::vector<uint8_t> jit_compiler::compileSYCL(
11601160
const std::vector<std::string> &UserArgs, std::string *LogPtr,
11611161
const std::vector<std::string> &RegisteredKernelNames) {
11621162

1163-
// TODO: Handle situation.
1164-
assert(RegisteredKernelNames.empty() &&
1165-
"Instantiation of kernel templates NYI");
1163+
// TODO: Handle template instantiation.
1164+
if (!RegisteredKernelNames.empty()) {
1165+
throw sycl::exception(
1166+
sycl::errc::build,
1167+
"Property `sycl::ext::oneapi::experimental::registered_kernel_names` "
1168+
"is not yet supported for the `sycl_jit` source language");
1169+
}
11661170

11671171
std::string SYCLFileName = Id + ".cpp";
11681172
::jit_compiler::InMemoryFile SourceFile{SYCLFileName.c_str(),

0 commit comments

Comments
 (0)