[libc-commits] [PATCH] D148635: [libc] Add a support library for GPU utilities

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Apr 18 07:52:03 PDT 2023


jhuber6 created this revision.
jhuber6 added reviewers: sivachandra, lntue, michaelrj, JonChesterfield, tianshilei1992, jdoerfert, tra.
Herald added subscribers: libc-commits, kosarev, mattd, asavonic, ecnelises, kerbowa, tschuett, jvesely.
Herald added projects: libc-project, All.
jhuber6 requested review of this revision.

The GPU has many features that can only be accessed through builtin or
intrinsic functions. Furthermore, these functions are unique for each
GPU target. This patch outlines an interface to create a common `libc`
interface to access these. Currently I only implement a function for the
CUDA equivalent of `blockIdx.x`. More will be added in the future.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148635

Files:
  libc/src/__support/CMakeLists.txt
  libc/src/__support/GPU/CMakeLists.txt
  libc/src/__support/GPU/amdgpu/CMakeLists.txt
  libc/src/__support/GPU/amdgpu/utils.h
  libc/src/__support/GPU/nvptx/CMakeLists.txt
  libc/src/__support/GPU/nvptx/utils.h
  libc/src/__support/GPU/utils.h
  libc/src/__support/RPC/CMakeLists.txt
  libc/src/__support/RPC/rpc.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148635.514642.patch
Type: text/x-patch
Size: 4798 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230418/07c3d0b9/attachment-0001.bin>


More information about the libc-commits mailing list