File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,15 @@ static cl_int mapURProgramBuildInfoToCL(ur_program_build_info_t URPropName) {
259
259
static ur_program_binary_type_t
260
260
mapCLBinaryTypeToUR (cl_program_binary_type binaryType) {
261
261
switch (binaryType) {
262
+ default :
263
+ // If we don't understand what OpenCL gave us, return NONE.
264
+ // TODO: Emit a warning to the user.
265
+ [[fallthrough]];
266
+ case CL_PROGRAM_BINARY_TYPE_INTERMEDIATE:
267
+ // The INTERMEDIATE binary type is defined by the cl_khr_spir extension
268
+ // which we shouldn't encounter but do. Semantically this binary type is
269
+ // equivelent to NONE as they both require compilation.
270
+ [[fallthrough]];
262
271
case CL_PROGRAM_BINARY_TYPE_NONE:
263
272
return UR_PROGRAM_BINARY_TYPE_NONE;
264
273
case CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT:
@@ -267,8 +276,6 @@ mapCLBinaryTypeToUR(cl_program_binary_type binaryType) {
267
276
return UR_PROGRAM_BINARY_TYPE_LIBRARY;
268
277
case CL_PROGRAM_BINARY_TYPE_EXECUTABLE:
269
278
return UR_PROGRAM_BINARY_TYPE_EXECUTABLE;
270
- default :
271
- return UR_PROGRAM_BINARY_TYPE_FORCE_UINT32;
272
279
}
273
280
}
274
281
You can’t perform that action at this time.
0 commit comments