Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·213 lines (176 loc) · 9.23 KB
/
Copy pathMakefile
File metadata and controls
executable file
·213 lines (176 loc) · 9.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# Makefile for AgentKernelArena — Docker-first workflow
#
# All experiments run inside the pinned ROCm/SGLang container. Docker is the only
# supported path; the legacy host venv / `python main.py` workflow has been removed.
# See src/scripts/docker_benchmark.sh and docs/install/install.md.
SHELL := /bin/bash
.PHONY: help docker-shell docker-check-agents docker-smoke docker-build-rdna4 docker-run docker-parallel-run docker-quality-loop docker-sikl-task-builder docker-setup-flydsl docker-setup-geak docker-setup-forge \
slurm-shell slurm-smoke slurm-parallel-smoke slurm-check-agents slurm-run slurm-parallel-run slurm-submit slurm-parallel-submit \
check-docker-runner check-slurm-runner check-evaluator check-gpu-architecture check-held-out check-visualization \
visualization-build visualization-serve visualization-run \
check-perf-helpers cleanup-works install-cursor-agent
help:
@echo "AgentKernelArena Experimentation Platform - Makefile Commands"
@echo "======================================================"
@echo "Docker-first workflow (the only supported path):"
@echo "make docker-shell - Enter the runtime image with repo and agent auth mounted"
@echo "make docker-check-agents - Verify the first-class host CLI selected by CONFIG"
@echo " Use CONFIG=... for another config; AGENTS=... overrides it"
@echo " AGENTS=all checks Cursor, Claude Code, and Codex; DeepSeek is opt-in"
@echo "make docker-smoke - Verify Docker Python, ROCm tools, imports, and GPU access"
@echo "make docker-build-rdna4 - Prebuild/rebuild the gfx1201 and gfx1100 (Radeon PRO W7900) runtime (also builds on first use)"
@echo "make docker-run CONFIG=example_configs/quickstart_claude_mi300.yaml RUN_ARGS=\"--run-suffix test\" - Run an experiment in Docker"
@echo "make docker-parallel-run CONFIG=example_configs/benchmark_cursor_mi355x.yaml GPU_IDS=0,1 - Run an experiment across one worker container per GPU"
@echo " Default CONFIG is the generic MI300-series Claude quickstart"
@echo " On other GPUs, pass a matching CONFIG explicitly"
@echo " Images: gfx942->mi30x, gfx950->mi35x, gfx1201 and gfx1100 (W7900 only)->local RDNA4 build"
@echo "make docker-quality-loop CONFIG=example_configs/quality_loop_mi300.yaml - Audit and harden config-selected tasks, then open at most one draft PR"
@echo " Default quality-loop CONFIG is agents/quality_loop/agent_config.yaml"
@echo "make docker-sikl-task-builder INPUT=/path/to/bundle - Generate, repair and validate SIKL tasks"
@echo " Use SIKL_BUILDER_ARGS='resume --run-id ...' to resume"
@echo "make docker-setup-flydsl - Install FlyDSL when absent (for runs with target_language: flydsl)"
@echo "make docker-setup-geak - Install the Claude Agent SDK when absent (for the geak agent)"
@echo "make docker-setup-forge - Install Hyperloom[forge] from HYPERLOOM_ROOT's HEAD (for the forge agent)"
@echo "make check-docker-runner - Check Docker runner syntax and runtime-specific arguments"
@echo "make check-slurm-runner - Check Slurm/Spur resource and Docker handoff arguments"
@echo ""
@echo "Slurm/Spur workflow (Docker runs on the allocated GPU node):"
@echo "make slurm-shell - Allocate one GPU and enter the runtime container"
@echo "make slurm-smoke - Allocate one GPU and verify the Docker/ROCm runtime"
@echo "make slurm-parallel-smoke - Allocate 8 GPUs and verify one isolated container per GPU"
@echo "make slurm-check-agents CONFIG=config_codex_mi355x_spur.yaml - Check configured CLI/auth"
@echo "make slurm-run CONFIG=config_codex_mi355x_spur.yaml - Run synchronously on one GPU"
@echo "make slurm-submit CONFIG=config_codex_mi355x_spur.yaml - Submit a one-GPU batch run"
@echo "make slurm-parallel-submit CONFIG=... - Submit an 8-GPU, one-worker-per-GPU run"
@echo "make check-evaluator - Run centralized evaluator unit tests"
@echo "make check-gpu-architecture - Check model profiles and architecture prompts"
@echo "make check-held-out - Run held-out module unit tests"
@echo "make visualization-run - Build and serve the local comparison dashboard"
@echo "make check-visualization - Run visualization module unit tests"
@echo ""
@echo "Maintenance:"
@echo "make check-perf-helpers - Audit task benchmark entrypoints against src/tools/perf/"
@echo "make cleanup-works - Remove workspace_* directories and logs"
@echo "make install-cursor-agent - Install the Cursor Agent CLI on the host"
DOCKER_RUNNER := src/scripts/docker_benchmark.sh
SLURM_RUNNER := src/scripts/slurm_benchmark.sh
CONFIG ?= example_configs/quickstart_claude_mi300.yaml
RUN_ARGS ?=
QUALITY_LOOP_ARGS ?=
SIKL_BUILDER_ARGS ?= run
INPUT ?=
AGENTS ?=
VISUALIZATION_ARGS ?= --include-workspace-runs
VISUALIZATION_HOST ?= 127.0.0.1
VISUALIZATION_PORT ?= 8080
SLURM_PARTITION ?= amd-spur
SLURM_GPU_TYPE ?= mi355x
SLURM_GPU_ARCH ?= gfx950
SLURM_GPU_COUNT ?= 1
SLURM_PARALLEL_GPU_COUNT ?= 8
SLURM_CPUS ?= 16
SLURM_MEM ?= 64G
SLURM_TIME ?= 04:00:00
SLURM_PARALLEL_CPUS ?= 64
SLURM_PARALLEL_MEM ?= 512G
SLURM_PARALLEL_TIME ?= 1-00:00:00
SLURM_ACCOUNT ?=
SLURM_QOS ?=
SLURM_NODELIST ?=
SLURM_EXCLUSIVE ?= 0
SLURM_LOG_DIR ?= logs/slurm
SLURM_ENV = \
AKA_SLURM_PARTITION="$(SLURM_PARTITION)" \
AKA_SLURM_GPU_TYPE="$(SLURM_GPU_TYPE)" \
AKA_SLURM_GPU_ARCH="$(SLURM_GPU_ARCH)" \
AKA_SLURM_GPU_COUNT="$(SLURM_GPU_COUNT)" \
AKA_SLURM_PARALLEL_GPU_COUNT="$(SLURM_PARALLEL_GPU_COUNT)" \
AKA_SLURM_CPUS="$(SLURM_CPUS)" \
AKA_SLURM_MEM="$(SLURM_MEM)" \
AKA_SLURM_TIME="$(SLURM_TIME)" \
AKA_SLURM_PARALLEL_CPUS="$(SLURM_PARALLEL_CPUS)" \
AKA_SLURM_PARALLEL_MEM="$(SLURM_PARALLEL_MEM)" \
AKA_SLURM_PARALLEL_TIME="$(SLURM_PARALLEL_TIME)" \
AKA_SLURM_ACCOUNT="$(SLURM_ACCOUNT)" \
AKA_SLURM_QOS="$(SLURM_QOS)" \
AKA_SLURM_NODELIST="$(SLURM_NODELIST)" \
AKA_SLURM_EXCLUSIVE="$(SLURM_EXCLUSIVE)" \
AKA_SLURM_LOG_DIR="$(SLURM_LOG_DIR)"
docker-shell:
@$(DOCKER_RUNNER) shell
docker-check-agents:
@AKA_AGENTS="$(AGENTS)" $(DOCKER_RUNNER) check-agents --config_name $(CONFIG)
docker-smoke:
@$(DOCKER_RUNNER) smoke
docker-build-rdna4:
@$(DOCKER_RUNNER) build-rdna4-image
docker-run:
@$(DOCKER_RUNNER) run --config_name $(CONFIG) $(RUN_ARGS)
docker-parallel-run:
@GPU_IDS="$(GPU_IDS)" $(DOCKER_RUNNER) parallel-run --config_name $(CONFIG) $(RUN_ARGS)
docker-quality-loop: CONFIG = agents/quality_loop/agent_config.yaml
docker-quality-loop:
@$(DOCKER_RUNNER) quality-loop --config $(CONFIG) $(QUALITY_LOOP_ARGS)
docker-sikl-task-builder: CONFIG = agents/sikl_task_builder/agent_config.yaml
docker-sikl-task-builder:
@SIKL_INPUT="$(INPUT)" $(DOCKER_RUNNER) sikl-task-builder --config "$(CONFIG)" $(SIKL_BUILDER_ARGS)
slurm-shell:
@$(SLURM_ENV) $(SLURM_RUNNER) shell
slurm-smoke:
@$(SLURM_ENV) $(SLURM_RUNNER) smoke
slurm-parallel-smoke:
@$(SLURM_ENV) $(SLURM_RUNNER) parallel-smoke
slurm-check-agents:
@$(SLURM_ENV) AKA_AGENTS="$(AGENTS)" $(SLURM_RUNNER) check-agents --config_name $(CONFIG)
slurm-run:
@$(SLURM_ENV) $(SLURM_RUNNER) run --config_name $(CONFIG) $(RUN_ARGS)
slurm-parallel-run:
@$(SLURM_ENV) $(SLURM_RUNNER) parallel-run --config_name $(CONFIG) $(RUN_ARGS)
slurm-submit:
@$(SLURM_ENV) $(SLURM_RUNNER) submit --config_name $(CONFIG) $(RUN_ARGS)
slurm-parallel-submit:
@$(SLURM_ENV) $(SLURM_RUNNER) parallel-submit --config_name $(CONFIG) $(RUN_ARGS)
# Install FlyDSL into the container's persistent pip user-base when the selected
# image does not ship it. Needed by runs that target FlyDSL.
docker-setup-flydsl:
@$(DOCKER_RUNNER) setup-flydsl
# Install the Claude Agent SDK into the container's persistent pip user-base when
# the selected image does not ship it. Needed by the geak agent.
docker-setup-geak:
@$(DOCKER_RUNNER) setup-geak
# Install Hyperloom[forge] from the committed HEAD of HYPERLOOM_ROOT into the
# mounted pip user-base. Run and preflight repeat it when that revision changes.
docker-setup-forge:
@$(DOCKER_RUNNER) setup-forge
check-docker-runner:
@bash tests/test_docker_benchmark.sh
check-slurm-runner:
@bash tests/test_slurm_benchmark.sh
check-evaluator:
@python3 -m unittest discover -s tests -p 'test_evaluator_*.py'
check-gpu-architecture:
@python3 -m unittest discover -s tests -p 'test_gpu_architecture.py'
check-held-out:
@python3 -m unittest discover -s tests -p 'test_held_out.py'
check-visualization:
@python3 -m unittest discover -s tests -p 'test_visualization.py'
visualization-build:
@python3 -m src.visualization build $(VISUALIZATION_ARGS)
visualization-serve:
@python3 -m src.visualization serve --host "$(VISUALIZATION_HOST)" --port "$(VISUALIZATION_PORT)"
visualization-run:
@python3 -m src.visualization run $(VISUALIZATION_ARGS) \
--host "$(VISUALIZATION_HOST)" --port "$(VISUALIZATION_PORT)"
# Audit committed task benchmark entrypoints: every schema-v2 task is a serving
# recipe or serving client, and no generated helper copy is committed. Run
# workspaces receive the canonical code from src/tools/perf/.
check-perf-helpers:
@python3 src/tools/sync_perf_helpers.py
cleanup-works:
@echo "Removing workspace directories and logs..."
@rm -rf workspace_*
@rm -rf logs
@echo "✓ Workspace directories and logs removed"
install-cursor-agent:
@echo "Installing Cursor agent..."
@curl https://cursor.com/install -fsSL | bash