P4 to Git Change 1917740 by cpaquot@cpaquot-ocl-lc-lnx on 2019/06/28 12:03:07

SWDEV-193938 - [HIP] RCCL test fails
	Set default stream to null-stream
	In hipStreamWaitEvent if event_ is null, get the last queued command instead.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_event.cpp#12 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_event.hpp#4 edit
This commit is contained in:
foreman
2019-06-28 12:09:09 -04:00
orang tua 6768664780
melakukan ccd7799ada
2 mengubah file dengan 12 tambahan dan 1 penghapusan
+11
Melihat File
@@ -100,6 +100,12 @@ hipError_t Event::streamWait(hipStream_t stream, uint flags) {
if (stream_ == hostQueue) return hipSuccess;
amd::ScopedLock lock(lock_);
bool retain = false;
if (event_ == nullptr) {
event_ = stream_->getLastQueuedCommand(true);
retain = true;
}
if (!event_->notifyCmdQueue()) {
return hipErrorUnknown;
@@ -114,6 +120,11 @@ hipError_t Event::streamWait(hipStream_t stream, uint flags) {
command->enqueue();
command->release();
if (retain) {
event_->release();
event_ = nullptr;
}
return hipSuccess;
}
+1 -1
Melihat File
@@ -39,7 +39,7 @@ public:
class Event {
public:
Event(unsigned int flags) : flags(flags), lock_("hipEvent_t"), stream_(nullptr), event_(nullptr) {}
Event(unsigned int flags) : flags(flags), lock_("hipEvent_t"), stream_(getNullStream()), event_(nullptr) {}
~Event() {
if (event_ != nullptr) {
event_->release();