AgentKernelArena configuration and API reference#
2026-07-21
7 min read time
This topic documents run configuration files, per-task configuration, command-line flags, scoring formula, and agent registry.
Run configuration#
A run configuration defines a single experiment. Start from a file under
example_configs/ and copy it when creating a new experiment.
Field |
Type |
Description |
|---|---|---|
|
string |
Agent to run. One of the supported agents. |
|
list of strings |
Task selectors relative to |
|
string |
Target GPU model, for example |
|
string |
Directory for run logs. |
|
string |
Prefix for the workspace directory. The full name is |
Specialized GEAK and mini-swe integrations also accept some optional top-level fields:
Field |
Type |
Description |
|---|---|---|
|
string |
Comma-separated GPU IDs exposed to specialized internal workers. This is separate from the host runner’s |
|
integer |
Number of GEAK sub-agents/worktrees to run in parallel. mini-swe configures this under its agent config instead. |
|
string |
|
Agent-specific settings remain in agents/<agent_name>/agent_config.yaml; see
the selected integration’s directory for precedence rules and additional fields.
Example:
agent:
template: cursor
tasks:
- hip2hip/gpumode/GELU
- triton2triton/vllm/triton_rms_norm
target_gpu_model: MI300
log_directory: logs
workspace_directory_prefix: workspace
Command-line flags#
The in-container main.py entrypoint accepts these flags:
Flag |
Description |
|---|---|
|
Config file to load (default |
|
Suffix appended to the run directory name (letters, numbers, |
|
Resume a specific run directory, skipping completed tasks |
|
Resume the most recent run in the workspace |
These flags are passed to the in-container entrypoint through make docker-run
or make docker-parallel-run (CONFIG= sets --config_name; RUN_ARGS=
forwards the rest):
make docker-run CONFIG=config_triton.yaml RUN_ARGS="--run-suffix with_mcp"
make docker-parallel-run CONFIG=config_triton.yaml GPU_IDS=0,1 RUN_ARGS="--run-suffix with_mcp_parallel"
The following flags are internal implementation details used by
docker-parallel-run and should not be passed manually in normal use:
Flag |
Description |
|---|---|
|
Explicit run directory shared by parallel init, workers, and post-processing |
|
Initialize the shared |
|
Claim and execute tasks from the shared queue |
|
Worker identifier used in queue descriptors and logs |
|
Aggregate results once after all workers finish |
Docker runner Make targets#
The following Make targets are available for running experiments.
Target |
Description |
|---|---|
|
Run tasks serially in one Docker container |
|
Run one Docker worker per listed GPU, using a shared dynamic task queue |
|
Verify Docker, ROCm runtime visibility, Python imports, and GPU access |
|
Verify the first-class host CLI selected by the config inside Docker ( |
|
Open an interactive shell in the experiment runtime |
docker-parallel-run accepts these environment variables:
Variable |
Description |
|---|---|
|
Comma- or space-separated host GPU IDs. If omitted, the runner uses |
|
Additional |
|
Logical GPU index inside a masked worker container. Defaults to |
Each parallel worker sets ROCR_VISIBLE_DEVICES to the host GPU ID and sets
HIP_VISIBLE_DEVICES, CUDA_VISIBLE_DEVICES, and GPU_DEVICE_ORDINAL to the
logical GPU index inside the masked container. See
Run tasks in parallel across multiple GPUs for the
full scheduling model.
Task configuration#
Each task is defined by a config.yaml in its directory. Command fields are
lists.
For isolated-kernel tasks (hip2hip, cuda2hip, triton2triton,
triton2flydsl, instruction2triton, torch2hip, torch2flydsl, and
flydsl2flydsl):
Field |
Required |
Description |
|---|---|---|
|
Yes |
Source files containing the kernel, relative to the task root |
|
Yes |
Kernel function names that must be defined in the source |
|
Yes |
Command(s) to compile or build-check |
|
Yes |
Command(s) to validate correctness |
|
Yes |
One of |
|
No |
Command(s) to measure performance |
|
No |
Per-command compilation timeout in seconds (default |
|
No |
Per-command correctness timeout in seconds (default |
|
No |
Per-command performance timeout in seconds (default |
|
No |
Legacy compatibility field. The centralized evaluator writes the standard result schema regardless of this value |
|
No |
Optional run-gating metadata; see below |
|
No |
Override the prompt’s source-code section |
|
No |
Custom prompt instructions |
|
No |
Reference/cheatsheet content for the prompt |
For repository-level tasks (task_type: repository):
Field |
Required |
Description |
|---|---|---|
|
Yes |
Upstream repository to clone for the task |
|
Yes |
Must be |
|
Yes |
Primary optimization stack, for example |
|
Yes |
Command(s) to compile or build-check |
|
Yes |
Command(s) to validate correctness |
|
No |
Command(s) to measure performance |
|
No |
Per-command compilation timeout in seconds (default |
|
No |
Per-command correctness timeout in seconds (default |
|
No |
Per-command performance timeout in seconds (default |
|
No |
Setup command(s) to run after cloning the upstream repository |
|
No |
Controls when |
|
No |
Workspace subdirectory for the clone; defaults to the repository name derived from |
|
No |
Optional target source-file hints, relative to the cloned repository root |
|
No |
Optional target function or kernel-symbol hints |
|
No |
Optional run-gating metadata; see below |
|
No |
Custom prompt instructions |
|
No |
Reference/cheatsheet content for the prompt |
See Add a task for layout and authoring rules.
Platform support#
platform_support.status: skip excludes a task unconditionally. An active task
with platform_support.required_arch is run only when that value matches the
detected GPU architecture. If platform_support is omitted, the task remains
runnable on every architecture.
Result schema (task_result.yaml)#
Each task produces a task_result.yaml in its workspace:
Field |
Description |
|---|---|
|
Full task-directory path relative to |
|
Whether the optimized kernel compiled |
|
Error text if compilation failed, else |
|
Whether correctness passed |
|
Error text if correctness failed, else |
|
Baseline runtime in ms |
|
Best optimized runtime in ms |
|
Speedup over baseline |
|
Timing methods observed while measuring the baseline |
|
Timing methods observed while measuring the optimized kernel |
|
Whether baseline and optimized timing methods matched |
|
Number of baseline test cases with usable timing results |
|
Number of optimized test cases with usable timing results |
|
Error text if speedup could not be calculated, else |
|
Framework-generated note identifying the optimizing agent and centralized evaluator |
|
Computed score (see below) |
Scoring#
The score is the sum of three components:
Component |
Points |
Condition |
|---|---|---|
Compilation |
|
The kernel compiles successfully |
Correctness |
|
The kernel passes the correctness check |
Speedup |
|
Added only when compilation and correctness pass |
The rules, expressed as the framework applies them:
Compilation fails → score
0.Compilation passes, correctness fails → score
20.Both pass →
120 + speedup_ratio × 100.
Example: A kernel that compiles (20), is correct (100), and achieves a
1.58× speedup scores 20 + 100 + 158 = 278.
The speedup used for scoring prefers the explicit speedup_ratio written by the
evaluator (which weights each test case equally for multi-testcase tasks) and
falls back to base_execution_time / best_optimized_execution_time when an
explicit ratio is not present.
This is the default scoring scheme; you can define your own in src/score.py.
For an A/B pair, compare completed run directories with:
python3 compare_runs.py <baseline-run-directory> <treatment-run-directory>
Agent registry#
Agents register themselves into a shared registry with the register_agent
decorator, and the framework loads only the selected agent:
from agents import register_agent
@register_agent("your_agent")
def launch_agent(eval_config, task_config_dir, workspace):
...
return result
The selectable agent names are defined by the AgentType enum in
src/module_registration.py. See Configure agents and models
for the integration steps.