From a1d2208873b9e065bce8c07311ea67f4399df33b Mon Sep 17 00:00:00 2001 From: foreman Date: Thu, 7 Sep 2017 17:02:22 -0400 Subject: [PATCH] P4 to Git Change 1456409 by skudchad@skudchad_test_win_opencl2 on 2017/09/07 16:42:55 SWDEV-130305 - For Vega CF configuration on specific chipset (AMD Ryzen 7 1800X) slave ASIC comes out of BACO when ReLive is enabled - Finalize() in PAL shouldnt be called during enumeration. This creates a paging queue in WDDM which causes the second GPU to come out of BACO. Move Finalize to initializeHeapResources. ReviewBoardURL = http://ocltc.amd.com/reviews/r/13410/diff/ Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#56 edit [ROCm/clr commit: 881613438a480efced88870d9a350d3b06deaa64] --- .../rocclr/runtime/device/pal/paldevice.cpp | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/projects/clr/rocclr/runtime/device/pal/paldevice.cpp b/projects/clr/rocclr/runtime/device/pal/paldevice.cpp index 8537f7fda1..03750a6254 100644 --- a/projects/clr/rocclr/runtime/device/pal/paldevice.cpp +++ b/projects/clr/rocclr/runtime/device/pal/paldevice.cpp @@ -768,23 +768,6 @@ bool Device::create(Pal::IDevice* device) { // Commit the new settings for the device result = iDev()->CommitSettingsAndInit(); - if (result == Pal::Result::Success) { - Pal::DeviceFinalizeInfo finalizeInfo = {}; - - // Request all compute engines - finalizeInfo.requestedEngineCounts[Pal::EngineTypeCompute].engines = - ((1 << numComputeEngines_) - 1); - // Request real time compute engines - finalizeInfo.requestedEngineCounts[Pal::EngineTypeExclusiveCompute].engines = - ((1 << numExclusiveComputeEngines_) - 1); - // Request all SDMA engines - finalizeInfo.requestedEngineCounts[Pal::EngineTypeDma].engines = (1 << numDmaEngines_) - 1; - - result = iDev()->Finalize(finalizeInfo); - if (result != Pal::Result::Success) { - return false; - } - } Pal::GpuMemoryHeapProperties heaps[Pal::GpuHeapCount]; iDev()->GetGpuMemoryHeapProperties(heaps); @@ -917,6 +900,21 @@ bool Device::create(Pal::IDevice* device) { bool Device::initializeHeapResources() { amd::ScopedLock k(lockForInitHeap_); if (!heapInitComplete_) { + Pal::DeviceFinalizeInfo finalizeInfo = {}; + + // Request all compute engines + finalizeInfo.requestedEngineCounts[Pal::EngineTypeCompute].engines = + ((1 << numComputeEngines_) - 1); + // Request real time compute engines + finalizeInfo.requestedEngineCounts[Pal::EngineTypeExclusiveCompute].engines = + ((1 << numExclusiveComputeEngines_) - 1); + // Request all SDMA engines + finalizeInfo.requestedEngineCounts[Pal::EngineTypeDma].engines = (1 << numDmaEngines_) - 1; + + if (iDev()->Finalize(finalizeInfo) != Pal::Result::Success) { + return false; + } + heapInitComplete_ = true; scratch_.resize(