examples/cuda-fanout: rename demo_ops → bend-cuda
The CUDA binary that bend's gpu-worker.lsp spawns to run QECCOPS1 ops.bin sims is renamed from demo_ops to bend-cuda (production naming; AMD ROCm equivalent will land as bend-rocm). *binary-demo-ops* now reads BEND_CUDA env first, falls back to legacy DEMO_OPS env, then default path /home/fox/git/www.foxhop.net/ecdsa/cuda/ bend-cuda. The legacy demo_ops symlink is in place at the install side so back-compat holds during the rename transition. See www.foxhop.net commit (sibling repo) for the foxhop ecdsa side of the rename.
This commit is contained in:
parent
3599c23f23
commit
b4732371a0
1 changed files with 9 additions and 6 deletions
|
|
@ -35,12 +35,15 @@
|
|||
;; Override via env or per host.
|
||||
"./shake256-fanout")
|
||||
|
||||
;; demo_ops lives in the foxhop ecdsa repo and runs upstream-format
|
||||
;; bend-cuda lives in the foxhop ecdsa repo and runs upstream-format
|
||||
;; ops.bin against the CPU+GPU simulators, writing (cuda-sim-result …)
|
||||
;; portals via --portal. No daemon mode: spawn-per-call.
|
||||
;; BEND_CUDA env override > legacy DEMO_OPS env > default bend-cuda path
|
||||
;; > legacy demo_ops symlink (still in place during the rename transition).
|
||||
(define *binary-demo-ops*
|
||||
(or (get-environment-variable "DEMO_OPS")
|
||||
"/home/fox/git/www.foxhop.net/ecdsa/cuda/demo_ops"))
|
||||
(or (get-environment-variable "BEND_CUDA")
|
||||
(get-environment-variable "DEMO_OPS")
|
||||
"/home/fox/git/www.foxhop.net/ecdsa/cuda/bend-cuda"))
|
||||
|
||||
;; cgbn-batch-worker — bend form B. CGBN bignum batch over BSHK protocol;
|
||||
;; daemon mode mirrors shake256-fanout.cu (process-bin <in> <out>).
|
||||
|
|
@ -198,7 +201,7 @@
|
|||
;;; -- op handler -- cuda-sim-ops-bin -----------------------------
|
||||
;;;
|
||||
;;; Request: (cuda-sim-ops-bin <ops-bin-path> <n-batches>)
|
||||
;;; Spawns demo_ops <path> <n-batches> --portal <tmp>, drains its
|
||||
;;; Spawns bend-cuda <path> <n-batches> --portal <tmp>, drains its
|
||||
;;; stdout to EOF (process exit), reads the portal, returns the
|
||||
;;; parsed (cuda-sim-result ...) form unchanged so callers can pull
|
||||
;;; out gates / phase / timings.
|
||||
|
|
@ -216,7 +219,7 @@
|
|||
;; Walks (a b c ...) looking for (name <number>); returns #f if missing.
|
||||
(define (portal-find-number form name)
|
||||
;; Guard: form may arrive as #f when read-from-string sees an empty
|
||||
;; or malformed portal file (demo_ops crashed mid-write, OOM, etc).
|
||||
;; or malformed portal file (bend-cuda crashed mid-write, OOM, etc).
|
||||
;; A bare (cdr #f) here historically crashed the gpu-worker with
|
||||
;; "error: not a pair: #f", taking the port-8320 listener down.
|
||||
(cond
|
||||
|
|
@ -263,7 +266,7 @@
|
|||
(number->string n-batches)
|
||||
"--portal" portal-path))
|
||||
(pair (spawn-process-stdio *binary-demo-ops* argv)))
|
||||
;; demo_ops does not read stdin; drain stdout until exit.
|
||||
;; bend-cuda does not read stdin; drain stdout until exit.
|
||||
(drain-to-eof (cdr pair))
|
||||
(close-port (car pair))
|
||||
(close-port (cdr pair))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue