File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -424,6 +424,23 @@ pi_result _pi_event::start() {
424
424
return result;
425
425
}
426
426
427
+ bool _pi_event::is_completed () const noexcept {
428
+ if (!isRecorded_) {
429
+ return false ;
430
+ }
431
+ if (!isCompleted_) {
432
+ const hipError_t ret = hipEventQuery (evEnd_);
433
+ if (ret != hipSuccess && ret != hipErrorNotReady) {
434
+ PI_CHECK_ERROR (ret);
435
+ return false ;
436
+ }
437
+ if (ret == hipErrorNotReady) {
438
+ return false ;
439
+ }
440
+ }
441
+ return true ;
442
+ }
443
+
427
444
pi_uint64 _pi_event::get_queued_time () const {
428
445
float miliSeconds = 0 .0f ;
429
446
assert (is_started ());
Original file line number Diff line number Diff line change @@ -423,7 +423,7 @@ struct _pi_event {
423
423
424
424
bool is_started () const noexcept { return isStarted_; }
425
425
426
- bool is_completed () const noexcept { return isCompleted_; } ;
426
+ bool is_completed () const noexcept ;
427
427
428
428
pi_int32 get_execution_status () const noexcept {
429
429
You can’t perform that action at this time.
0 commit comments