[all-commits] [llvm/llvm-project] 5db397: [libc] Support timing information in libc tests

Joseph Huber via All-commits all-commits at lists.llvm.org
Wed Jul 5 12:27:25 PDT 2023


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

  Changed paths:
    M libc/src/__support/GPU/amdgpu/utils.h
    M libc/src/__support/GPU/generic/utils.h
    M libc/src/__support/GPU/nvptx/utils.h
    M libc/startup/gpu/amdgpu/start.cpp
    M libc/test/UnitTest/LibcTest.cpp
    M libc/utils/gpu/loader/amdgpu/Loader.cpp

  Log Message:
  -----------
  [libc] Support timing information in libc tests

This patch adds the necessary support to provide timing information in
`libc` tests. This is useful for determining which tests look what
amount of time. We also can use this as a test basis for providing more
fine-grained timing when implementing things on the GPU.

The main difficulty with this is the fact that the AMDGPU fixed
frequency clock operates at an unknown frequency. We need to read this
on a per-card basis from the driver and then copy it in. NVPTX on the
other hand has a fixed clock at a resolution of 1ns. I have also
increased the resolution of the print-outs as the majority of these are
below a millisecond for me.

Reviewed By: JonChesterfield

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




More information about the All-commits mailing list