[Openmp-commits] [PATCH] D87084: [OpenMP][AMDGPU] Use DS_Max_Warp_Number instead of WARPSIZE

Pushpinder Singh via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Sep 3 18:51:25 PDT 2020

pdhaliwal added a comment.

Only places where it was accessed are here <https://github.com/llvm/llvm-project/blob/master/openmp/libomptarget/deviceRTLs/common/src/omptarget.cu#L141> and here <https://github.com/llvm/llvm-project/blob/master/openmp/libomptarget/deviceRTLs/common/src/data_sharing.cu#L30>. Jon's observation is correct. The maximum number of threads on both amdgcn and nvptx is 1024. However, on amdgcn, wave size is 64 and so maximum number of waves can be 16 and on nvptx, the warp size is 32 and maximum number of warps is 32.

And, this array is not completely dead yet as generic mode uses this for locals allocation whenever compiler is unable to properly detect if the method is being executed in generic mode or spmd mode (atleast on amdgcn).

@jdoerfert thanks for noticing, our local fork was already using DS_Max_Warp_Number in data_sharing_init_stack_common, I will change this here as well. This will not impact nvptx.

  rG LLVM Github Monorepo



More information about the Openmp-commits mailing list