make gpu-worker: default to C tier
C tier is ~10× faster than Python tier on wire orchestration & has the same primitives shipped this session. Python tier still available for development debugging via LUMBDA=python; asm via LUMBDA=asm. Auto-builds the chosen tier (c-build or asm-build) before launching so a fresh clone runs cleanly without 'make c-build && make gpu-worker' two-step. Web page Start-a-GPU-worker subsection updated to match.
This commit is contained in:
parent
698a5d5f04
commit
14edb57cd4
2 changed files with 11 additions and 8 deletions
12
Makefile
12
Makefile
|
|
@ -195,7 +195,7 @@ friction: c-build asm-build
|
|||
|
||||
GPU_WORKER_DIR := examples/cuda-fanout
|
||||
PORT ?= 9091
|
||||
LUMBDA ?= python
|
||||
LUMBDA ?= c
|
||||
|
||||
gpu-worker-bin:
|
||||
$(MAKE) -C $(GPU_WORKER_DIR) shake256-fanout
|
||||
|
|
@ -203,14 +203,16 @@ gpu-worker-bin:
|
|||
gpu-worker: gpu-worker-bin
|
||||
@echo "→ launching gpu-worker.lsp on port $(PORT) ($(LUMBDA) tier)"
|
||||
@printf '(load "wire.lsp")\n(load "gpu-worker.lsp")\n(main)\n' > $(GPU_WORKER_DIR)/launch.lsp
|
||||
ifeq ($(LUMBDA),python)
|
||||
cd $(GPU_WORKER_DIR) && python3 -u ../../lumbda.py launch.lsp --port $(PORT)
|
||||
else ifeq ($(LUMBDA),c)
|
||||
ifeq ($(LUMBDA),c)
|
||||
$(MAKE) c-build
|
||||
cd $(GPU_WORKER_DIR) && ../../c/lumbda launch.lsp --port $(PORT)
|
||||
else ifeq ($(LUMBDA),python)
|
||||
cd $(GPU_WORKER_DIR) && python3 -u ../../lumbda.py launch.lsp --port $(PORT)
|
||||
else ifeq ($(LUMBDA),asm)
|
||||
$(MAKE) asm-build
|
||||
cd $(GPU_WORKER_DIR) && ../../asm/lumbda-gc launch.lsp --port $(PORT)
|
||||
else
|
||||
@echo "LUMBDA=$(LUMBDA) — expected python | c | asm"; exit 2
|
||||
@echo "LUMBDA=$(LUMBDA) — expected c | python | asm"; exit 2
|
||||
endif
|
||||
|
||||
gpu-worker-test: gpu-worker-bin
|
||||
|
|
|
|||
|
|
@ -67,11 +67,12 @@ make test-all</code></pre>
|
|||
<pre><code># On any host with nvcc + a CUDA-capable GPU:
|
||||
make gpu-worker
|
||||
# → builds examples/cuda-fanout/shake256-fanout
|
||||
# → launches gpu-worker.lsp on port 9091 (Python tier)
|
||||
# → builds the C tier (~10× faster wire orchestration than Python)
|
||||
# → launches gpu-worker.lsp on port 9091
|
||||
|
||||
# Override tier or port:
|
||||
make gpu-worker LUMBDA=c PORT=9001
|
||||
make gpu-worker LUMBDA=asm</code></pre>
|
||||
make gpu-worker LUMBDA=python PORT=9001 # easier debugging
|
||||
make gpu-worker LUMBDA=asm # smallest footprint</code></pre>
|
||||
|
||||
<h3>Call it from any tier</h3>
|
||||
<pre><code>;; bend works on every tier — Python, C, asm — through the same
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue