Added null check in hipEventSynchronize (#1627)
* Added missing null check in hipEventSynchronize
* Minor correction in the Event API description
[ROCm/clr commit: 7985ad218f]
This commit is contained in:
committed by
Maneesh Gupta
parent
de260a6d60
commit
7d5bc56ab7
@@ -143,14 +143,14 @@ hipError_t hipEventDestroy(hipEvent_t event) {
|
||||
hipError_t hipEventSynchronize(hipEvent_t event) {
|
||||
HIP_INIT_SPECIAL_API(hipEventSynchronize, TRACE_SYNC, event);
|
||||
|
||||
if (!(event->_flags & hipEventReleaseToSystem)) {
|
||||
tprintf(DB_WARN,
|
||||
if (event){
|
||||
if (!(event->_flags & hipEventReleaseToSystem)) {
|
||||
tprintf(DB_WARN,
|
||||
"hipEventSynchronize on event without system-scope fence ; consider creating with "
|
||||
"hipEventReleaseToSystem\n");
|
||||
}
|
||||
auto ecd = event->locked_copyCrit();
|
||||
}
|
||||
auto ecd = event->locked_copyCrit();
|
||||
|
||||
if (event) {
|
||||
if (ecd._state == hipEventStatusUnitialized) {
|
||||
return ihipLogStatus(hipErrorInvalidResourceHandle);
|
||||
} else if (ecd._state == hipEventStatusCreated) {
|
||||
|
||||
Reference in New Issue
Block a user