Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[UR][CUDA][HIP][OpenCL] Return UNSUPPORTED_ENUMERATION for unknown de... #21295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kekaczma wants to merge 1 commit into sycl
base: sycl
Choose a base branch
Loading
from defensive-enum-handling
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion unified-runtime/source/adapters/cuda/device.cpp
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1242,8 +1242,12 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
case UR_DEVICE_INFO_GRAPH_RECORD_AND_REPLAY_SUPPORT_EXP:
return ReturnValue(static_cast<ur_bool_t>(false));
default:
break;
UR_LOG(ERR, "Unsupported ParamName in urDeviceGetInfo");
UR_LOG(ERR, "ParamName={}(0x{})", propName, logger::toHex(propName));
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
}

// Unreachable - all cases return, but compiler needs this
return UR_RESULT_ERROR_INVALID_ENUMERATION;
} catch (...) {
return exceptionToResult(std::current_exception());
Expand Down
6 changes: 5 additions & 1 deletion unified-runtime/source/adapters/hip/device.cpp
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1056,8 +1056,12 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
case UR_DEVICE_INFO_GRAPH_RECORD_AND_REPLAY_SUPPORT_EXP:
return ReturnValue(false);
default:
break;
UR_LOG(ERR, "Unsupported ParamName in urDeviceGetInfo");
UR_LOG(ERR, "ParamName={}(0x{})", propName, logger::toHex(propName));
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
}

// Unreachable - all cases return, but compiler needs this
return UR_RESULT_ERROR_INVALID_ENUMERATION;
}

Expand Down
2 changes: 1 addition & 1 deletion unified-runtime/source/adapters/opencl/device.cpp
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1587,7 +1587,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
case UR_DEVICE_INFO_GRAPH_RECORD_AND_REPLAY_SUPPORT_EXP:
return ReturnValue(false);
default: {
return UR_RESULT_ERROR_INVALID_ENUMERATION;
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
}
}
}
Expand Down
Loading

AltStyle によって変換されたページ (->オリジナル) /