From 80e105db0bcdc266be7af0bc78198a92e0ba3540 Mon Sep 17 00:00:00 2001 From: foreman Date: Thu, 2 Nov 2017 12:18:55 -0400 Subject: [PATCH] P4 to Git Change 1478018 by gandryey@gera-w8 on 2017/11/02 12:11:10 SWDEV-136068 - PAL support for Linux Pro: SSG support on OpenCL 1.2 - Enable DGMA memory allocation for persistent memory under Linux, since it's SSG requirement Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.cpp#39 edit --- rocclr/runtime/device/pal/palresource.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rocclr/runtime/device/pal/palresource.cpp b/rocclr/runtime/device/pal/palresource.cpp index d333bbdecd..186de90825 100644 --- a/rocclr/runtime/device/pal/palresource.cpp +++ b/rocclr/runtime/device/pal/palresource.cpp @@ -370,6 +370,12 @@ void Resource::memTypeToHeap(Pal::GpuMemoryCreateInfo* createInfo) { switch (memoryType()) { case Persistent: createInfo->heaps[0] = Pal::GpuHeapLocal; +#ifdef ATI_OS_LINUX + // Note: SSG in Linux requires DGMA heap + if (dev().properties().gpuMemoryProperties.busAddressableMemSize > 0) { + createInfo->flags.busAddressable = true; + } +#endif break; case RemoteUSWC: createInfo->heaps[0] = Pal::GpuHeapGartUswc;