From 2eee401d31a226ee545422aca50a94f235240959 Mon Sep 17 00:00:00 2001 From: foreman Date: Tue, 16 Apr 2019 12:00:32 -0400 Subject: [PATCH] P4 to Git Change 1770446 by jujiang@JJ-OCL-w8 on 2019/04/16 10:11:21 SWDEV-182204 - [CQE OCL][QR][DTB-Blocker][RV2][PCO][Windows][RS] Soft hang is observed with multiple OCL applications on PCO, RV | Faulty CL#1747482 Ocltst test SW hung at sub test OCLCreateBuffer due to the failure of submit command buffer, because of not enough OS memory allocation. OCL adds back up GART heap for memory allocation. http://ocltc.amd.com/reviews/r/17143/ Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.cpp#72 edit --- rocclr/runtime/device/pal/palresource.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rocclr/runtime/device/pal/palresource.cpp b/rocclr/runtime/device/pal/palresource.cpp index b7617c43c9..e3a719cc38 100644 --- a/rocclr/runtime/device/pal/palresource.cpp +++ b/rocclr/runtime/device/pal/palresource.cpp @@ -366,7 +366,9 @@ void Resource::memTypeToHeap(Pal::GpuMemoryCreateInfo* createInfo) { createInfo->heapCount = 1; switch (memoryType()) { case Persistent: + createInfo->heapCount = 2; createInfo->heaps[0] = Pal::GpuHeapLocal; + createInfo->heaps[1] = Pal:: GpuHeapGartUswc; #ifdef ATI_OS_LINUX // Note: SSG in Linux requires DGMA heap if (dev().properties().gpuMemoryProperties.busAddressableMemSize > 0) { @@ -387,9 +389,10 @@ void Resource::memTypeToHeap(Pal::GpuMemoryCreateInfo* createInfo) { case Shader: // Fall through to process the memory allocation ... case Local: - createInfo->heapCount = 2; + createInfo->heapCount = 3; createInfo->heaps[0] = Pal::GpuHeapInvisible; createInfo->heaps[1] = Pal::GpuHeapLocal; + createInfo->heaps[2] = Pal::GpuHeapGartUswc; break; default: createInfo->heaps[0] = Pal::GpuHeapLocal;