@@ -125,6 +125,16 @@ UR_APIEXPORT ur_result_t UR_APICALL urProgramCreateWithBinary(
125
125
return UR_RESULT_SUCCESS;
126
126
}
127
127
128
+ UR_APIEXPORT ur_result_t UR_APICALL
129
+ urProgramCreateWithIL (ur_context_handle_t hContext, const void *pIL,
130
+ size_t length, const ur_program_properties_t *pProperties,
131
+ ur_program_handle_t *phProgram) {
132
+ // Liboffload consumes both IR and binaries through the same entrypoint
133
+ return urProgramCreateWithBinary (hContext, 1 , &hContext->Device , &length,
134
+ reinterpret_cast <const uint8_t **>(&pIL),
135
+ pProperties, phProgram);
136
+ }
137
+
128
138
UR_APIEXPORT ur_result_t UR_APICALL urProgramBuild (ur_context_handle_t ,
129
139
ur_program_handle_t ,
130
140
const char *) {
@@ -147,12 +157,6 @@ UR_APIEXPORT ur_result_t UR_APICALL urProgramCompile(ur_context_handle_t,
147
157
return UR_RESULT_SUCCESS;
148
158
}
149
159
150
- UR_APIEXPORT ur_result_t UR_APICALL
151
- urProgramCreateWithIL (ur_context_handle_t , const void *, size_t ,
152
- const ur_program_properties_t *, ur_program_handle_t *) {
153
- return UR_RESULT_ERROR_COMPILER_NOT_AVAILABLE;
154
- }
155
-
156
160
UR_APIEXPORT ur_result_t UR_APICALL
157
161
urProgramGetInfo (ur_program_handle_t hProgram, ur_program_info_t propName,
158
162
size_t propSize, void *pPropValue, size_t *pPropSizeRet) {
0 commit comments