P4 to Git Change 1972922 by cpaquot@cpaquot-ocl-lc-lnx on 2019/07/24 11:59:16
SWDEV-196881 - [HIP] Fix hipStreamQuery implementation. Using isEmpty isn't correct.
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_internal.hpp#32 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_stream.cpp#20 edit
[ROCm/clr commit: 47ac573d70]
This commit is contained in:
@@ -210,7 +210,18 @@ hipError_t hipStreamQuery(hipStream_t stream) {
|
||||
} else {
|
||||
hostQueue = as_amd(reinterpret_cast<cl_command_queue>(stream))->asHostQueue();
|
||||
}
|
||||
HIP_RETURN(hostQueue->isEmpty() ? hipSuccess : hipErrorNotReady);
|
||||
|
||||
amd::Command* command = hostQueue->getLastQueuedCommand(false);
|
||||
if (command == nullptr) {
|
||||
HIP_RETURN(hipSuccess);
|
||||
}
|
||||
|
||||
amd::Event& event = command->event();
|
||||
|
||||
if (command->type() != CL_COMMAND_MARKER) {
|
||||
event.notifyCmdQueue();
|
||||
}
|
||||
HIP_RETURN((command->status() == CL_COMPLETE) ? hipSuccess : hipErrorNotReady);
|
||||
}
|
||||
|
||||
hipError_t hipStreamAddCallback(hipStream_t stream, hipStreamCallback_t callback, void* userData,
|
||||
|
||||
Reference in New Issue
Block a user