Update code object V3 kernarg queries
Code object V2 had the ability to support the following queries:
- HSA_CODE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_SIZE
- HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_SIZE
- HSA_CODE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_ALIGNMENT
- HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_ALIGNMENT
However code object V3 onwards cannot support these as the kernel
descriptor changed. These queries need to be deprecated.
Until then return more reasonable values:
- For kernarg alignment return 16 which is the minimum alignment
required by the HSA standard.
- For kernarg size return the field from the kernel descriptor which
is a hint. If it is 0 then the compiler is not specifying the kernarg
size, or the kernel has no kernarg.
Change-Id: I19ce6cd0f3658a2bf62277492f39100ea5ab4256
[ROCm/ROCR-Runtime commit: ef755e4c82]
Этот коммит содержится в:
@@ -1422,8 +1422,8 @@ hsa_status_t ExecutableImpl::LoadDefinitionSymbol(hsa_agent_t agent,
|
||||
llvm::amdhsa::kernel_descriptor_t kd;
|
||||
sym->GetSection()->getData(sym->SectionOffset(), &kd, sizeof(kd));
|
||||
|
||||
uint32_t kernarg_segment_size = 0; // FIXME.
|
||||
uint32_t kernarg_segment_alignment = 0; // FIXME.
|
||||
uint32_t kernarg_segment_size = kd.kernarg_size; // FIXME: If 0 then the compiler is not specifying the size.
|
||||
uint32_t kernarg_segment_alignment = 16; // FIXME: Use the minumum HSA required alignment.
|
||||
uint32_t group_segment_size = kd.group_segment_fixed_size;
|
||||
uint32_t private_segment_size = kd.private_segment_fixed_size;
|
||||
bool is_dynamic_callstack = false;
|
||||
|
||||
Ссылка в новой задаче
Block a user