[libc-commits] [PATCH] D148288: [libc] Update RPC interface for system utilities on the GPU
Johannes Doerfert via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Apr 17 13:29:56 PDT 2023
jdoerfert added a comment.
Last real issue I have is the try open loop, see below.
================
Comment at: libc/src/__support/RPC/rpc.h:42
+ uint16_t opcode;
};
----------------
static assert sizeof
================
Comment at: libc/src/__support/RPC/rpc.h:301
+ sleep_briefly();
+ }
}
----------------
I think {try,}open need a common helper impl. but should not use each other.
The problem right now is that we check the in/out multiple times for no good reason.
In fact, we might get stuck in a weird state which we could reasonably report as error.
Why not a single impl. with a flag, in case it is set you loop, otherwise you give up?
================
Comment at: libc/utils/gpu/loader/Server.h:41
+ port->recv([](__llvm_libc::rpc::Buffer *buffer) {
+ exit(reinterpret_cast<uint32_t *>(buffer->data)[0]);
+ });
----------------
FWIW, later we want an easier way to get a single Ty value from the RPC. Seems like something common that should hide the casts and encoding.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148288/new/
https://reviews.llvm.org/D148288
More information about the libc-commits
mailing list