[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 5 19:25:53 PST 2018


yaxunl added a comment.

In D55067#1320691 <https://reviews.llvm.org/D55067#1320691>, @arsenm wrote:

> I think if we can just declare something simple to follow that doesn't depend on the IR type alignment, we could pack any basic type and align any aggregates to 4


>From the user point of view, I don't think it is a good idea to let the user calculate the offset and pass it to hipSetupArgument, especially if we want to have some specific alignment rules for amdgpu backend. We should just drop the offset parameter from hipSetupArgument and let the runtime figure out the offset based on device code metadata. This will always work no matter how backend changes the way to layout the kernel arguments.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55067/new/

https://reviews.llvm.org/D55067





More information about the cfe-commits mailing list