Added null check in hipEventSynchronize (#1627)
* Added missing null check in hipEventSynchronize
* Minor correction in the Event API description
[ROCm/clr commit: 7985ad218f]
Cette révision appartient à :
1 Parent
de260a6d60
révision
7d5bc56ab7
2 fichiers modifiés
+7
-7
Aucun fichier ne correspond à votre recherche
@@ -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) {
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur