[libc-commits] [PATCH] D145913: [libc] Add initial support for an RPC mechanism for the GPU

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Mar 15 11:16:41 PDT 2023


jhuber6 added a comment.

There is no usage of these functions currently. Adding test support is WIP. Right now the following works if I use the tools manually

  namespace __llvm_libc {
  void write_to_stderr(const char *msg);
  void quick_exit(int);
  } // namespace __llvm_libc
  
  using namespace __llvm_libc;
  
  int main(int argc, char **argv) {
    for (int i = 0; i < argc; ++i) {
      write_to_stderr(argv[i]);
      write_to_stderr("\n");
    }
    quick_exit(127);
  }



  $ clang++ crt1.o rpc_client.o io.o quick_exit.o main.cpp -flto --target=amdgcn-amd-amdhsa -mcpu=gfx1030 -o image
  $ ./amdhsa_loader image args to the main function
  image
  args
  to
  the
  main
  function
  $ echo $?
  127


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145913



More information about the libc-commits mailing list