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
Αυτή η υποβολή περιλαμβάνεται σε:
@@ -559,22 +559,13 @@ void HSAILKernel::initArguments(const aclArgData* aclArg) {
|
||||
flags_.imageWrite_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
offset = amd::alignUp(offset, std::min(size, size_t(16)));
|
||||
desc.offset_ = offset;
|
||||
offset += amd::alignUp(size, sizeof(uint32_t));
|
||||
@@ -638,22 +629,13 @@ void LightningKernel::initArguments(const KernelMD& kernelMD) {
|
||||
flags_.imageWrite_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
offset = (size_t)amd::alignUp(offset, std::min(size, size_t(16)));
|
||||
desc.offset_ = offset;
|
||||
offset += amd::alignUp(size, sizeof(uint32_t));
|
||||
|
||||
Αναφορά σε νέο ζήτημα
Block a user