SWDEV-340649 - Removes calls to commitMemory in hmm path

Change-Id: I8d381b4c3f5cf95628487e0d10ae643443c9709d
Этот коммит содержится в:
Sourabh Betigeri
2023-01-26 16:22:03 -08:00
коммит произвёл Sourabh Betigeri
родитель e3aa7a5b3d
Коммит 2388f61705
+3 -3
Просмотреть файл
@@ -643,8 +643,9 @@ void Buffer::destroy() {
if (memFlags & CL_MEM_ALLOC_HOST_PTR) {
if (dev().info().hmmSupported_) {
// AMD HMM path. Destroy system memory
amd::Os::uncommitMemory(deviceMemory_, size());
amd::Os::releaseMemory(deviceMemory_, size());
if (!(amd::Os::releaseMemory(deviceMemory_, size()))) {
ClPrint(amd::LOG_DEBUG, amd::LOG_MEM, "[ROCClr] munmap failed \n");
}
} else {
dev().hostFree(deviceMemory_, size());
}
@@ -746,7 +747,6 @@ bool Buffer::create(bool alloc_local) {
if (deviceMemory_ == NULL) {
return false;
}
amd::Os::commitMemory(deviceMemory_, size(), amd::Os::MEM_PROT_RW);
// Currently HMM requires cirtain initial calls to mark sysmem allocation as
// GPU accessible or prefetch memory into GPU
if (!dev().SvmAllocInit(deviceMemory_, size())) {