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
[ROCm/clr commit: 87ad3f9692]
This commit is contained in:
1 parent
09a507e8d0
commit
2fd27167df
4 files changed
+110
-44
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user