From 2714cdc1b6038ea8278552135cbfa26b4218d89d Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 29 Jun 2017 18:39:44 -0400
Subject: [PATCH] P4 to Git Change 1428488 by gandryey@gera-w8 on 2017/06/29
17:50:55
SWDEV-111196 - clGetKernelInfoAMD failures for OpenCL-on-ROCm
- Report available SGPR/VGPR
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#24 edit
---
rocclr/runtime/device/rocm/rockernel.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/rocclr/runtime/device/rocm/rockernel.cpp b/rocclr/runtime/device/rocm/rockernel.cpp
index cdee812cab..c9d2de78a2 100644
--- a/rocclr/runtime/device/rocm/rockernel.cpp
+++ b/rocclr/runtime/device/rocm/rockernel.cpp
@@ -672,8 +672,8 @@ bool Kernel::init_LC() {
memset(&workGroupInfo_, 0, sizeof(workGroupInfo_));
workGroupInfo_.availableLDSSize_ = program_->dev().info().localMemSizePerCU_;
assert(workGroupInfo_.availableLDSSize_ > 0);
- workGroupInfo_.availableSGPRs_ = 0;
- workGroupInfo_.availableVGPRs_ = 0;
+ workGroupInfo_.availableSGPRs_ = 104;
+ workGroupInfo_.availableVGPRs_ = 256;
if (!kernelMD->mAttrs.mReqdWorkGroupSize.empty()) {
const auto& requiredWorkgroupSize = kernelMD->mAttrs.mReqdWorkGroupSize;
@@ -760,8 +760,8 @@ bool Kernel::init() {
memset(&workGroupInfo_, 0, sizeof(workGroupInfo_));
workGroupInfo_.availableLDSSize_ = program_->dev().info().localMemSizePerCU_;
assert(workGroupInfo_.availableLDSSize_ > 0);
- workGroupInfo_.availableSGPRs_ = 0;
- workGroupInfo_.availableVGPRs_ = 0;
+ workGroupInfo_.availableSGPRs_ = 104;
+ workGroupInfo_.availableVGPRs_ = 256;
size_t sizeOfWorkGroupSize;
errorCode = g_complibApi._aclQueryInfo(compileHandle, program_->binaryElf(), RT_WORK_GROUP_SIZE,
openClKernelName.c_str(), nullptr, &sizeOfWorkGroupSize);