Skip to content

Build SIKL tasks from SIKL v5 checkouts - #130

Open
zhenhuang12 wants to merge 12 commits into
mainfrom
cursor/sikl-task-builder-v5-54bd
Open

zhenhuang12 wants to merge 12 commits into
mainfrom
cursor/sikl-task-builder-v5-54bd

Conversation

@zhenhuang12

@zhenhuang12 zhenhuang12 commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

SIKL main replaced the definitions/workloads/solutions bundle imported by #96 with one committed schema per kernel, sikl/ops/<op>/impls/<language>/<name>/<uuid>.json (schema_version: 5). The reference, input distributions and error bounds now live in SIKL's Python contracts rather than in the file, so a generated task cannot carry its own semantics. sikl_task_builder now also accepts a SIKL checkout and emits one Arena schema-v2 task per committed schema; each action rebuilds the schema from source/ and is judged by SIKL's own python -m sikl validate at the pinned commit.

Import and output contracts

  • checkout.py reads committed schemas at HEAD through git objects only, without importing SIKL or executing kernels, mirroring bundle.py. Uncommitted files never become tasks; malformed paths, modes, sizes, sources, entry points, targets and duplicate workloads fail with explicit codes.
  • materialize.schema_task_files emits start.json (the committed blob, protected), the editable source/ kernel files, a standard-library arena-eval-v1 runner and a sikl-schema export. The candidate starts as the committed kernel; the provided baseline is start.json.
  • A SIKL v5 input takes only the keys of sikl_v5_config.yaml; legacy policy, generator and validator keys are rejected. The legacy bundle path is unchanged.

Validation and acceptance

Nothing in a v5 task is authored, so no generator or repair loop runs. validation.validate_schema_task copies the draft to a fresh workspace and runs the framework's seven initial actions in one bounded subprocess; installation requires all of them to pass with an unchanged task digest. Gate failures map to baseline_rejected, platform_deferred, output_conflict or a retried failed state. Correctness fails on any SIKL finding other than not_faster/regressed, located to a workload when the finding has axes; performance re-measures each time and reports SIKL's CUDA graph time per workload.

sikl_runtime.Dockerfile builds the runtime from the image digest in SIKL ci.yaml with SIKL's Triton and FlyDSL pins and a root-owned /opt/sikl. validate-task checks the pinned commit, the start.json blob, both pins, the CK submodule gitlink and that the SIKL root is not writable. The agent-driven task_validator is not run for v5 tasks. Generated tasks follow SIKL commits and stay uncommitted (/tasks/SIKL-v5/ is ignored).

Verification

  • python3 -m pytest -q tests/test_sikl_task_builder.py tests/test_task_validator_v2.py tests/test_task_validator.py tests/test_task_run_v2.py: 243 passed, CPU only.
  • All 56 schemas (548 workloads) at SIKL 4858da2 were emitted before and after the module reorganization; the 367 generated files and the inspect/mount-info outputs are byte-identical.
  • MI355X / gfx950, crusoe, runtime image built from SIKL 4858da2 on lmsysorg/sglang@sha256:424411da…: make docker-sikl-task-builder on gemm_n32_k6144/653c074634fef840 (FlyDSL, 13 workloads) passed all seven actions on 13/13 cases and installed the task. SIKL reported a worst violation fraction of 0 on every workload; the unchanged candidate measured 0.94–1.00× the baseline (4.0–23.0 µs, the low end at m ≤ 8).
Revision Node Task digest Validation ID
b8cffa0a crsuse2-m2m-204 f7c8cf7d… 069353ba…
9deab255 crsuse2-m2m-101 f7c8cf7d… 37557d04…
  • An audit-clean kernel computing 1.01 * a @ b.T failed candidate correctness on 13/13 cases with per-workload numeric_mismatch and post_timing_mismatch.
  • make check-docker-runner fails at the quality-node mount on main as well, before it reaches the SIKL assertions. The remaining 55 schemas have not been GPU-qualified.
Open in Web Open in Cursor 

…l validate

