Skip to content

Commit 8ade560

Browse files
committed
Add a new error code for when a requested platform type is not found
Signed-off-by: Dmitri Mokhov <[email protected]>
1 parent 8f0a8fb commit 8ade560

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

opencl-aot/include/utils.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ enum Errors : int8_t {
3636
OPENCL_AOT_OPTIONS_COEXISTENCE_FAILURE,
3737
OPENCL_AOT_TARGET_CPU_ARCH_FAILURE,
3838
OPENCL_AOT_DEVICE_ID_IS_EMPTY,
39-
OPENCL_AOT_PROGRAM_IS_EMPTY
39+
OPENCL_AOT_PROGRAM_IS_EMPTY,
40+
OPENCL_AOT_PLATFORM_NOT_FOUND
4041
};
4142

4243
inline bool clFailed(cl_int ReturnCode) { return CL_SUCCESS != ReturnCode; }

opencl-aot/source/utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ getOpenCLPlatform(DeviceType Type) {
246246
DeviceTypesToSupportedPlatformNames[Type]) {
247247
ErrorMessage += " " + SupportedPlatformName + '\n';
248248
}
249-
CLErr = OPENCL_AOT_DEVICE_ID_IS_EMPTY;
249+
CLErr = OPENCL_AOT_PLATFORM_NOT_FOUND;
250250
}
251251

252252
return std::make_tuple(PlatformId, PlatformName, ErrorMessage, CLErr);

0 commit comments

Comments
 (0)