P4 to Git Change 1279251 by gandryey@gera-w8 on 2016/06/13 17:47:42
SWDEV-86035 - Add PAL backend to OpenCL
- Remove ciPlus_, since OCL on PAL supports CI+ only
- Remove singleHeap_
- Update WaveLimiter
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#346 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.hpp#97 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palblit.cpp#4 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#7 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.hpp#4 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#6 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.hpp#4 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#11 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palwavelimiter.cpp#2 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palwavelimiter.hpp#3 edit
[ROCm/clr commit: bc84416db0]
This commit is contained in:
@@ -594,6 +594,8 @@ HSAILKernel::HSAILKernel(std::string name,
|
||||
, codeSize_(0)
|
||||
, hwMetaData_(nullptr)
|
||||
, extraArgumentsNum_(extraArgsNum)
|
||||
, waveLimiter_(this, (prog->isNull() ? 1 :
|
||||
dev().properties().gfxipProperties.shaderCore.numCusPerShaderArray) * dev().hwInfo()->simdPerCU_)
|
||||
{
|
||||
hsa_ = true;
|
||||
}
|
||||
@@ -737,6 +739,49 @@ HSAILKernel::init(amd::hsa::loader::Symbol *sym, bool finalize)
|
||||
}
|
||||
index_ = md.kernel_index;
|
||||
|
||||
size_t sizeOfWavesPerSimdHint = sizeof(workGroupInfo_.wavesPerSimdHint_);
|
||||
error = aclQueryInfo(dev().compiler(), prog().binaryElf(),
|
||||
RT_WAVES_PER_SIMD_HINT, openClKernelName.c_str(),
|
||||
&workGroupInfo_.wavesPerSimdHint_, &sizeOfWavesPerSimdHint);
|
||||
if (error != ACL_SUCCESS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
waveLimiter_.enable();
|
||||
|
||||
size_t sizeOfWorkGroupSizeHint = sizeof(workGroupInfo_.compileSizeHint_);
|
||||
error = aclQueryInfo(dev().compiler(), prog().binaryElf(),
|
||||
RT_WORK_GROUP_SIZE_HINT, openClKernelName.c_str(),
|
||||
workGroupInfo_.compileSizeHint_, &sizeOfWorkGroupSizeHint);
|
||||
if (error != ACL_SUCCESS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t sizeOfVecTypeHint;
|
||||
error = aclQueryInfo(dev().compiler(), prog().binaryElf(),
|
||||
RT_VEC_TYPE_HINT, openClKernelName.c_str(),
|
||||
NULL, &sizeOfVecTypeHint);
|
||||
if (error != ACL_SUCCESS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (0 != sizeOfVecTypeHint) {
|
||||
char* VecTypeHint = new char[sizeOfVecTypeHint + 1];
|
||||
if (NULL == VecTypeHint) {
|
||||
return false;
|
||||
}
|
||||
error = aclQueryInfo(dev().compiler(), prog().binaryElf(),
|
||||
RT_VEC_TYPE_HINT, openClKernelName.c_str(),
|
||||
VecTypeHint, &sizeOfVecTypeHint);
|
||||
if (error != ACL_SUCCESS) {
|
||||
return false;
|
||||
}
|
||||
VecTypeHint[sizeOfVecTypeHint] = '\0';
|
||||
workGroupInfo_.compileVecTypeHint_ = std::string(VecTypeHint);
|
||||
delete[] VecTypeHint;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user