SWDEV-351033 - Change error code to hipErrorHostMemoryNotRegistered
Change-Id: I930bb1e2787e284f335689d1900bdd08d328272e
Этот коммит содержится в:
коммит произвёл
Jaydeepkumar Patel
родитель
349ade7b2e
Коммит
efadc772db
@@ -1136,6 +1136,9 @@ hipError_t hipHostRegister(void* hostPtr, size_t sizeBytes, unsigned int flags)
|
||||
}
|
||||
|
||||
hipError_t ihipHostUnregister(void* hostPtr) {
|
||||
if (hostPtr == nullptr) {
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
size_t offset = 0;
|
||||
amd::Memory* mem = getMemoryObject(hostPtr, offset);
|
||||
|
||||
@@ -1163,7 +1166,7 @@ hipError_t ihipHostUnregister(void* hostPtr) {
|
||||
}
|
||||
|
||||
LogPrintfError("Cannot unregister host_ptr: 0x%x \n", hostPtr);
|
||||
return hipErrorInvalidValue;
|
||||
return hipErrorHostMemoryNotRegistered;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user