P4 to Git Change 1152294 by nhaustov@spb-hlc-tonga2_hsa on 2015/05/19 12:34:06
ECR #333756 - HSA Finalizer: Make sure size of kernarg segment, alignment of kernarg, private and group segments are multiple of 16. Update ORCA runtime assert. [ OpenCL integration of CL 1151953] Change by Nikolay Haustov Testing: http://ocltc:8111/viewModification.html?modId=51851&personal=true&init=1&tab=vcsModificationBuilds Also fix uncovered problem in test. Testing: pre-checkin Reviewed by: German Affected files ... ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/sc/HSAIL/hsail-fin/HSAILFinalizer.cpp#16 integrate ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/sc/HSAIL/tests/src/finalizer/features/structural_analysis/short_circuit/short_circuit06.hsail#4 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#284 edit
This commit is contained in:
@@ -4089,13 +4089,12 @@ HSAILKernel::loadArguments(
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// HSAIL kernarg segment size is rounded up to multiple of 16.
|
||||
aqlArgBuf = amd::alignUp(aqlArgBuf, 16);
|
||||
assert((aqlArgBuf == (gpu.cb(0)->sysMemCopy() + argsBufferSize())) &&
|
||||
"Size and the number of arguments don't match!");
|
||||
uint argBufSize = amd::alignUp(
|
||||
static_cast<uint>(argsBufferSize()), sizeof(uint32_t));
|
||||
hsa_kernel_dispatch_packet_t* hsaDisp =
|
||||
reinterpret_cast<hsa_kernel_dispatch_packet_t*>(
|
||||
gpu.cb(0)->sysMemCopy() + argBufSize);
|
||||
reinterpret_cast<hsa_kernel_dispatch_packet_t*>(aqlArgBuf);
|
||||
|
||||
amd::NDRange local(sizes.local());
|
||||
const amd::NDRange& global = sizes.global();
|
||||
@@ -4121,7 +4120,7 @@ HSAILKernel::loadArguments(
|
||||
hsaDisp->kernel_object = gpuAqlCode()->vmAddress();
|
||||
|
||||
ConstBuffer* cb = gpu.constBufs_[0];
|
||||
cb->uploadDataToHw(argBufSize + sizeof(hsa_kernel_dispatch_packet_t));
|
||||
cb->uploadDataToHw(argsBufferSize() + sizeof(hsa_kernel_dispatch_packet_t));
|
||||
uint64_t argList = cb->vmAddress() + cb->wrtOffset();
|
||||
|
||||
hsaDisp->kernarg_address = reinterpret_cast<void*>(argList);
|
||||
|
||||
Reference in New Issue
Block a user