[all-commits] [llvm/llvm-project] 676430: [Libomptarget] Correctly implement `getWTime` on A...

Joseph Huber via All-commits all-commits at lists.llvm.org
Tue Jul 4 19:51:02 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6764301a6bd3ffe80f3469005cbe5dffd41ba073
      https://github.com/llvm/llvm-project/commit/6764301a6bd3ffe80f3469005cbe5dffd41ba073
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-07-04 (Tue, 04 Jul 2023)

  Changed paths:
    M openmp/libomptarget/DeviceRTL/include/Configuration.h
    M openmp/libomptarget/DeviceRTL/src/Configuration.cpp
    M openmp/libomptarget/DeviceRTL/src/Misc.cpp
    M openmp/libomptarget/include/DeviceEnvironment.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
    M openmp/libomptarget/test/offloading/wtime.c

  Log Message:
  -----------
  [Libomptarget] Correctly implement `getWTime` on AMDGPU

AMDGPU provides a fixed frequency clock since some generations back.
However, the frequency is variable by card and must be looked up at
runtime. This patch adds a new device environment line for the clock
frequency so that we can use it in the same way as NVPTX. This is the
correct implementation and the version in ASO should be replaced.

Reviewed By: tianshilei1992

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




More information about the All-commits mailing list