Fix error code when hipEventRecord is not called
Change-Id: I6672d4320280fd87fd2786bc54214d40944da845
[ROCm/clr commit: f52b2d4504]
This commit is contained in:
committato da
Christophe Paquot
parent
632a78c104
commit
ea1c12b2b6
@@ -35,8 +35,9 @@ bool Event::ready() {
|
||||
hipError_t Event::query() {
|
||||
amd::ScopedLock lock(lock_);
|
||||
|
||||
// If event is not recorded, event_ is null, hence return hipSuccess
|
||||
if (event_ == nullptr) {
|
||||
return hipErrorInvalidHandle;
|
||||
return hipSuccess;
|
||||
}
|
||||
|
||||
return ready() ? hipSuccess : hipErrorNotReady;
|
||||
@@ -45,8 +46,9 @@ hipError_t Event::query() {
|
||||
hipError_t Event::synchronize() {
|
||||
amd::ScopedLock lock(lock_);
|
||||
|
||||
// If event is not recorded, event_ is null, hence return hipSuccess
|
||||
if (event_ == nullptr) {
|
||||
return hipErrorInvalidHandle;
|
||||
return hipSuccess;
|
||||
}
|
||||
|
||||
event_->awaitCompletion();
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user