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) {
259259static ur_program_binary_type_t
260260mapCLBinaryTypeToUR (cl_program_binary_type binaryType) {
261261 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]];
262271 case CL_PROGRAM_BINARY_TYPE_NONE:
263272 return UR_PROGRAM_BINARY_TYPE_NONE;
264273 case CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT:
@@ -267,8 +276,6 @@ mapCLBinaryTypeToUR(cl_program_binary_type binaryType) {
267276 return UR_PROGRAM_BINARY_TYPE_LIBRARY;
268277 case CL_PROGRAM_BINARY_TYPE_EXECUTABLE:
269278 return UR_PROGRAM_BINARY_TYPE_EXECUTABLE;
270- default :
271- return UR_PROGRAM_BINARY_TYPE_FORCE_UINT32;
272279 }
273280}
274281
You can’t perform that action at this time.
0 commit comments