code wiki / (root) / nx_embed_gpu_live_gate.nx

nx_embed_gpu_live_gate.nx

buildroot/runtime/nx_embed_gpu_live_gate.nx

3910 B85 linesdepth 8pulls 13 transitivereach 0 importersview sourcekind gate/prooftopic embed
docsdependenciesstructsconstsfunctions

about

nx_embed_gpu_live_gate.nx -- e4 LIVE gate: the deployed :8033 daemon's /embed must return the BYTE-IDENTICAL Q24 vector for mode "i8" (CPU) and mode "gpu" (resident-weight GPU server via the unix-socket client in serve core). Also asserts the response labels mode:"gpu" and equal ntok. Requires: coder daemon relaunched on the new serve core + gpu_embed_serve --serve up. usage: nx_embed_gpu_live_gate [port] (default 8033) license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 1 imports · 0 importers

nx_code_index.nx nx_embed_gpu_live_gate.nx

imports: nx_code_index.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main std_atoi ci_ws std_pdec sys_mmap std_itoa sys_mmap ↻ sys_write sys_now_ms sys_mmap ↻ sys_clock_gettime_mono lb_embed lb_body ci_post_embed sys_socket nx_http_client_sockaddr_ip nx_connect_bounded nx_fcntl sys_connect sys_mmap ↻ sys_poll nx_http_client_build_reque nx_dec_emit_u63 _drain sys_read ci_parse_vec ci_find ci_kv ci_ws ↻ std_pdec ↻ ci_find ↻

structs

none

consts

9const EGL_PORT_DEFAULT: i64 = 8033 // the deployed coder daemon's /embed port
10const EGL_BODY_CAP: i64 = 4096 // request-body scratch (JSON is well under this)
11const EGL_RESP_CAP: i64 = 65536 // /embed response buffer (Q24 vector + labels)
12const EGL_ERRDUMP: i64 = 300 // bytes of the failing response to echo on RED
13const EGL_I64_BYTES: i64 = 8 // sizeof(i64) -- byte size of one vector element / pointer slot
14const EGL_ERR_POST: i64 = 1 // lb_embed sentinel: /embed POST returned nothing
15const EGL_ERR_PARSE: i64 = 2 // lb_embed sentinel: response vector length != CI_NE

functions

17func lb_body(mode: *u8, out: *u8) -> i64
called by 1: lb_embed
31func lb_embed(port: i64, mode: *u8, vec: *i64, resp: *u8, rescap: i64) -> i64
42func main(argc: i64, argv: *i64) -> i64