bend: cuda-sim-ops-bin handler + per-call CPU/GPU telemetry
gpu-worker.lsp gains a cuda-sim-ops-bin op handler that spawns demo_ops from www.foxhop.net/ecdsa/cuda via spawn-process-stdio, drains stdout, & parses our (cuda-sim-result ...) portal back. Each call now emits two log lines: ;;; bend RECV cuda-sim-ops-bin ops=PATH n-batches=N t-ms=... ;;; bend DONE cuda-sim-ops-bin n-batches=N wall-ms=W cpu-ms=C gpu-ms=G mismatches=0 gpu/cpu=R so we can tell how fast bend jobs run on CPU vs GPU per call. CLAUDE.md & www/index.html mention this integration is now live end-to-end across our fleet.
This commit is contained in:
parent
2919a2255d
commit
78ff89fb8b
3 changed files with 118 additions and 0 deletions
23
CLAUDE.md
23
CLAUDE.md
|
|
@ -44,6 +44,29 @@ Then ask fox about our mission.
|
|||
| GNU asm | `asm/` | `make asm-build` | `make asm-test` | `make asm-repl` |
|
||||
| All | — | — | `make test-all` | — |
|
||||
|
||||
## Bend — GPU dispatch primitive
|
||||
|
||||
`examples/cuda-fanout/` ships `(bend ...)` — runtime decides per call
|
||||
whether to evaluate locally or ship to a CUDA worker over our wire
|
||||
protocol. Two wire modes:
|
||||
|
||||
- **S-expression mode** (text) — for small payloads. Slow above ~1k
|
||||
inputs because parser cost dominates.
|
||||
- **Binary mode** (magic `BSHK` + raw bytes) — for huge payloads. 150x
|
||||
faster than S-exp at 1M inputs; bends past host hashlib by 12x.
|
||||
|
||||
Workers run on any tier (`make gpu-worker LUMBDA={c,python,asm}`).
|
||||
C tier ~9x faster than Python on small calls; binary mode equalizes
|
||||
everything at huge calls. Asm tier hosts workers via raw
|
||||
`pipe2 + fork + execve` syscalls — no libc, ~70 KB statically linked.
|
||||
|
||||
The integration with `www.foxhop.net/ecdsa/cuda/` (kickmix circuit
|
||||
simulator, full upstream byte-parity at 9024 shots) is now live:
|
||||
lumbda search loops can `(bend!-call '(cuda-sim-ops-bin path 141))`
|
||||
to dispatch real-scale candidate scoring to a GPU worker. The Phase B
|
||||
1-8 secp256k1 arithmetic landed on the foxhop side this session, so
|
||||
the substrate has every piece it needs.
|
||||
|
||||
## Test Suites
|
||||
|
||||
- Python unit/integration: `tests.py` (571 tests)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue