-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Labels
conformanceConformance test suite issues.Conformance test suite issues.cudaCUDA adapter specific issuesCUDA adapter specific issueshipHIP adapter specific issuesHIP adapter specific issuesspecificationChanges or additions to the specificationChanges or additions to the specification
Milestone
Description
Objects that have been created with interop APIs often lack important pieces of information, required for info queries. For example, urEventCreateWithNativeHandle
expects a native CUDA handle, and the resulting event handle will lack a reference to a UR queue. However, urEventGetInfo
has no checks for whether an object was created with a native API or not, neither it will return an error in that case. Instead the returned queue handle will be invalid, i.e. == nullptr
:
unified-runtime/source/adapters/cuda/event.cpp
Lines 160 to 183 in 2b7b827
UR_APIEXPORT ur_result_t UR_APICALL urEventGetInfo(ur_event_handle_t hEvent, | |
ur_event_info_t propName, | |
size_t propValueSize, | |
void *pPropValue, | |
size_t *pPropValueSizeRet) { | |
UrReturnHelper ReturnValue(propValueSize, pPropValue, pPropValueSizeRet); | |
switch (propName) { | |
case UR_EVENT_INFO_COMMAND_QUEUE: | |
return ReturnValue(hEvent->getQueue()); | |
case UR_EVENT_INFO_COMMAND_TYPE: | |
return ReturnValue(hEvent->getCommandType()); | |
case UR_EVENT_INFO_REFERENCE_COUNT: | |
return ReturnValue(hEvent->getReferenceCount()); | |
case UR_EVENT_INFO_COMMAND_EXECUTION_STATUS: | |
return ReturnValue(hEvent->getExecutionStatus()); | |
case UR_EVENT_INFO_CONTEXT: | |
return ReturnValue(hEvent->getContext()); | |
default: | |
detail::ur::die("Event info request not implemented"); | |
} | |
return UR_RESULT_ERROR_INVALID_ENUMERATION; | |
} |
Metadata
Metadata
Assignees
Labels
conformanceConformance test suite issues.Conformance test suite issues.cudaCUDA adapter specific issuesCUDA adapter specific issueshipHIP adapter specific issuesHIP adapter specific issuesspecificationChanges or additions to the specificationChanges or additions to the specification