From fe6915a1bb8a655bb670d2a17c2009f43f443126 Mon Sep 17 00:00:00 2001 From: foreman Date: Thu, 1 Aug 2019 16:50:58 -0400 Subject: [PATCH] P4 to Git Change 1977252 by vsytchen@vsytchen-remote-ocl-win10 on 2019/08/01 16:47:20 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SWDEV-197026 - “GpuToGpuCL_VS2015” test terminates upon launching 1. Since amd::buffer inherits from amd::memory, make sure that the methods it overwrites have the same signature as it's parent's. ReviewBoardURL = http://ocltc.amd.com/reviews/r/17769/diff/ Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.cpp#138 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.hpp#111 edit --- rocclr/runtime/platform/memory.cpp | 4 ++-- rocclr/runtime/platform/memory.hpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/rocclr/runtime/platform/memory.cpp b/rocclr/runtime/platform/memory.cpp index c792d3eb64..3d7db63d1f 100644 --- a/rocclr/runtime/platform/memory.cpp +++ b/rocclr/runtime/platform/memory.cpp @@ -478,7 +478,7 @@ void Buffer::initDeviceMemory() { memset(deviceMemories_, 0, NumDevicesWithP2P() * sizeof(DeviceMemory)); } -bool Buffer::create(void* initFrom, bool sysMemAlloc, bool skipAlloc) { +bool Buffer::create(void* initFrom, bool sysMemAlloc, bool skipAlloc, bool forceAlloc) { if ((getMemFlags() & CL_MEM_EXTERNAL_PHYSICAL_AMD) && (initFrom != NULL)) { busAddress_ = *(reinterpret_cast(initFrom)); initFrom = NULL; @@ -486,7 +486,7 @@ bool Buffer::create(void* initFrom, bool sysMemAlloc, bool skipAlloc) { busAddress_.surface_bus_address = 0; busAddress_.marker_bus_address = 0; } - return Memory::create(initFrom, sysMemAlloc, skipAlloc); + return Memory::create(initFrom, sysMemAlloc, skipAlloc, forceAlloc); } bool Buffer::isEntirelyCovered(const Coord3D& origin, const Coord3D& region) const { diff --git a/rocclr/runtime/platform/memory.hpp b/rocclr/runtime/platform/memory.hpp index ffd5a3f5ec..2602d03dda 100644 --- a/rocclr/runtime/platform/memory.hpp +++ b/rocclr/runtime/platform/memory.hpp @@ -357,7 +357,8 @@ class Buffer : public Memory { bool create(void* initFrom = NULL, //!< Pointer to the initialization data bool sysMemAlloc = false, //!< Allocate device memory in system memory - bool skipAlloc = false //!< Skip device memory allocation + bool skipAlloc = false, //!< Skip device memory allocation + bool forceAlloc = false //!< Force device memory allocation ); //! static_cast to Buffer with sanity check