From f5cd5f9de8cacfbafc4bf589c08f5b092d1d4315 Mon Sep 17 00:00:00 2001
From: foreman
Date: Tue, 14 Feb 2017 17:38:43 -0500
Subject: [PATCH] P4 to Git Change 1373431 by gandryey@gera-w8 on 2017/02/14
17:31:04
SWDEV-112401 - [OCLonROCm vs LinuxPro][Fiji][Perf] Around ~ 70% performance drop observed with OCL SDK - BlackScholes test
- Switch persistent emulation to device memory instead of system memory, since ROCr doesn't support visible heap without large bar. It's a potential tradeoff of persistent usage in the applications between an upload buffer or directly in a kernel.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocmemory.cpp#11 edit
[ROCm/clr commit: faf83743d8b66df3a7c98b22c8cdacd1b1948842]
---
.../clr/rocclr/runtime/device/rocm/rocmemory.cpp | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/projects/clr/rocclr/runtime/device/rocm/rocmemory.cpp b/projects/clr/rocclr/runtime/device/rocm/rocmemory.cpp
index 8964e21d0c..26940ccc08 100644
--- a/projects/clr/rocclr/runtime/device/rocm/rocmemory.cpp
+++ b/projects/clr/rocclr/runtime/device/rocm/rocmemory.cpp
@@ -351,8 +351,7 @@ Buffer::create()
// Allocate backing storage in device local memory unless UHP or AHP are set
const cl_mem_flags memFlags = owner()->getMemFlags();
- if (!(memFlags & (CL_MEM_USE_HOST_PTR |
- CL_MEM_ALLOC_HOST_PTR | CL_MEM_USE_PERSISTENT_MEM_AMD))) {
+ if (!(memFlags & (CL_MEM_USE_HOST_PTR | CL_MEM_ALLOC_HOST_PTR))) {
deviceMemory_ = dev_.deviceLocalAlloc(size());
if (deviceMemory_ == NULL) {
@@ -407,17 +406,6 @@ Buffer::create()
return deviceMemory_ != NULL;
}
- else if (memFlags & CL_MEM_USE_PERSISTENT_MEM_AMD) {
- deviceMemory_ = dev_.hostAlloc(size(), 1, false);
- if (deviceMemory_ != nullptr) {
- if (owner()->getHostMem() != nullptr) {
- memcpy(deviceMemory_, owner()->getHostMem(), size());
- }
- flags_ |= HostMemoryDirectAccess;
- }
- return deviceMemory_ != nullptr;
- }
-
assert(owner()->getHostMem() != NULL);
flags_ |= HostMemoryDirectAccess;