From ffdcf326f04fe48d49138ecf29e4b4bce428e99d Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 12 Apr 2017 16:20:41 -0400
Subject: [PATCH] P4 to Git Change 1397617 by gandryey@gera-w8 on 2017/04/12
16:11:38
SWDEV-118846 - [OCL][Vega] clGetKernelInfoAMD is returning zero for CL_KERNELINFO_AVAILABLE_LDS_SIZE
- Pass LDS size from PAL device properties.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#33 edit
[ROCm/clr commit: 4f113f6a2a74c0f5d3d7e59d0931f1c82371d2ee]
---
projects/clr/rocclr/runtime/device/pal/palkernel.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/projects/clr/rocclr/runtime/device/pal/palkernel.cpp b/projects/clr/rocclr/runtime/device/pal/palkernel.cpp
index 667cd17b07..0fa8a6e636 100644
--- a/projects/clr/rocclr/runtime/device/pal/palkernel.cpp
+++ b/projects/clr/rocclr/runtime/device/pal/palkernel.cpp
@@ -429,12 +429,14 @@ HSAILKernel::aqlCreateHWInfo(amd::hsa::loader::Symbol *sym)
workGroupInfo_.usedVGPRs_ = akc->workitem_vgpr_count;
if (!prog().isNull()) {
+ workGroupInfo_.availableLDSSize_ = dev().properties().gfxipProperties.shaderCore.ldsSizePerCu;
workGroupInfo_.availableSGPRs_ = dev().properties().gfxipProperties.shaderCore.numAvailableSgprs;
workGroupInfo_.availableVGPRs_ = dev().properties().gfxipProperties.shaderCore.numAvailableVgprs;
workGroupInfo_.preferredSizeMultiple_ =
workGroupInfo_.wavefrontPerSIMD_ = dev().properties().gfxipProperties.shaderCore.wavefrontSize;
}
else {
+ workGroupInfo_.availableLDSSize_ = 64 * Ki;
workGroupInfo_.availableSGPRs_ = 104;
workGroupInfo_.availableVGPRs_ = 256;
workGroupInfo_.preferredSizeMultiple_ =