From c6280baa3ca4e4fe7208be10aca272c5773675e9 Mon Sep 17 00:00:00 2001
From: foreman
Date: Fri, 17 Aug 2018 17:52:29 -0400
Subject: [PATCH] P4 to Git Change 1595251 by chui@chui-cnchuiw8-ocl-hsa-stg on
2018/08/17 17:06:54
SWDEV-160930 - Back out CL1594730 as it is failing OCL/LC and HIP tests
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#59 edit
---
rocclr/runtime/device/pal/palkernel.cpp | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/rocclr/runtime/device/pal/palkernel.cpp b/rocclr/runtime/device/pal/palkernel.cpp
index 20c06046a8..f35ac18b7a 100644
--- a/rocclr/runtime/device/pal/palkernel.cpp
+++ b/rocclr/runtime/device/pal/palkernel.cpp
@@ -716,10 +716,7 @@ bool HSAILKernel::init(amd::hsa::loader::Symbol* sym, bool finalize) {
workGroupInfo_.size_ = workGroupInfo_.compileSize_[0] * workGroupInfo_.compileSize_[1] *
workGroupInfo_.compileSize_[2];
} else {
- size_t nItems = (workGroupInfo_.availableVGPRs_ / workGroupInfo_.usedVGPRs_) *
- dev().hwInfo()->simdPerCU_ * workGroupInfo_.wavefrontSize_;
- workGroupInfo_.size_ = nItems > dev().info().preferredWorkGroupSize_ ?
- std::min(size_t(1024) , nItems) : dev().info().preferredWorkGroupSize_;
+ workGroupInfo_.size_ = dev().info().preferredWorkGroupSize_;
}
// Pull out printf metadata from the ELF
@@ -1438,12 +1435,7 @@ bool LightningKernel::init(amd::hsa::loader::Symbol* symbol) {
// Copy wavefront size
workGroupInfo_.wavefrontSize_ = dev().info().wavefrontWidth_;
-
- size_t nItems = (workGroupInfo_.availableVGPRs_ / workGroupInfo_.usedVGPRs_) *
- dev().hwInfo()->simdPerCU_ * workGroupInfo_.wavefrontSize_;
- workGroupInfo_.size_ = nItems > kernelMD->mCodeProps.mMaxFlatWorkGroupSize ?
- std::min(size_t(1024), nItems) : kernelMD->mCodeProps.mMaxFlatWorkGroupSize;
-
+ workGroupInfo_.size_ = kernelMD->mCodeProps.mMaxFlatWorkGroupSize;
if (workGroupInfo_.size_ == 0) {
return false;
}