[libc-commits] [PATCH] D155121: [libc] Add support for the 'fread' function on the GPU

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Jul 12 14:35:46 PDT 2023


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

This patch adds support for `fread` on the GPU via the RPC mechanism.
Here we simply pass the size of the read to the server and then copy it
back to the client via the RPC channel. This should allow us to do the
basic operations on files now. This will obviously be slow for large
sizes due ot the number of RPC calls involved, this could be optimized
further by having a special RPC call that can initiate a memcpy between
the two pointers.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D155121

Files:
  libc/config/gpu/entrypoints.txt
  libc/include/llvm-libc-types/rpc_opcodes_t.h
  libc/src/__support/File/gpu/file.cpp
  libc/test/src/stdio/CMakeLists.txt
  libc/test/src/stdio/fopen_test.cpp
  libc/utils/gpu/server/rpc_server.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155121.539739.patch
Type: text/x-patch
Size: 5920 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230712/67880a85/attachment.bin>


More information about the libc-commits mailing list