Skip to content

Commit 2070cf7

Browse files
committed
Add implementation of urProgramCreateWithBinaryExp
1 parent e947a4e commit 2070cf7

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

source/adapters/level_zero/program.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,17 @@ ur_result_t urProgramCreateWithBinaryExp(
135135
ur_program_handle_t
136136
*phProgram ///< [out] pointer to handle of Program object created.
137137
) {
138-
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
138+
try {
139+
ur_program_handle_t_ *UrProgram = new ur_program_handle_t_(
140+
ur_program_handle_t_::Native, hContext, numDevices, phDevices,
141+
pProperties, ppBinaries, pLengths);
142+
*phProgram = reinterpret_cast<ur_program_handle_t>(UrProgram);
143+
return UR_RESULT_SUCCESS;
144+
} catch (const std::bad_alloc &) {
145+
return UR_RESULT_ERROR_OUT_OF_HOST_MEMORY;
146+
} catch (...) {
147+
return UR_RESULT_ERROR_UNKNOWN;
148+
}
139149
}
140150

141151
ur_result_t urProgramBuild(

0 commit comments

Comments
 (0)