From 51c47fcc2e781ee0c6ce2bc58081f93fb7cc09db Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Mon, 12 Nov 2018 01:51:59 +0000 Subject: [PATCH] Missing handling nullary `__global__` functions for mixed arity cases. [ROCm/hip commit: 4ebc229b9ad496d3974641273eba4a5cb8a7af72] --- projects/hip/src/program_state.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/projects/hip/src/program_state.cpp b/projects/hip/src/program_state.cpp index 97e9035e0d..7e42a44245 100644 --- a/projects/hip/src/program_state.cpp +++ b/projects/hip/src/program_state.cpp @@ -409,13 +409,18 @@ void read_kernarg_metadata( auto fn = tmp.substr(dx, tmp.find_first_of("'\n", dx) - dx); dx += fn.size(); + + auto dx1 = tmp.find("CodeProps", dx); dx = tmp.find("Args:", dx); + if (dx1 < dx) { + dx = dx1; + continue; + } if (dx == string::npos) break; static constexpr decltype(tmp.size()) args_sz{5}; - dx = parse_args( - tmp, dx + args_sz, tmp.find("CodeProps", dx), kernargs[fn]); + dx = parse_args(tmp, dx + args_sz, dx1, kernargs[fn]); } while (true); } }