[libc-commits] [PATCH] D152028: [libc][Docs] Add some motivation for the GPU libc

Johannes Doerfert via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Jun 2 15:47:19 PDT 2023


jdoerfert added a comment.

Honestly, I feel this is too pessimistic and short sighted. I understand we likely don't want everything on a GPU, maybe event can't, but I would not be so eager to guess for some of the things mentioned here. File I/O, for one, is on my TODO list. The entire "we do not want dependencies" is nice, but also somewhat irrelevant given that the vendor libs are linked in (to this day) anyway. Sure, we do not link them into libcgpu, but that is not because of some grant design, IMHO, but rather because we didn't need to (yet). Once libmgpu arrives, we will have to (or link libdevice later), so we will do what the motivation now states we don't want to.



================
Comment at: libc/docs/gpu/motivation.rst:16
+accelerators. We deliberately choose to only implement a subset of the C library
+as some features are not expressly useful or easily implemented on the GPU. This
+will be discussed further in `Limitations <libc_gpu_limitations>`_. The main
----------------
typo


================
Comment at: libc/docs/gpu/motivation.rst:54
+currently support thread local variables so variables like ``errno`` are not
+provided. Furthermore, the GPU under the OpenCL model cannot safely provide a
+mutex interface, nor would it be profitable if implemented. This means that
----------------
2x currently

FWIW, GPUs have thread local variables, aka. __local__


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152028/new/

https://reviews.llvm.org/D152028



More information about the libc-commits mailing list