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

Tony Tye via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 24 16:36:15 PDT 2017


t-tye added a comment.

In https://reviews.llvm.org/D39255#905658, @yaxunl wrote:

> 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.


So will the metadata only be generated for the hidden arguments that actually need to be initialized by the runtime? I believe the metadata format contains the position of the argument so it is possible to set up non-contiguous arguments (namely, can skip the ones that will not be used).


https://reviews.llvm.org/D39255





More information about the llvm-commits mailing list