SWDEV-258579: hipMemcpy2D better error handling
Change-Id: I09378d6e31da99451e22cbe9276a5ff1ad4a1840
This commit is contained in:
committed by
Sarbojit Sarkar
parent
ef415ec610
commit
a08ddb4b53
@@ -1098,13 +1098,16 @@ hipError_t ihipMemcpyDtoD(void* srcDevice,
|
|||||||
return hipErrorOutOfMemory;
|
return hipErrorOutOfMemory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hipError_t status = hipSuccess;
|
||||||
command->enqueue();
|
command->enqueue();
|
||||||
if (!isAsync) {
|
if (!isAsync) {
|
||||||
command->awaitCompletion();
|
if (!command->awaitCompletion()) {
|
||||||
|
status = hipErrorUnknown;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
command->release();
|
command->release();
|
||||||
|
|
||||||
return hipSuccess;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
hipError_t ihipMemcpyDtoH(void* srcDevice,
|
hipError_t ihipMemcpyDtoH(void* srcDevice,
|
||||||
@@ -1157,13 +1160,16 @@ hipError_t ihipMemcpyDtoH(void* srcDevice,
|
|||||||
return hipErrorOutOfMemory;
|
return hipErrorOutOfMemory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hipError_t status = hipSuccess;
|
||||||
command->enqueue();
|
command->enqueue();
|
||||||
if (!isAsync) {
|
if (!isAsync) {
|
||||||
command->awaitCompletion();
|
if (!command->awaitCompletion()) {
|
||||||
|
status = hipErrorUnknown;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
command->release();
|
command->release();
|
||||||
|
|
||||||
return hipSuccess;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
hipError_t ihipMemcpyHtoD(const void* srcHost,
|
hipError_t ihipMemcpyHtoD(const void* srcHost,
|
||||||
@@ -1216,13 +1222,16 @@ hipError_t ihipMemcpyHtoD(const void* srcHost,
|
|||||||
return hipErrorOutOfMemory;
|
return hipErrorOutOfMemory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hipError_t status = hipSuccess;
|
||||||
command->enqueue();
|
command->enqueue();
|
||||||
if (!isAsync) {
|
if (!isAsync) {
|
||||||
command->awaitCompletion();
|
if (!command->awaitCompletion()) {
|
||||||
|
status = hipErrorUnknown;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
command->release();
|
command->release();
|
||||||
|
|
||||||
return hipSuccess;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
hipError_t ihipMemcpyHtoH(const void* srcHost,
|
hipError_t ihipMemcpyHtoH(const void* srcHost,
|
||||||
|
|||||||
Reference in New Issue
Block a user