[llvm-dev] Can I control HSA config generated by AMDGPU backend?

Matt Arsenault via llvm-dev llvm-dev at lists.llvm.org
Wed Sep 5 11:31:06 PDT 2018



> 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


More information about the llvm-dev mailing list