P4 to Git Change 1568521 by gandryey@gera-w8 on 2018/06/14 17:43:52

SWDEV-79445 - OCL generic changes and code clean-up
	- Change LDS setup to account the size, since LC forces 4 bytes for LDS offsets always

	http://ocltc.amd.com/reviews/r/15197/

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_execute.cpp#28 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_program.cpp#49 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpublit.cpp#130 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#327 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palblit.cpp#25 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#56 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#109 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocblit.hpp#11 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#38 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.cpp#88 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/kernel.cpp#34 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/kernel.hpp#25 edit
This commit is contained in:
foreman
2018-06-14 17:51:35 -04:00
والد c149902a4d
کامیت f6d8feabeb
10فایلهای تغییر یافته به همراه127 افزوده شده و 131 حذف شده
@@ -478,22 +478,13 @@ void HSAILKernel::initArgList(const aclArgData* aclArg) {
desc.typeName_ = arguments_[i]->typeName_.c_str();
desc.info_.oclObject_ = GetOclArgumentType(arguments_[i]);
desc.info_.arrayIndex_ = arguments_[i]->pointeeAlignment_;
// Make a check if it is local or global
if (desc.addressQualifier_ == CL_KERNEL_ARG_ADDRESS_LOCAL) {
desc.size_ = 0;
} else {
desc.size_ = arguments_[i]->size_;
}
desc.size_ = arguments_[i]->size_;
// Make offset alignment to match CPU metadata, since
// in multidevice config abstraction layer has a single signature
// and CPU sends the paramaters as they are allocated in memory
size_t size = desc.size_;
if (size == 0) {
// Local memory for CPU
size = sizeof(cl_mem);
}
// Check if HSAIL expects data by reference and allocate it behind
if (arguments_[i]->type_ == HSAIL_ARGTYPE_REFERENCE) {
desc.offset_ = offsetStruct;
@@ -1348,22 +1339,13 @@ void LightningKernel::initArgList(const KernelMD& kernelMD) {
desc.typeName_ = lcArg.mTypeName.c_str();
desc.info_.oclObject_ = GetOclArgumentType(arg);
desc.info_.arrayIndex_ = arg->pointeeAlignment_;
// Make a check if it is local or global
if (desc.addressQualifier_ == CL_KERNEL_ARG_ADDRESS_LOCAL) {
desc.size_ = 0;
} else {
desc.size_ = arg->size_;
}
desc.size_ = arg->size_;
// Make offset alignment to match CPU metadata, since
// in multidevice config abstraction layer has a single signature
// and CPU sends the parameters as they are allocated in memory
size_t size = desc.size_;
if (size == 0) {
// Local memory for CPU
size = sizeof(cl_mem);
}
// Check if HSAIL expects data by reference and allocate it behind
if (arguments_[i]->type_ == HSAIL_ARGTYPE_REFERENCE) {
desc.offset_ = offsetStruct;