[PATCH] D39255: [AMDGPU] Emit metadata for hidden arguments for kernel enqueue

Yaxun Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 24 13:36:14 PDT 2017


yaxunl added a comment.

In https://reviews.llvm.org/D39255#905627, @t-tye wrote:

> If the kernel does not use the hidden arguments should they be listed in the metadata since the runtime is not required to pass them in? If not needed, the we still want to have a kernarg location at the known location, it will just not be initialized by the runtime.


In that case we just need runtime to fill in 0 values for the missing argument so that each hidden argument is in the fixed position. e.g. if runtime does not find printf metadata, it will still insert a nullptr as the PrintfBuffer argument. I think only library code uses these hidden arguments. Then library code can assume fixed position for each hidden argument.


https://reviews.llvm.org/D39255





More information about the llvm-commits mailing list