[libc-commits] [PATCH] D159225: [libc] Implement the 'nanosleep' function on the GPU

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Aug 30 14:00:46 PDT 2023


jhuber6 created this revision.
jhuber6 added reviewers: tra, arsenm, JonChesterfield, jdoerfert, sivachandra, lntue, michaelrj.
Herald added projects: libc-project, All.
Herald added a subscriber: libc-commits.
jhuber6 requested review of this revision.
Herald added a subscriber: wdng.

The GPU has the ability to sleep for very short periods of time. We can
map this to the existing `nanosleep` utility. This patch maps the
nanosleep utility to the existing hardware instructions as best as
possible.

Depends on D159118 <https://reviews.llvm.org/D159118>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D159225

Files:
  libc/config/gpu/api.td
  libc/config/gpu/entrypoints.txt
  libc/src/time/CMakeLists.txt
  libc/src/time/gpu/CMakeLists.txt
  libc/src/time/gpu/nanosleep.cpp
  libc/src/time/gpu/time_utils.cpp
  libc/src/time/gpu/time_utils.h
  libc/src/time/linux/CMakeLists.txt
  libc/src/time/linux/nanosleep.cpp
  libc/src/time/nanosleep.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159225.554826.patch
Type: text/x-patch
Size: 6261 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230830/d2fd88e5/attachment-0001.bin>


More information about the libc-commits mailing list