P4 to Git Change 1310350 by lmoriche@lmoriche_opencl_dev on 2016/09/02 12:29:12
SWDEV-101853 - Use the PointeeAlignment metadata to align the dynamic LDS allocations at dispatch. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/amdgpu_metadata.cpp#3 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/amdgpu_metadata.hpp#3 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#11 edit
This commit is contained in:
@@ -56,9 +56,17 @@ GetHSAILArgType(const aclArgData* argInfo)
|
||||
inline static size_t
|
||||
GetHSAILArgAlignment(const amd::hsa::code::KernelArg::Metadata* lcArg)
|
||||
{
|
||||
if (lcArg->TypeKind() == AMDGPU::RuntimeMD::KernelArg::Pointer)
|
||||
if (lcArg->TypeKind() == AMDGPU::RuntimeMD::KernelArg::Pointer) {
|
||||
if (lcArg->AddrQual() == AMDGPU::RuntimeMD::KernelArg::Local) {
|
||||
uint32_t align = lcArg->PointeeAlign();
|
||||
if (align == 0) {
|
||||
LogWarning("Missing dynamic_shared_pointer alignment");
|
||||
align = 128; /* worst case alignment */;
|
||||
}
|
||||
return align;
|
||||
}
|
||||
return lcArg->Align();
|
||||
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
#endif // defined(WITH_LIGHTNING_COMPILER)
|
||||
|
||||
Reference in New Issue
Block a user