P4 to Git Change 1505728 by wchau@wchau_OCL_boltzmann on 2018/01/19 13:13:53

SWDEV-137270 - Add findLocalWorkSize to OpenCL runtime ROC device
	- Add support for kernel using image argument
	- fix the issue of not using the max workgroup size specified by the environment variables "maxWorkGroupSize*"

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#33 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.hpp#19 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocsettings.cpp#31 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#50 edit
Tá an tiomantas seo le fáil i:
foreman
2018-01-19 13:33:55 -05:00
tuismitheoir edb9746999
tiomantas 87ad3f9692
D'athraigh 4 comhad le 110 breiseanna agus 44 scriosta
+18
Féach ar an gComhad
@@ -545,6 +545,15 @@ void HSAILKernel::initArguments(const aclArgData* aclArg) {
desc.typeQualifier_ = GetOclTypeQual(aclArg);
desc.typeName_ = arg->typeName_.c_str();
// set image related flags
if (arg->type_ == ROC_ARGTYPE_IMAGE) {
flags_.imageEnable_ = true;
if (desc.accessQualifier_ == CL_KERNEL_ARG_ACCESS_WRITE_ONLY ||
desc.accessQualifier_ == CL_KERNEL_ARG_ACCESS_READ_WRITE) {
flags_.imageWrite_ = true;
}
}
// Make a check if it is local or global
if (desc.addressQualifier_ == CL_KERNEL_ARG_ADDRESS_LOCAL) {
desc.size_ = 0;
@@ -615,6 +624,15 @@ void LightningKernel::initArguments(const KernelMD& kernelMD) {
desc.typeQualifier_ = GetOclTypeQual(lcArg);
desc.typeName_ = lcArg.mTypeName.c_str();
// set image related flags
if (arg->type_ == ROC_ARGTYPE_IMAGE) {
flags_.imageEnable_ = true;
if (desc.accessQualifier_ == CL_KERNEL_ARG_ACCESS_WRITE_ONLY ||
desc.accessQualifier_ == CL_KERNEL_ARG_ACCESS_READ_WRITE) {
flags_.imageWrite_ = true;
}
}
// Make a check if it is local or global
if (desc.addressQualifier_ == CL_KERNEL_ARG_ADDRESS_LOCAL) {
desc.size_ = 0;