P4 to Git Change 1458035 by wchau@wchau_OCL_boltzmann on 2017/09/12 16:31:24

SWDEV-130808 - set the local sizes to preferredWorkGroupSize_ when clEnqueueNDRange is not given and the kernel does not have required workgroup sizes.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#320 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#411 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#36 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#56 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#26 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#43 edit
이 커밋은 다음에 포함됨:
foreman
2017-09-12 17:13:01 -04:00
부모 23f12d5ea4
커밋 8aef16e13c
6개의 변경된 파일과 12개의 추가작업 그리고 12개의 파일을 삭제
+3 -3
파일 보기
@@ -659,7 +659,7 @@ bool HSAILKernel::init(amd::hsa::loader::Symbol* sym, bool finalize) {
workGroupInfo_.size_ = workGroupInfo_.compileSize_[0] * workGroupInfo_.compileSize_[1] *
workGroupInfo_.compileSize_[2];
} else {
workGroupInfo_.size_ = dev().info().maxWorkGroupSize_;
workGroupInfo_.size_ = dev().info().preferredWorkGroupSize_;
}
// Pull out printf metadata from the ELF
@@ -793,7 +793,7 @@ void HSAILKernel::findLocalWorkSize(size_t workDim, const amd::NDRange& gblWorkS
(workDim > 1) && ((dev().settings().partialDispatch_) ||
(((gblWorkSize[0] % 16) == 0) && ((gblWorkSize[1] % 16) == 0)))) {
// Use 8x8 workgroup size if kernel has image writes
if (flags_.imageWriteEna_ || (thrPerGrp != dev().info().maxWorkGroupSize_)) {
if (flags_.imageWriteEna_ || (thrPerGrp != dev().info().preferredWorkGroupSize_)) {
lclWorkSize[0] = 8;
lclWorkSize[1] = 8;
} else {
@@ -1540,7 +1540,7 @@ bool LightningKernel::init(amd::hsa::loader::Symbol* symbol) {
workGroupInfo_.size_ = workGroupInfo_.compileSize_[0] * workGroupInfo_.compileSize_[1] *
workGroupInfo_.compileSize_[2];
} else {
workGroupInfo_.size_ = dev().info().maxWorkGroupSize_;
workGroupInfo_.size_ = dev().info().preferredWorkGroupSize_;
}
initPrintf(programMD->mPrintf);