SIKL main (AMD-AGI/SIKL#52) dropped the flashinfer bundle export: kernels are
committed v5 schema files with a destination-passing ABI and their semantics in
the SIKL package. A --input-dir holding sikl/ops/ now takes a v5 path: one task
per committed schema under tasks/SIKL-v5/<name>/<uuid>/, materialized
deterministically, gated by the seven initial TaskSession actions and judged by
python -m sikl validate at the pinned SIKL commit. The legacy bundle path keeps
its behaviour; its run directory handling moves into the shared open_run.
mount-info reports v5 errors on stderr, which the Docker runner shows; a
deadline that passes before an action starts exits the gate with its own code
instead of matching TimeoutError in the log; an install race records the
terminal output_conflict; unreadable baseline reports are listed rather than
failing the gate; the runner unlinks a symlinked report directory, hashes
start.json without attribute filters, strips GIT_* from SIKL's environment and
validates the baseline at the provenance path; the export checks the copied
candidate before the exit code, so an unchanged kernel always reports
'0 candidate files'.
…p/aiter_configs in the runtime image

Found by acceptance V5: every baseline bench failed with PermissionError on
/tmp/aiter_configs/bf16_tuned_gemm.csv.lock, a root-owned directory of the base
image that aiter's config merge writes to (aiter/jit/core.py).
…onfigs

Acceptance V5 again: the base image ships root-owned merged configs there, which
a non-root user cannot replace in a sticky directory, and which its own aiter,
not the pinned checkout's, produced.
Found by acceptance V7: as a non-root user, git clone --shared /opt/sikl (root
owned) fails with 'dubious ownership in repository at /opt/sikl/.git'; a local
clone checks the source's git dir, which safe.directory did not list.
… trusts the runtime SIKL

Acceptance V7: 9b2a813 was not enough. A local clone runs upload-pack on the
source's git dir with GIT_CONFIG_PARAMETERS cleared, so no -c safe.directory
reaches it (git 2.43 refuses even '*'). The runner now writes its own global
config (hooks off, the runtime SIKL, its git dir and CK trusted) instead of
/dev/null; the agent's ~/.gitconfig stays unread.
Inspection of committed schemas, materialized task contracts, the runner's
verdicts over SIKL validate reports, gate run states and v5 config keys.
An aborted bench stage carries an empty detail, so the FAIL reason said only
"validation aborted (bench): ". List each distinct finding after it.
Read schemas in checkout.py, emit tasks from materialize.py and gate them in
validation.py, mirroring bundle.py, task_files and validate_task. run keeps its
inline lock and state handling; only run-directory creation is shared. The v5
tests join the builder's test module. Generated tasks are byte-identical for
all 56 schemas at SIKL 4858da2.
@cursor cursor Bot changed the title feat(sikl_task_builder): build Arena tasks from a SIKL v5 checkout Build SIKL tasks from SIKL v5 checkouts Oct 19, 2026
@irvineoy

Copy link
Copy Markdown
Collaborator

Thanks for adding support for SIKL v5. I have two concerns about how this fits into AKA:

  1. A shared runtime image. One of our goals is to run as many AKA tasks as possible in the same image for a given hardware platform, so an agent can work across tasks without switching environments. Requiring a separate SIKL runtime image moves us away from that goal. Could we use the existing AKA image and add only the dependencies these kernels actually need?

  2. Self-contained tasks. We want tasks to be usable as dataset entries: once materialized, each task should contain the task-specific code, baseline, reference, cases, input generation, and correctness checks needed to evaluate it within the common runtime. Some duplication between tasks is acceptable. Depending on a full SIKL checkout and its validation pipeline at evaluation time makes those tasks harder to use independently.

Could the builder import the necessary code and evaluation logic from a pinned SIKL snapshot, then produce tasks that run without a SIKL checkout or the sikl validate CLI? We can keep the source commit for provenance and put reusable benchmark logic in AKA's shared helpers.

The extraction needs to preserve input coverage and correctness checks, not just copy the timer. Any differences in timing behavior should also be documented and validated before treating the results as equivalent to SIKL's.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants