[all-commits] [llvm/llvm-project] 460840: [OpenMP] Support 'omp_get_num_procs' on the device...

Joseph Huber via All-commits all-commits at lists.llvm.org
Wed Sep 6 11:45:19 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 460840c09d011cc1e0b5c01c605c944fe92208bd
      https://github.com/llvm/llvm-project/commit/460840c09d011cc1e0b5c01c605c944fe92208bd
  Author: Joseph Huber <35342157+jhuber6 at users.noreply.github.com>
  Date:   2023-09-06 (Wed, 06 Sep 2023)

  Changed paths:
    M openmp/libomptarget/DeviceRTL/include/Configuration.h
    M openmp/libomptarget/DeviceRTL/src/Configuration.cpp
    M openmp/libomptarget/DeviceRTL/src/Mapping.cpp
    M openmp/libomptarget/include/Environment.h
    M openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
    M openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp
    M openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h
    M openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
    A openmp/libomptarget/test/api/omp_get_num_procs.c

  Log Message:
  -----------
  [OpenMP] Support 'omp_get_num_procs' on the device (#65501)

Summary:
The `omp_get_num_procs()` function should return the amount of
parallelism availible. On the GPU, this was not defined. We have elected
to define this function as the maximum amount of wavefronts / warps that
can be simultaneously resident on the device. For AMDGPU this is the
number of CUs multiplied byth CU's per wave. For NVPTX this is the
maximum threads per SM divided by the warp size and multiplied by the
number of SMs.




More information about the All-commits mailing list