[all-commits] [llvm/llvm-project] bad44d: [OpenMP] Add RTL function for getting number of th...

Joseph Huber via All-commits all-commits at lists.llvm.org
Fri Oct 8 19:22:17 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bad44d5f39bc29c1062f0c4ce8b71720734ad3cb
      https://github.com/llvm/llvm-project/commit/bad44d5f39bc29c1062f0c4ce8b71720734ad3cb
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2021-10-08 (Fri, 08 Oct 2021)

  Changed paths:
    M clang/lib/CodeGen/CGOpenMPRuntimeAMDGCN.cpp
    M clang/lib/CodeGen/CGOpenMPRuntimeAMDGCN.h
    M clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
    M clang/lib/CodeGen/CGOpenMPRuntimeGPU.h
    M clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
    M clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h
    M clang/test/OpenMP/nvptx_distribute_parallel_generic_mode_codegen.cpp
    M clang/test/OpenMP/nvptx_parallel_codegen.cpp
    M clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_codegen.cpp
    M clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_generic_mode_codegen.cpp
    M clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_simd_codegen.cpp
    M openmp/libomptarget/DeviceRTL/include/Interface.h
    M openmp/libomptarget/DeviceRTL/src/Mapping.cpp
    M openmp/libomptarget/DeviceRTL/src/Utils.cpp

  Log Message:
  -----------
  [OpenMP] Add RTL function for getting number of threads in block.

This patch adds support for the
`__kmpc_get_hardware_num_threads_in_block` function that returns the
number of threads. This was missing in the new runtime and was used by
the AMDGPU plugin which prevented it from using the new runtime. This
patchs also unified the interface for getting the thread numbers in the
frontend.

Originally authored by jdoerfert.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D111475




More information about the All-commits mailing list