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
orang tua c149902a4d
melakukan f6d8feabeb
10 mengubah file dengan 127 tambahan dan 131 penghapusan
+9 -8
Melihat File
@@ -378,7 +378,7 @@ size_t KernelArg::size(bool gpuLayer) const {
return (gpuLayer) ? 0 : sizeof(cl_mem);
case PointerLocal:
case PointerHwLocal:
return (gpuLayer) ? sizeof(uint32_t) * size_ : 0;
return (gpuLayer) ? sizeof(uint32_t) * size_ : sizeof(cl_mem);
case PointerPrivate:
case PointerHwPrivate:
return (gpuLayer) ? sizeof(uint32_t) * size_ : 0;
@@ -2991,7 +2991,7 @@ void HSAILKernel::initArgList(const aclArgData* aclArg) {
// Make a check if it is local or global
if (desc.addressQualifier_ == CL_KERNEL_ARG_ADDRESS_LOCAL) {
desc.size_ = 0;
desc.size_ = sizeof(cl_mem);
} else {
desc.size_ = GetOclSize(aclArg);
}
@@ -3000,10 +3000,7 @@ void HSAILKernel::initArgList(const aclArgData* aclArg) {
// 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);
}
offset = amd::alignUp(offset, std::min(size, size_t(16)));
desc.offset_ = offset;
offset += amd::alignUp(size, sizeof(uint32_t));
@@ -3527,8 +3524,12 @@ hsa_kernel_dispatch_packet_t* HSAILKernel::loadArguments(
else {
assert((arg->addrQual_ == HSAIL_ADDRESS_LOCAL) && "Unsupported address type");
ldsAddress = amd::alignUp(ldsAddress, arg->alignment_);
WriteAqlArg(&aqlArgBuf, &ldsAddress, sizeof(size_t));
ldsAddress += *reinterpret_cast<const size_t*>(paramaddr);
WriteAqlArg(&aqlArgBuf, &ldsAddress, desc.size_);
if (desc.size_ == 8) {
ldsAddress += *reinterpret_cast<const uint64_t*>(paramaddr);
} else {
ldsAddress += *reinterpret_cast<const uint32_t*>(paramaddr);
}
}
break;
case HSAIL_ARGTYPE_VALUE: