From 1d401fe538ec62fad73e4467cfc816bf0441e79a Mon Sep 17 00:00:00 2001 From: Yong Zhao Date: Fri, 2 Feb 2018 12:31:01 -0500 Subject: [PATCH] Revert "Workaround: make mmap memory resident for gfx902" This reverts commit cbcae4eecc2544175322b9de6af726518887d4a3. Change-Id: I9f4f0b6b426aeae4cb652b33cf0d4c0f57270ca5 Signed-off-by: Yong Zhao [ROCm/ROCR-Runtime commit: 55bb61ff9c41aeafa1a4eae2c35e648fe298a6eb] --- projects/rocr-runtime/src/fmm.c | 4 ---- projects/rocr-runtime/src/queues.c | 3 --- 2 files changed, 7 deletions(-) diff --git a/projects/rocr-runtime/src/fmm.c b/projects/rocr-runtime/src/fmm.c index a7003a624f..7e5a023f96 100644 --- a/projects/rocr-runtime/src/fmm.c +++ b/projects/rocr-runtime/src/fmm.c @@ -933,8 +933,6 @@ void *fmm_allocate_scratch(uint32_t gpu_id, uint64_t MemorySizeInBytes) munmap(aligned_end, VOID_PTRS_SUB(padded_end, aligned_end)); mem = aligned_start; - - memset(mem, 0, aligned_size); } /* Remember scratch backing aperture for later */ @@ -1133,8 +1131,6 @@ static void *fmm_allocate_host_cpu(uint64_t MemorySizeInBytes, if (mem == MAP_FAILED) return NULL; - memset(mem, 0, MemorySizeInBytes); - pthread_mutex_lock(&cpuvm_aperture.fmm_mutex); vm_obj = aperture_allocate_object(&cpuvm_aperture, mem, 0, MemorySizeInBytes, flags.Value); diff --git a/projects/rocr-runtime/src/queues.c b/projects/rocr-runtime/src/queues.c index 92be431afc..8f035a12d4 100644 --- a/projects/rocr-runtime/src/queues.c +++ b/projects/rocr-runtime/src/queues.c @@ -323,9 +323,6 @@ static void *allocate_exec_aligned_memory_cpu(uint32_t size) if (ptr == MAP_FAILED) return NULL; - - memset(ptr, 0, size); - return ptr; }