P4 to Git Change 1772267 by michliao@hliao-dev-00-hip.rocm-workspace on 2019/04/19 15:53:44
SWDEV-187076 - Fix parameter initialization on COMPGR path.
- Once 'Args' or '.args' cannot be found, it should be regarded as no
argument is associated with that kernel instead of an error.
RB: http://ocltc.amd.com/reviews/r/17177/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.cpp#22 edit
[ROCm/clr commit: f874d958e8]
This commit is contained in:
@@ -1429,21 +1429,18 @@ void Kernel::InitParameters(const amd_comgr_metadata_node_t kernelMD) {
|
||||
|
||||
amd_comgr_metadata_node_t argsMeta;
|
||||
bool hsaArgsMeta = false;
|
||||
size_t argsSize;
|
||||
size_t argsSize = 0;
|
||||
|
||||
amd_comgr_status_t status = amd::Comgr::metadata_lookup(
|
||||
kernelMD,
|
||||
(codeObjectVer() == 2) ? "Args" : ".args",
|
||||
&argsMeta);
|
||||
// Assume no arguments if lookup fails.
|
||||
if (status == AMD_COMGR_STATUS_SUCCESS) {
|
||||
hsaArgsMeta = true;
|
||||
status = amd::Comgr::get_metadata_list_size(argsMeta, &argsSize);
|
||||
}
|
||||
|
||||
if (status != AMD_COMGR_STATUS_SUCCESS) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < argsSize; ++i) {
|
||||
KernelArgMD lcArg;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user