This patch does the noisy work of removing the test opcodes from the exported interface to an interface that is only visible in `libc`. The benefit of this is that we both test the exported RPC registration more directly, and we do not need to give this interface to users. I have decided to export any opcode that is not a "core" libc feature as having its MSB set in the opcode. We can think of these as non-libc "extensions". Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D154848
25 lines
681 B
ReStructuredText
25 lines
681 B
ReStructuredText
.. _libc_gpu_rpc:
|
|
|
|
======================
|
|
Remote Procedure Calls
|
|
======================
|
|
|
|
.. contents:: Table of Contents
|
|
:depth: 4
|
|
:local:
|
|
|
|
Remote Procedure Call Implementation
|
|
====================================
|
|
|
|
Certain features from the standard C library, such as allocation or printing,
|
|
require support from the operating system. We instead implement a remote
|
|
procedure call (RPC) interface to allow submitting work from the GPU to a host
|
|
server that forwards it to the host system.
|
|
|
|
Extensions
|
|
----------
|
|
|
|
We describe which operation the RPC server should take with a 16-bit opcode. We
|
|
consider the first 32768 numbers to be reserved while the others are free to
|
|
use.
|