From 0703b8380bf2f499da9dc94c7aba9dc5a7e46606 Mon Sep 17 00:00:00 2001 From: "Xie,AlexBin" Date: Wed, 18 Jan 2023 13:04:02 -0500 Subject: [PATCH] SWDEV-365305 - Same time is observed for CU Med-Priority tests OCL runtime uses WGP mode and total CU count reported in WGP. Realtime values are still in CUs. That can mislead in the test results. Report realtime in WGP values and convert to CUs for KMD. Change-Id: I90b82615640734dd655be2b613ccac3cb8483239 --- rocclr/device/pal/paldevice.cpp | 10 ++++++++-- rocclr/device/pal/palvirtual.cpp | 3 +++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/rocclr/device/pal/paldevice.cpp b/rocclr/device/pal/paldevice.cpp index 2887705914..75cd3c3eaa 100644 --- a/rocclr/device/pal/paldevice.cpp +++ b/rocclr/device/pal/paldevice.cpp @@ -613,8 +613,14 @@ void NullDevice::fillDeviceInfo(const Pal::DeviceProperties& palProp, info_.numRTQueues_ = numExclusiveComputeRings; const auto& engineProp = palProp.engineProperties[Pal::EngineTypeCompute]; - info_.numRTCUs_ = engineProp.maxNumDedicatedCu; - info_.granularityRTCUs_ = engineProp.dedicatedCuGranularity; + + if (settings().enableWgpMode_) { + info_.numRTCUs_ = engineProp.maxNumDedicatedCu / 2; + info_.granularityRTCUs_ = engineProp.dedicatedCuGranularity / 2; + } else { + info_.numRTCUs_ = engineProp.maxNumDedicatedCu; + info_.granularityRTCUs_ = engineProp.dedicatedCuGranularity; + } info_.threadTraceEnable_ = settings().threadTraceEnable_; diff --git a/rocclr/device/pal/palvirtual.cpp b/rocclr/device/pal/palvirtual.cpp index 2376b1d6db..64b5bfa67f 100644 --- a/rocclr/device/pal/palvirtual.cpp +++ b/rocclr/device/pal/palvirtual.cpp @@ -87,6 +87,9 @@ VirtualGPU::Queue* VirtualGPU::Queue::Create(VirtualGPU& gpu, Pal::QueueType que cmdCreateInfo.engineType = qCreateInfo.engineType = Pal::EngineTypeCompute; qCreateInfo.priority = Pal::QueuePriority::Medium; } else if (amd::CommandQueue::RealTimeDisabled != rtCU) { + if (gpu.dev().settings().enableWgpMode_) { + rtCU = rtCU * 2; + } qCreateInfo.numReservedCu = amd::alignDown(rtCU, gpu.dev().properties().engineProperties[Pal::EngineTypeCompute].dedicatedCuGranularity); if (qCreateInfo.numReservedCu == 0) {