[all-commits] [llvm/llvm-project] 07102a: [libc] Implement the 'abort' function on the GPU

Joseph Huber via All-commits all-commits at lists.llvm.org
Thu Aug 31 06:40:33 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 07102a11941d9287b58063e3d764694974205d53
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-08-31 (Thu, 31 Aug 2023)

  Changed paths:
    M libc/config/gpu/entrypoints.txt
    M libc/docs/gpu/support.rst
    M libc/include/llvm-libc-types/rpc_opcodes_t.h
    M libc/src/stdlib/gpu/CMakeLists.txt
    A libc/src/stdlib/gpu/abort.cpp
    M libc/utils/gpu/server/rpc_server.cpp

  Log Message:
  [libc] Implement the 'abort' function on the GPU

This function implements the `abort` function on the GPU. The
implementation here closely mirros the `exit` call where we first
synchornize with the RPC server to make sure it's listening and then we
exit on the GPU.

I was unsure if this should be a simple `__builtin_assert` on the GPU. I
elected to go with an RPC approach to make this a more "true" `abort`
call. That is, it should invoke some signal handlers and exit with the
proper code according to the implemented C library on the server.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D159210

More information about the All-commits mailing list