Changdao Dong via llvm-dev
2018-Aug-31 19:14 UTC
[llvm-dev] Can I control HSA config generated by AMDGPU backend?
I am using llvm clang to offline compile my opencl code into assembly. My target is amdgpu--amdhsa. The assembly file generated by clang has config of "enable_sgpr_dispatch_ptr = 1". Can I do something to turn that off in the generated assembly file? Also, it seems that the order of kernel arguments is in the reverse order of AMDCL2 convention. i.e. user argument is placed at the first place while hidden arguments like "HiddenGlobalOffsetX" are placed after user arguments. Can I change the order of the arguments so that the first argument will be hidden arguments before user arguments? Thanks a lot! -- DONG, Changdao dongchangdao at gmail.com <cddong at cmu.edu> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180831/477eacc2/attachment.html>
Matt Arsenault via llvm-dev
2018-Sep-05 18:31 UTC
[llvm-dev] Can I control HSA config generated by AMDGPU backend?
> On Sep 1, 2018, at 00:14, Changdao Dong via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > I am using llvm clang to offline compile my opencl code into assembly. My target is amdgpu--amdhsa. The assembly file generated by clang has config of "enable_sgpr_dispatch_ptr = 1". Can I do something to turn that off in the generated assembly file?This is inferred from whether or not the kernel requires it. You can avoid it by not using features that require the dispatch pointer. Just about anything does in practice, since it’s necessary for the normal workitem calculations.> Also, it seems that the order of kernel arguments is in the reverse order of AMDCL2 convention. i.e. user argument is placed at the first place while hidden arguments like "HiddenGlobalOffsetX" are placed after user arguments. Can I change the order of the arguments so that the first argument will be hidden arguments before user arguments? > > Thanks a lot!No, the AMDGPU backend doesn’t support the old HSAIL OpenCL ABI -Matt