[PATCH] D20297: AMDGPU/SI: Make kernarg.segment.ptr point to implicit arguments for non HSA

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Fri May 20 19:00:44 PDT 2016


tstellarAMD added a comment.

> > > I think clover should move towards matching the HSA ABI closer. Most of the implicit arguments would then be user SGPR inputs like HSA uses, and the number of implicit args would be reduced.

> 

> > 

> 

> 

> This is a bit confusing. If the implicit args should be in SGPRs, wouldn't we need one intrinsic per implicit arg? and how would the number of implicit args be reduced? the only redundant one is global size (libclc computes it as num_groups * local_size).

> 

> > I agree.  I actually started working on this last week.  I think all implicit args that aren't passed in SGPRs should be at the end of the kernarg segment.

> 

> 

> My idea was to switch work_dim and newly implemented global_offset, as those are already appended (the rest can be switched by patches to libclc and clover). However, doesn't this contradict Matt's suggestion to pass implicit arguments in SGPRs?


SGPR space is limited, so we won't be able to pass all implicit arguments this way, so some will need to be added to the kernarg buffer.  The types of values that should be passed in SGPRs are things that tend to be common across all runtimes, like work-group/work-item size, scratch buffer pointers, etc.


Repository:
  rL LLVM

http://reviews.llvm.org/D20297





More information about the llvm-commits mailing list