SWDEV-430966 - Size to unmap should be same as mapped memory size.
Change-Id: Id59990c655e7bb4bb980efe587275296103e1e73
This commit is contained in:
committed by
Jaydeepkumar Patel
parent
8e8fb993de
commit
2415701080
@@ -305,6 +305,9 @@ hipError_t hipMemUnmap(void* ptr, size_t size) {
|
||||
}
|
||||
|
||||
amd::Memory* va = amd::MemObjMap::FindMemObj(ptr);
|
||||
if (va && va->getSize() != size) {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
}
|
||||
auto& queue = *g_devices[va->getUserData().deviceId]->NullStream();
|
||||
|
||||
amd::Command* cmd = new amd::VirtualMapCommand(queue, amd::Command::EventWaitList{}, ptr, size,
|
||||
@@ -320,4 +323,4 @@ hipError_t hipMemUnmap(void* ptr, size_t size) {
|
||||
ga->release();
|
||||
|
||||
HIP_RETURN(hipSuccess);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user