SWDEV-340649 - Removes calls to commitMemory in hmm path
Change-Id: I8d381b4c3f5cf95628487e0d10ae643443c9709d
[ROCm/clr commit: 2388f61705]
Este commit está contenido en:
cometido por
Sourabh Betigeri
padre
7f9ec8bdc5
commit
ceca882cf3
@@ -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())) {
|
||||
|
||||
Referencia en una nueva incidencia
Block a user