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

Jon Chesterfield via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Jun 2 15:54:20 PDT 2023


JonChesterfield added a comment.

Way back I started down this path because I thought running N lua virtual machines on a gpu would be an interesting programming model and the reference lua machine is written in C. Whether that's motivation for anyone else is not totally clear to me.

In principle I'd like to be able to do things like put a sqlite database instance in a persistent kernel. In general a persistent kernel that spawns other threads on the GPU and occasionally calls into the CPU is an interesting alternative to the current offload in batches model. Perhaps we'll be able to DMA from a nic into GPU memory, do some maths, push results back without the host cpu doing anything much.

Today my primary interest in libc is as a precise and comprehensive vehicle for stress testing the GPU back ends, so that when people try to use them for general purpose software things they have a better experience, but tomorrow I hope it'll be the layer below more complicated GPU applications.



================
Comment at: libc/docs/gpu/motivation.rst:20
+services for the GPU.
+
+The main idea behind this project is that programming GPUs can be as
----------------
Libc isn't really here to provide host services. It's to provide a familiar userspace. It's also a reasonable foundation for bigger userspace stuff, notably libc++. Weve just started with the host services part because without syscall a lot of libc can't do anything.


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