diff --git a/.gi/templates.yaml b/.gi/templates.yaml index 1feb732c..33cfd0da 100644 --- a/.gi/templates.yaml +++ b/.gi/templates.yaml @@ -930,6 +930,113 @@ "HF_HOME": "/mnt/model-store/huggingface", "HF_HUB_CACHE": "/mnt/model-store/huggingface/hub" } + }, + { + "name": "Native M3 Ultra Metal inference qualification", + "group": "Inference", + "target": { + "executor": "lab", + "selector": { + "os": { + "family": "macos" + }, + "arch": { + "in": [ + "aarch64" + ] + }, + "accelerator": { + "backend": "metal", + "model": { + "in": [ + "Apple M3 Ultra" + ] + } + }, + "memory": { + "system_gib": { + "min": 120 + } + }, + "network": { + "in": [ + "james-lab", + "dan-lab" + ] + } + } + }, + "build": "cd ${repo_dir} && just inference-build metal", + "inputs": [ + { + "key": "profile", + "label": "Profile", + "kind": "choice", + "choices": [ + { + "value": "pr", + "label": "pr" + }, + { + "value": "nightly", + "label": "nightly" + }, + { + "value": "release", + "label": "release" + } + ], + "default": "pr" + }, + { + "key": "model_key", + "label": "Model", + "kind": "choice", + "choices": [ + { + "value": "qwen35-08b", + "label": "Qwen/Qwen3.5-0.8B" + }, + { + "value": "qwen35-2b", + "label": "Qwen/Qwen3.5-2B" + }, + { + "value": "qwen35-4b", + "label": "Qwen/Qwen3.5-4B" + }, + { + "value": "qwen35-9b", + "label": "Qwen/Qwen3.5-9B" + }, + { + "value": "qwen38-27b", + "label": "Qwen/Qwen3.8-27B" + }, + { + "value": "qwen3-coder-30b-a3b", + "label": "Qwen/Qwen3-Coder-30B-A3B-Instruct" + }, + { + "value": "qwen36-35b-a3b", + "label": "Qwen/Qwen3.6-35B-A3B" + }, + { + "value": "qwen38-flash-next", + "label": "Qwen/Qwen3.8-Flash-Next" + } + ], + "default": "qwen35-4b" + } + ], + "budget": { + "max_usd": 0, + "max_duration_s": 18000, + "grace_s": 60 + }, + "retain": "never", + "key": "inference-metal-standalone", + "command": "cd \"$JIANYANG_REPO_DIR\" && just inference-execute ${profile} ${model_key} standalone metal" } ] } diff --git a/.github/scripts/inference-publication.test.cjs b/.github/scripts/inference-publication.test.cjs index ffc1da02..cfa6933d 100644 --- a/.github/scripts/inference-publication.test.cjs +++ b/.github/scripts/inference-publication.test.cjs @@ -13,7 +13,7 @@ async function status(eventName, publication, overrides = {}) { const statuses = []; const failures = []; const process = { env: { - SOURCE_SHA: 'a'.repeat(40), PLAN: 'success', RESULT: 'success', + SOURCE_SHA: 'a'.repeat(40), PLAN: 'success', RESULT: 'success', METAL: 'success', PUBLICATION_REQUIRED: 'true', PUBLICATION: publication, RUN_URL: 'https://example.invalid/run', PROFILE: 'nightly', COMPARISON: 'skipped', ...overrides, } }; diff --git a/.github/scripts/inference-schedule.test.cjs b/.github/scripts/inference-schedule.test.cjs index 4896bb31..00b22c89 100644 --- a/.github/scripts/inference-schedule.test.cjs +++ b/.github/scripts/inference-schedule.test.cjs @@ -12,7 +12,7 @@ const needs = (profile, result = 'success', event = github) => ({ plan: { result test('scheduled Release calls do not select nightly smoke expansion or public metrics collection', () => { const flags = [...workflow.matchAll(/^ +NIGHTLY_PUBLICATION: \$\{\{ (.+) \}\}$/gm)]; assert.equal(flags.length, 1); - assert.match(workflow, /if \[\[ "\$PROFILE" == pr \|\| "\$PROFILE" == nightly \]\]; then flags\+=\(--collect-metrics\)/); + assert.match(workflow, /just inference-dispatch .*--backend "\$BACKEND" --collect-metrics/); for (const [, expression] of flags) { const enabled = new Function('github', 'steps', 'needs', `return (${expression});`); assert.equal(enabled(github, steps('release'), needs('release')), 'false'); @@ -38,10 +38,10 @@ const script = summary.split(' script: |\n')[1].replace(/^ {12}/gm, '') const AsyncFunction = Object.getPrototypeOf(async function () {}).constructor; const evaluate = new AsyncFunction('process', 'context', 'github', 'core', script); -async function status(profile, publication, result = 'success', plan = 'success', eventName = 'schedule') { +async function status(profile, publication, result = 'success', plan = 'success', eventName = 'schedule', metal = 'success') { const statuses = [], failures = []; await evaluate({ env: { - SOURCE_SHA: 'a'.repeat(40), PROFILE: profile, PLAN: plan, RESULT: result, + SOURCE_SHA: 'a'.repeat(40), PROFILE: profile, PLAN: plan, RESULT: result, METAL: metal, PUBLICATION_REQUIRED: String(profile === 'nightly'), COMPARISON: 'success', PUBLICATION: publication, RUN_URL: 'https://example.invalid/run', } }, { eventName, repo: { owner: 'Mesh-LLM', repo: 'skippy' } }, { rest: { repos: { createCommitStatus: async value => statuses.push(value) } }, @@ -82,3 +82,11 @@ test('PR summary requires successful admission and matrix; skipped plans cannot test('ungated fork target events cannot publish a failing qualification status before approval', () => { assert.match(summary, /if: always\(\) && needs.plan.result != 'skipped'/); }); + + +test('required Metal qualification cannot be skipped or fail while CUDA passes', async () => { + for (const metal of ['skipped', 'failure', 'cancelled', '']) { + const result = await status('pr', 'skipped', 'success', 'success', 'pull_request_target', metal); + assert.equal(result.state, 'failure', metal); + } +}); diff --git a/.github/workflows/inference.yml b/.github/workflows/inference.yml index 1ccd9718..9cd760f8 100644 --- a/.github/workflows/inference.yml +++ b/.github/workflows/inference.yml @@ -100,6 +100,7 @@ jobs: profile: ${{ steps.admission.outputs.profile || 'pr' }} publication: ${{ steps.admission.outputs.publication }} matrix: ${{ steps.matrix.outputs.matrix }} + metal_matrix: ${{ steps.metal_matrix.outputs.matrix }} controller: ${{ steps.controller.outputs.sha }} steps: # Credentialed controller source always comes from protected main. @@ -119,7 +120,7 @@ jobs: APPROVED_FORK_PR: ${{ inputs.approved_fork_pr }} run: just inference-admit - id: matrix - env: + env: &matrix-env SOURCE_SHA: ${{ steps.admission.outputs.source }} PROFILE: ${{ steps.admission.outputs.profile }} NIGHTLY_PUBLICATION: ${{ steps.admission.outputs.publication }} @@ -127,8 +128,14 @@ jobs: flags=() if [[ "$NIGHTLY_PUBLICATION" == true ]]; then flags+=(--include-smoke); fi just inference-matrix "$PROFILE" "$SOURCE_SHA" "${flags[@]}" + - id: metal_matrix + env: *matrix-env + run: | + flags=(--backend metal) + if [[ "$NIGHTLY_PUBLICATION" == true ]]; then flags+=(--include-smoke); fi + just inference-matrix "$PROFILE" "$SOURCE_SHA" "${flags[@]}" qualification: - name: qualification (${{ matrix.id }}) + name: ${{ matrix.name }} needs: plan strategy: fail-fast: false @@ -137,24 +144,23 @@ jobs: runs-on: ${{ vars.SKIPPY_DEPOT_RUNNERS_ENABLED == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-24.04' }} # PR: up to 90 minutes queued, 31 minutes executing, plus cleanup/upload. timeout-minutes: ${{ matrix.profile == 'pr' && 130 || 360 }} - env: + env: &qualification-env EVIDENCE: target/ci-evidence/inference-${{ matrix.id }} - steps: + steps: &qualification-steps - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: ref: ${{ needs.plan.outputs.controller }} persist-credentials: false - uses: ./.github/actions/setup - - name: Dispatch and await native Spark qualification + - name: Dispatch and await native qualification env: SOURCE_SHA: ${{ needs.plan.outputs.source }} PROFILE: ${{ matrix.profile }} + BACKEND: ${{ matrix.backend }} CONFIGURATION: ${{ matrix.configuration }} JIANYANG_INFERENCE_SSH_KEY: ${{ secrets.JIANYANG_INFERENCE_SSH_KEY }} run: | - flags=() - if [[ "$PROFILE" == pr || "$PROFILE" == nightly ]]; then flags+=(--collect-metrics); fi - just inference-dispatch "$PROFILE" "$SOURCE_SHA" "$EVIDENCE" "$CONFIGURATION" "${flags[@]}" + just inference-dispatch "$PROFILE" "$SOURCE_SHA" "$EVIDENCE" "$CONFIGURATION" --backend "$BACKEND" --collect-metrics - name: Cancel outstanding JY jobs and formations if: cancelled() || failure() env: @@ -170,9 +176,22 @@ jobs: path: ${{ env.EVIDENCE }} if-no-files-found: error retention-days: 30 + qualification_metal: + name: ${{ matrix.name }} + needs: plan + strategy: + fail-fast: false + # The M3 Ultra is reserved exclusively. Serial dispatch keeps jobs off + # the Actions timeout clock until the preceding model finishes. + max-parallel: 1 + matrix: ${{ fromJSON(needs.plan.outputs.metal_matrix) }} + runs-on: ${{ vars.SKIPPY_DEPOT_RUNNERS_ENABLED == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-24.04' }} + timeout-minutes: ${{ matrix.profile == 'pr' && 100 || 360 }} + env: *qualification-env + steps: *qualification-steps nightly_publish: name: Publish nightly qualification - needs: [plan, qualification] + needs: [plan, qualification, qualification_metal] if: >- always() && !cancelled() && needs.plan.outputs.publication == 'true' && needs.plan.result == 'success' @@ -207,7 +226,7 @@ jobs: env: SOURCE_SHA: ${{ needs.plan.outputs.source }} QUALIFICATION_PROFILE: ${{ needs.plan.outputs.profile }} - MATRIX_RESULT: ${{ needs.qualification.result }} + MATRIX_RESULT: ${{ needs.qualification.result == 'success' && needs.qualification_metal.result == 'success' && 'success' || 'failure' }} HF_TOKEN: ${{ secrets.HF_TOKEN }} HF_HUB_DISABLE_PROGRESS_BARS: '1' run: | @@ -223,13 +242,13 @@ jobs: retention-days: 30 compare: - name: Compare with published inference baseline - needs: [plan, qualification] + name: Report inference qualification + needs: [plan, qualification, qualification_metal] if: >- always() && !cancelled() && needs.plan.result == 'success' && needs.plan.outputs.publication != 'true' && - (github.event_name == 'pull_request_target' || github.event_name == 'workflow_dispatch') && - (needs.plan.outputs.profile == 'pr' || needs.plan.outputs.profile == 'nightly') + (github.event_name == 'pull_request_target' || github.event_name == 'workflow_dispatch' || inputs.release_candidate) && + (needs.plan.outputs.profile == 'pr' || needs.plan.outputs.profile == 'nightly' || needs.plan.outputs.profile == 'release') runs-on: ${{ vars.SKIPPY_DEPOT_RUNNERS_ENABLED == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-24.04' }} timeout-minutes: 10 permissions: @@ -252,7 +271,7 @@ jobs: GH_TOKEN: ${{ github.token }} PROFILE: ${{ needs.plan.outputs.profile }} SOURCE_SHA: ${{ needs.plan.outputs.source }} - MATRIX_RESULT: ${{ needs.qualification.result }} + MATRIX_RESULT: ${{ needs.qualification.result == 'success' && needs.qualification_metal.result == 'success' && 'success' || 'failure' }} run: | RUN_STARTED_AT=$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/attempts/$GITHUB_RUN_ATTEMPT" \ --jq '.run_started_at') @@ -260,7 +279,7 @@ jobs: just inference-compare target/ci-evidence/inference-comparison summary: - needs: [plan, qualification, nightly_publish, compare] + needs: [plan, qualification, qualification_metal, nightly_publish, compare] if: always() && needs.plan.result != 'skipped' runs-on: ${{ vars.SKIPPY_DEPOT_RUNNERS_ENABLED == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-24.04' }} timeout-minutes: 5 @@ -273,6 +292,7 @@ jobs: PROFILE: ${{ needs.plan.outputs.profile }} PLAN: ${{ needs.plan.result }} RESULT: ${{ needs.qualification.result }} + METAL: ${{ needs.qualification_metal.result }} PUBLICATION: ${{ needs.nightly_publish.result }} COMPARISON: ${{ needs.compare.result }} RELEASE_CANDIDATE: ${{ inputs.release_candidate }} @@ -280,20 +300,20 @@ jobs: RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} with: script: | - const { SOURCE_SHA: sha, PLAN: plan, RESULT: result, PUBLICATION: publication, + const { SOURCE_SHA: sha, PLAN: plan, RESULT: cuda, METAL: metal, PUBLICATION: publication, COMPARISON: comparison, PROFILE: profile, RELEASE_CANDIDATE: candidate, RUN_URL: url } = process.env; if (!/^[a-f0-9]{40}$/i.test(sha)) throw new Error('Invalid qualification source SHA'); const pullRequest = context.eventName === 'pull_request_target'; const nightly = process.env.PUBLICATION_REQUIRED === 'true'; - const compare = !nightly && (pullRequest || context.eventName === 'workflow_dispatch') && - (profile === 'pr' || profile === 'nightly'); - const passed = plan === 'success' && result === 'success' && + const compare = !nightly && (pullRequest || context.eventName === 'workflow_dispatch' || Boolean(candidate)); + const qualified = cuda === 'success' && metal === 'success'; + const passed = plan === 'success' && qualified && (!nightly || publication === 'success') && (!compare || comparison === 'success'); const description = passed - ? 'Native Spark lab qualification' + ? 'Native CUDA and Metal lab qualification' : nightly ? 'Nightly qualification or publication incomplete or failed' - : compare && result === 'success' + : compare && qualified && profile !== 'release' ? 'Published baseline comparison failed or incomplete' : 'Inference admission or qualification incomplete or failed'; if (plan !== 'success' || profile === 'release') { @@ -311,7 +331,7 @@ jobs: if (!passed) core.setFailed(description); report: - needs: [plan, qualification, summary] + needs: [plan, qualification, qualification_metal, summary] if: always() && github.event_name == 'pull_request_target' && needs.plan.result == 'success' runs-on: ${{ vars.SKIPPY_DEPOT_RUNNERS_ENABLED == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-24.04' }} timeout-minutes: 10 @@ -337,5 +357,7 @@ jobs: SOURCE_SHA: ${{ needs.plan.outputs.source || github.event.pull_request.head.sha }} PLAN: ${{ needs.plan.result }} REQUIRED: 'true' - RESULT: ${{ needs.qualification.result }} + RESULT: ${{ needs.qualification.result == 'success' && needs.qualification_metal.result == 'success' && 'success' || 'failure' }} + CUDA_MATRIX: ${{ needs.plan.outputs.matrix }} + METAL_MATRIX: ${{ needs.plan.outputs.metal_matrix }} run: bash scripts/inference-report.sh target/inference-comment diff --git a/Justfile b/Justfile index b7e155e8..e7b1d149 100644 --- a/Justfile +++ b/Justfile @@ -201,20 +201,31 @@ inference-dispatch profile source output="target/ci-evidence/inference" *configu @"{{ automation_python }}" scripts/inference-dispatch.py dispatch "$@" [positional-arguments] -inference-execute profile model mode: +inference-execute profile model mode backend="cuda": @"{{ automation_python }}" scripts/inference-execute.py "$@" [positional-arguments] inference-cancel ledger="target/ci-evidence/inference/jobs.json": @"{{ automation_python }}" scripts/inference-dispatch.py cancel "$@" -inference-build: - @"{{ automation_python }}" scripts/inference-build.py +[positional-arguments] +inference-build backend="cuda": + @"{{ automation_python }}" scripts/inference-build.py "$@" -inference-build-uncached: - @command -v hf uv nvidia-smi - @SCCACHE_BASEDIRS="$PWD" LLAMA_STAGE_BACKEND=cuda LLAMA_STAGE_CUDA_ARCHITECTURES=121 LLAMA_STAGE_LINK_MODE=static just llama-build - @LLAMA_STAGE_BACKEND=cuda LLAMA_STAGE_CUDA_ARCHITECTURES=121 LLAMA_STAGE_LINK_MODE=static cargo build --locked -p skippy-cli -p skippy-correctness +[positional-arguments] +inference-build-uncached backend="cuda": + #!/usr/bin/env bash + set -euo pipefail + command -v hf + command -v uv + case "$1" in + cuda) command -v nvidia-smi; export LLAMA_STAGE_CUDA_ARCHITECTURES=121 ;; + metal) xcrun --find swift ;; + *) exit 2 ;; + esac + export LLAMA_STAGE_BACKEND="$1" LLAMA_STAGE_LINK_MODE=static SCCACHE_BASEDIRS="$PWD" + just llama-build + cargo build --locked -p skippy-cli -p skippy-correctness # Linux diagnostic: retain all MiMo2 graph assertions and report peak memory. native-contract-build: llama-prepare diff --git a/ci/INFERENCE_QUALIFICATION.md b/ci/INFERENCE_QUALIFICATION.md index 4612e744..dc244a9a 100644 --- a/ci/INFERENCE_QUALIFICATION.md +++ b/ci/INFERENCE_QUALIFICATION.md @@ -1,30 +1,29 @@ -# DGX Spark inference qualification +# GPU inference qualification The agreed inventory lives in `inference-ladder.json`. Generate a source-bound plan with `just inference-plan pr FULL_COMMIT_SHA`, or use `nightly` / `release` -for the extended ladder. Split runs apply only to models with at least 27B total +for the extended ladder. CUDA split runs apply only to models with at least 27B total parameters (not activated parameters for MoE). Smaller models run standalone. PR selects four architecture representatives: four standalone and three split runs (seven rows). Nightly and release select all eight models: eight standalone -and four split runs (twelve rows). The inventory's explicit `split` flag records -this selection. `just inference-contracts` checks this contract +and four split runs (twelve rows). Metal uses the same selected models in +standalone mode on an M3 Ultra, adding four PR jobs and eight extended jobs. +Scheduled and manually dispatched nightly runs on protected main also executes both smoke matrices to publish matching PR +baselines. `just inference-contracts` checks this contract offline. Planning does not load weights or produce qualification evidence. -The protected PR workflow always reports the `Inference qualification` status. -It checks the current PR's changed-file list before dispatch: serving and build -inputs require all seven smoke configurations; a complete list containing only -unrelated files reports that model tests were not required. A full first page is -treated conservatively as relevant. Required runs never accept skipped model -jobs, and admission failures report failure on the PR head. This permits the -status to be required without leaving documentation-only PRs waiting forever. -Enable that branch requirement only after this workflow has landed on protected -main and its live pilot has passed. +The protected PR workflow uses native path routing. An applicable PR with the +`qualify` label requires all eleven smoke configurations. An applicable PR +without the label reports an intentional skip. Admission failures report +failure on the PR head. Both platform matrices must pass for a qualification +run to succeed. ## Execution boundary Reuse the Pilot GitHub App, signed workflow-job webhooks and JY-managed runner -integration. The Actions jobs orchestrate at most three configurations concurrently. Each hosted -job is bounded to six hours; model execution runs in native JY jobs with five-hour +integration. Actions orchestrates up to three CUDA configurations alongside +one Metal configuration. Each hosted job is bounded to six hours; model execution +runs in native JY jobs with five-hour leases. Model loading, serving, correctness checks and AgentX run in native JY jobs, outside the Actions container's 6 GiB limit. Do not raise the limit globally or expose the host @@ -100,6 +99,12 @@ Each native member independently verifies Linux/aarch64 and an actual GB10. The process supervisor bounds foreground commands; serving process groups are terminated on normal and error paths. JY leases bound abrupt termination. +The Metal template selects an ARM64 Mac with an Apple M3 Ultra. The native +job checks the actual Metal device, available system pages and Metal's +recommended working-set size. The run requires a Metal device-selection event +and positive GPU-layer offload in the serving log. CUDA split and Metal +standalone receipts have independent workload fingerprints and saved baselines. + `inference-artifacts.json` pins the base GGUF shard hashes and sizes plus the matching official tokenizer revision and layer count. Most fixtures use Q4_K_M; Flash-Next uses the four-shard IQ4_XS base model, not similarly named MTP sidecars. diff --git a/ci/README.md b/ci/README.md index 671b0b83..53aaf369 100644 --- a/ci/README.md +++ b/ci/README.md @@ -274,7 +274,7 @@ to the Actions summary. A regression, incomplete required lab evidence, or a failure to read or verify the published baseline fails qualification. The summary identifies measurements with no matching baseline, including before the first nightly publication and when benchmark inputs change. The longer -`release` workload continues to use its lab qualification result because the +`release` workload shows measured lab results without comparisons because the dataset has no comparable release workload. A merge to `main` adds no qualification run. diff --git a/ci/inference-comparability.json b/ci/inference-comparability.json index b90075d5..a5a5fffe 100644 --- a/ci/inference-comparability.json +++ b/ci/inference-comparability.json @@ -1,11 +1,14 @@ { "schema_version": 1, "audit": { - "reason": "Whole-file hashes changed for split admission and receipt acceptance; standalone execution, model inputs, corpus and benchmark settings were unchanged. Legacy measurements remain immutable. Each alias is restricted to its measured configuration and workload. The native stage-plan change affects split execution and receipt validation. Standalone server arguments, model inputs, corpus and trials are unchanged; the quality prompt file changed only in whitespace. Carry forward standalone nightly recipes only.", + "reason": "Whole-file hashes changed for split admission and receipt acceptance; standalone execution, model inputs, corpus and benchmark settings were unchanged. Legacy measurements remain immutable. Each alias is restricted to its measured configuration and workload. The native stage-plan change affects split execution and receipt validation. Standalone server arguments, model inputs, corpus and trials are unchanged; the quality prompt file changed only in whitespace. Carry forward standalone nightly recipes only. CUDA keeps the same server arguments, workloads and trial settings when Metal is added. Native split recipes compare only within the native admission workload. Historical experimental split recipes remain separate.", "sources": [ "d3d9bd694084d2d3f397aa77bf03cbfc9625a840", "061a1ed61c22e596b84caf4093d8ceab7efbeac7", - "f3b18d3ef9a5f1e5e9a9e9b80dc617029064a131" + "f2374721f0b03de2ae4c6a4c095b09398eeabb31", + "f3b18d3ef9a5f1e5e9a9e9b80dc617029064a131", + "4b35fe0741a6dce4c782676b0343b16e72fe0219", + "4eca7f82e342b0992dcf83cfa59cc69200dfa7da" ], "benchmark_recipe_version": 2 }, @@ -15,196 +18,364 @@ "workload": "DGX Spark AgentX nightly v1", "source_sha": "d3d9bd694084d2d3f397aa77bf03cbfc9625a840", "legacy_sha256": "c4c766c2095e577d4fe8b632fb9dfab67cb75526f3fcd6046986e3562587ea4b", - "recipe_sha256": "d3014e0940ddda51ca71ab4793e8f0d64e7aad95ffce43966a1445dd0cc1b2f5" + "recipe_sha256": "214a7858f18930f0fd883bfa84081f200ea2f9fdaa1fa6b65435ed37e74bef2d" }, { "configuration": "qwen35-2b-standalone", "workload": "DGX Spark AgentX nightly v1", "source_sha": "d3d9bd694084d2d3f397aa77bf03cbfc9625a840", "legacy_sha256": "8c3ea509f4d960e0cbc0892bc0da80685621f7dc3c75dae79838d16565c885e4", - "recipe_sha256": "3b4d48a0ebc96755f05107956dcf765063b5aa6a3ff929d4c90251c669cac3ad" + "recipe_sha256": "bb5bc22e2c60ac34ba7045156a5a954a80065598f9da754380f0e6b9b77310bc" }, { "configuration": "qwen35-4b-standalone", "workload": "DGX Spark AgentX nightly v1", "source_sha": "d3d9bd694084d2d3f397aa77bf03cbfc9625a840", "legacy_sha256": "7458fbbbfba51803aa312947e62035c0d3c50ce9937212c551f85fbed0f43222", - "recipe_sha256": "043f2d2d3e8a7b2b9326256e45578ef1ab7e25f2fa6891bbc6fe58a185851949" + "recipe_sha256": "664669b6bc14644629a6eec257afdd4a9611526c9554535dc06356af08869a2a" }, { "configuration": "qwen35-9b-standalone", "workload": "DGX Spark AgentX nightly v1", "source_sha": "d3d9bd694084d2d3f397aa77bf03cbfc9625a840", "legacy_sha256": "0be480197228bdb7728e84f58e593939c5f27fd8bcbef4b7001b8db7ad666eb3", - "recipe_sha256": "af2b3de34cf7ac8497b4bdf35c2a257ea5f04a338f07e9bd2429c51b62bae78e" + "recipe_sha256": "5064cd7d26e7b7e32ed903847c70a4dabf331aabf41e23acbb9c071c31eb50ff" }, { "configuration": "qwen38-27b-standalone", "workload": "DGX Spark AgentX nightly v1", "source_sha": "d3d9bd694084d2d3f397aa77bf03cbfc9625a840", "legacy_sha256": "db62a6f042e3c4d501451c56d0f05a66bc4c71b6b973e5da5b48c6e643ad669c", - "recipe_sha256": "4b36e711b7db947dbf40384ee1d1342941f532012b05c79ae23e15f98c8338a2" + "recipe_sha256": "26065c5311441f1026abf7fb0e1135808562a170e76d604dfb3adaaf6cdff5c4" }, { "configuration": "qwen38-27b-split", "workload": "DGX Spark AgentX nightly v1 (experimental split)", "source_sha": "d3d9bd694084d2d3f397aa77bf03cbfc9625a840", "legacy_sha256": "db128a51f097984e7b18a669da85759240e9d7441737345a834f0d319fbf9281", - "recipe_sha256": "774471871ba4d2f2eebf96e6123debc19a4910f7281b9333dd5a8ba3e769858c" + "recipe_sha256": "549cf73df45a5b2c1d470e364336c716ed6c76d84186963e514ddb3ebba49fe7" }, { "configuration": "qwen3-coder-30b-a3b-standalone", "workload": "DGX Spark AgentX nightly v1", "source_sha": "d3d9bd694084d2d3f397aa77bf03cbfc9625a840", "legacy_sha256": "0f30f8863b24cdb01a39f38d061895d5e9777363c18b37b4305699d95a173b72", - "recipe_sha256": "61a208ade6c2c2fdf0b1938b4aa63f99195f3aa8e2f154d6d877ddee27374567" + "recipe_sha256": "27743be8a30e30cf5295263f5996fb07914d48ffe83369584050eb0a45e54491" }, { "configuration": "qwen3-coder-30b-a3b-split", "workload": "DGX Spark AgentX nightly v1 (experimental split)", "source_sha": "d3d9bd694084d2d3f397aa77bf03cbfc9625a840", "legacy_sha256": "31c71116969f90493fe5b136ded4458c0fef9841e82cbad0cb19be2cf9149731", - "recipe_sha256": "20d09d3bd2abcf4651b7cf0153551b5fdd6c4213ebc121bd352b0476b1a5f7ba" + "recipe_sha256": "0b921ce6dedf18d34caff3f3bdef2e2fb92c754104579b29d5427e4bf6e61418" }, { "configuration": "qwen36-35b-a3b-standalone", "workload": "DGX Spark AgentX nightly v1", "source_sha": "d3d9bd694084d2d3f397aa77bf03cbfc9625a840", "legacy_sha256": "85d20791a0bf7d6b599b209adc38194e5d8a88be4981b4dcd99d7cff1517f895", - "recipe_sha256": "206332f749a72f6b1486e3e8cb09f1f9dc557cbe9f369fc79b4e2dafcdeff279" + "recipe_sha256": "fc240b7d0392ea973bd0f06db1c9feaa864e53e1ceb4e2c1b3c9a0878699d40d" }, { "configuration": "qwen36-35b-a3b-split", "workload": "DGX Spark AgentX nightly v1 (experimental split)", "source_sha": "d3d9bd694084d2d3f397aa77bf03cbfc9625a840", "legacy_sha256": "782e347748a12cc9a7f485b36e12442ff941adeeb8a7c5b949917fa539239adf", - "recipe_sha256": "b683cc46584d8a0c4b694f78b99a4e9a864b8fae97f34b3944f18ef49ccdcc08" + "recipe_sha256": "2a4d2cf3ab8c8ec33be322fcf9ea4481b08d5c0110524c0577ac21bb153d82db" }, { "configuration": "qwen38-flash-next-standalone", "workload": "DGX Spark AgentX nightly v1", "source_sha": "d3d9bd694084d2d3f397aa77bf03cbfc9625a840", "legacy_sha256": "0f4296df0834e3610dfdef924a61b6d8bf87ea9483cd1dd795d58c8e1a235e3d", - "recipe_sha256": "9a17809d28577727514e37d1d1b68bd3ebaa9197cee8459f5ea50db7f5cb52e0" + "recipe_sha256": "2e35b61cd5735f1719a69edee5f146c4513086dce84eb0a4d4a31bea23279dc6" }, { "configuration": "qwen38-flash-next-split", "workload": "DGX Spark AgentX nightly v1 (experimental split)", "source_sha": "d3d9bd694084d2d3f397aa77bf03cbfc9625a840", "legacy_sha256": "5b8769781056b9e7198c1bf9bbe99bde747334c09a72f72bd26b6ad54bc59b15", - "recipe_sha256": "0e1bffa22e1f71b582c04ac093bee0ba0d84abe790ffaa927059e978380a4bd0" + "recipe_sha256": "07c9bee0223472ff58276c2a2292ec9bb8137ea09e3254cacffc3dad136aae5c" }, { "configuration": "qwen35-08b-standalone", "workload": "DGX Spark AgentX nightly v1", "source_sha": "061a1ed61c22e596b84caf4093d8ceab7efbeac7", "legacy_sha256": "733c3829c56cd985e39a4da49b6446a04554fca413cd298d64c9ba5ef9a389db", - "recipe_sha256": "d3014e0940ddda51ca71ab4793e8f0d64e7aad95ffce43966a1445dd0cc1b2f5" + "recipe_sha256": "214a7858f18930f0fd883bfa84081f200ea2f9fdaa1fa6b65435ed37e74bef2d" }, { "configuration": "qwen35-2b-standalone", "workload": "DGX Spark AgentX nightly v1", "source_sha": "061a1ed61c22e596b84caf4093d8ceab7efbeac7", "legacy_sha256": "feca1c5542d84744f749a1ecbe420ced729ad733bedc5d2787b2b9ebb741192a", - "recipe_sha256": "3b4d48a0ebc96755f05107956dcf765063b5aa6a3ff929d4c90251c669cac3ad" + "recipe_sha256": "bb5bc22e2c60ac34ba7045156a5a954a80065598f9da754380f0e6b9b77310bc" }, { "configuration": "qwen35-4b-standalone", "workload": "DGX Spark AgentX nightly v1", "source_sha": "061a1ed61c22e596b84caf4093d8ceab7efbeac7", "legacy_sha256": "8b20ea42d2f2fea3a1a60b8d727586893c16e989edb5f0bc6a947dd585722fdb", - "recipe_sha256": "043f2d2d3e8a7b2b9326256e45578ef1ab7e25f2fa6891bbc6fe58a185851949" + "recipe_sha256": "664669b6bc14644629a6eec257afdd4a9611526c9554535dc06356af08869a2a" }, { "configuration": "qwen35-9b-standalone", "workload": "DGX Spark AgentX nightly v1", "source_sha": "061a1ed61c22e596b84caf4093d8ceab7efbeac7", "legacy_sha256": "ed17c2cfe891e5a6d3edbf42d5c8511ba32f9ed8e1901a0fe09daf09b0f7d970", - "recipe_sha256": "af2b3de34cf7ac8497b4bdf35c2a257ea5f04a338f07e9bd2429c51b62bae78e" + "recipe_sha256": "5064cd7d26e7b7e32ed903847c70a4dabf331aabf41e23acbb9c071c31eb50ff" }, { "configuration": "qwen38-27b-standalone", "workload": "DGX Spark AgentX nightly v1", "source_sha": "061a1ed61c22e596b84caf4093d8ceab7efbeac7", "legacy_sha256": "b61ccc5119ad80f1759b9615efb0f0c6834a6c621e732f406c0a657816f72cec", - "recipe_sha256": "4b36e711b7db947dbf40384ee1d1342941f532012b05c79ae23e15f98c8338a2" + "recipe_sha256": "26065c5311441f1026abf7fb0e1135808562a170e76d604dfb3adaaf6cdff5c4" }, { "configuration": "qwen3-coder-30b-a3b-standalone", "workload": "DGX Spark AgentX nightly v1", "source_sha": "061a1ed61c22e596b84caf4093d8ceab7efbeac7", "legacy_sha256": "d3e9adc75896ef1f2554430552b2c7f51b29ae2beb07396d128f4c47ad9486d1", - "recipe_sha256": "61a208ade6c2c2fdf0b1938b4aa63f99195f3aa8e2f154d6d877ddee27374567" + "recipe_sha256": "27743be8a30e30cf5295263f5996fb07914d48ffe83369584050eb0a45e54491" }, { "configuration": "qwen36-35b-a3b-standalone", "workload": "DGX Spark AgentX nightly v1", "source_sha": "061a1ed61c22e596b84caf4093d8ceab7efbeac7", "legacy_sha256": "66b8082ea168e5ec5bcf47dab2573b0b838e66beedbde74a35bbdc602d2bc7b7", - "recipe_sha256": "206332f749a72f6b1486e3e8cb09f1f9dc557cbe9f369fc79b4e2dafcdeff279" + "recipe_sha256": "fc240b7d0392ea973bd0f06db1c9feaa864e53e1ceb4e2c1b3c9a0878699d40d" }, { "configuration": "qwen38-flash-next-standalone", "workload": "DGX Spark AgentX nightly v1", "source_sha": "061a1ed61c22e596b84caf4093d8ceab7efbeac7", "legacy_sha256": "1988bc18eef0615fb62d214740627ba851e4ec61e0768966960d3019c98f3966", - "recipe_sha256": "9a17809d28577727514e37d1d1b68bd3ebaa9197cee8459f5ea50db7f5cb52e0" + "recipe_sha256": "2e35b61cd5735f1719a69edee5f146c4513086dce84eb0a4d4a31bea23279dc6" }, { "configuration": "qwen35-08b-standalone", "workload": "DGX Spark AgentX nightly v1", - "source_sha": "f3b18d3ef9a5f1e5e9a9e9b80dc617029064a131", + "source_sha": "f2374721f0b03de2ae4c6a4c095b09398eeabb31", "legacy_sha256": "5aae165b30d9885f13fabdb00a1e55559e849329e18f61898b081dde5ce4d20d", - "recipe_sha256": "d3014e0940ddda51ca71ab4793e8f0d64e7aad95ffce43966a1445dd0cc1b2f5" + "recipe_sha256": "214a7858f18930f0fd883bfa84081f200ea2f9fdaa1fa6b65435ed37e74bef2d" }, { "configuration": "qwen35-2b-standalone", "workload": "DGX Spark AgentX nightly v1", - "source_sha": "f3b18d3ef9a5f1e5e9a9e9b80dc617029064a131", + "source_sha": "f2374721f0b03de2ae4c6a4c095b09398eeabb31", "legacy_sha256": "3ae42ca10cc6433ac9d51c1f0a71791b847f49df64d7779986a948c092713679", - "recipe_sha256": "3b4d48a0ebc96755f05107956dcf765063b5aa6a3ff929d4c90251c669cac3ad" + "recipe_sha256": "bb5bc22e2c60ac34ba7045156a5a954a80065598f9da754380f0e6b9b77310bc" }, { "configuration": "qwen35-4b-standalone", "workload": "DGX Spark AgentX nightly v1", - "source_sha": "f3b18d3ef9a5f1e5e9a9e9b80dc617029064a131", + "source_sha": "f2374721f0b03de2ae4c6a4c095b09398eeabb31", "legacy_sha256": "1f71651b3167f929d030977be9d4fe934a9f923d81450c9c239048e9d3e31e89", - "recipe_sha256": "043f2d2d3e8a7b2b9326256e45578ef1ab7e25f2fa6891bbc6fe58a185851949" + "recipe_sha256": "664669b6bc14644629a6eec257afdd4a9611526c9554535dc06356af08869a2a" }, { "configuration": "qwen35-9b-standalone", "workload": "DGX Spark AgentX nightly v1", - "source_sha": "f3b18d3ef9a5f1e5e9a9e9b80dc617029064a131", + "source_sha": "f2374721f0b03de2ae4c6a4c095b09398eeabb31", "legacy_sha256": "530d79bdfc7a7694165ee75b5aba78de8b3c21059ed614fbec935028c14dbca7", - "recipe_sha256": "af2b3de34cf7ac8497b4bdf35c2a257ea5f04a338f07e9bd2429c51b62bae78e" + "recipe_sha256": "5064cd7d26e7b7e32ed903847c70a4dabf331aabf41e23acbb9c071c31eb50ff" }, { "configuration": "qwen38-27b-standalone", "workload": "DGX Spark AgentX nightly v1", - "source_sha": "f3b18d3ef9a5f1e5e9a9e9b80dc617029064a131", + "source_sha": "f2374721f0b03de2ae4c6a4c095b09398eeabb31", "legacy_sha256": "4a5211fdff65633015c09f4e374c0675fe93babe3502f154fa34a9e460a37d43", - "recipe_sha256": "4b36e711b7db947dbf40384ee1d1342941f532012b05c79ae23e15f98c8338a2" + "recipe_sha256": "26065c5311441f1026abf7fb0e1135808562a170e76d604dfb3adaaf6cdff5c4" + }, + { + "configuration": "qwen38-27b-split", + "workload": "DGX Spark AgentX nightly v1 (experimental split)", + "source_sha": "f2374721f0b03de2ae4c6a4c095b09398eeabb31", + "legacy_sha256": "774471871ba4d2f2eebf96e6123debc19a4910f7281b9333dd5a8ba3e769858c", + "recipe_sha256": "549cf73df45a5b2c1d470e364336c716ed6c76d84186963e514ddb3ebba49fe7" }, { "configuration": "qwen3-coder-30b-a3b-standalone", "workload": "DGX Spark AgentX nightly v1", - "source_sha": "f3b18d3ef9a5f1e5e9a9e9b80dc617029064a131", + "source_sha": "f2374721f0b03de2ae4c6a4c095b09398eeabb31", "legacy_sha256": "6b9aeb4138a6332186eff784812862285c11632de115550e04e8b00007498223", - "recipe_sha256": "61a208ade6c2c2fdf0b1938b4aa63f99195f3aa8e2f154d6d877ddee27374567" + "recipe_sha256": "27743be8a30e30cf5295263f5996fb07914d48ffe83369584050eb0a45e54491" + }, + { + "configuration": "qwen3-coder-30b-a3b-split", + "workload": "DGX Spark AgentX nightly v1 (experimental split)", + "source_sha": "f2374721f0b03de2ae4c6a4c095b09398eeabb31", + "legacy_sha256": "20d09d3bd2abcf4651b7cf0153551b5fdd6c4213ebc121bd352b0476b1a5f7ba", + "recipe_sha256": "0b921ce6dedf18d34caff3f3bdef2e2fb92c754104579b29d5427e4bf6e61418" }, { "configuration": "qwen36-35b-a3b-standalone", "workload": "DGX Spark AgentX nightly v1", - "source_sha": "f3b18d3ef9a5f1e5e9a9e9b80dc617029064a131", + "source_sha": "f2374721f0b03de2ae4c6a4c095b09398eeabb31", "legacy_sha256": "c3dddf1ab17080efde7b27b5faab652d640f0220a7b59c787bf20a1a99af00b3", - "recipe_sha256": "206332f749a72f6b1486e3e8cb09f1f9dc557cbe9f369fc79b4e2dafcdeff279" + "recipe_sha256": "fc240b7d0392ea973bd0f06db1c9feaa864e53e1ceb4e2c1b3c9a0878699d40d" + }, + { + "configuration": "qwen36-35b-a3b-split", + "workload": "DGX Spark AgentX nightly v1 (experimental split)", + "source_sha": "f2374721f0b03de2ae4c6a4c095b09398eeabb31", + "legacy_sha256": "b683cc46584d8a0c4b694f78b99a4e9a864b8fae97f34b3944f18ef49ccdcc08", + "recipe_sha256": "2a4d2cf3ab8c8ec33be322fcf9ea4481b08d5c0110524c0577ac21bb153d82db" }, { "configuration": "qwen38-flash-next-standalone", "workload": "DGX Spark AgentX nightly v1", - "source_sha": "f3b18d3ef9a5f1e5e9a9e9b80dc617029064a131", + "source_sha": "f2374721f0b03de2ae4c6a4c095b09398eeabb31", "legacy_sha256": "36acac3b8d3e847c084cfae651f81f28664f67c67dc056c85ef3362fe6e456d2", - "recipe_sha256": "9a17809d28577727514e37d1d1b68bd3ebaa9197cee8459f5ea50db7f5cb52e0" + "recipe_sha256": "2e35b61cd5735f1719a69edee5f146c4513086dce84eb0a4d4a31bea23279dc6" + }, + { + "configuration": "qwen38-flash-next-split", + "workload": "DGX Spark AgentX nightly v1 (experimental split)", + "source_sha": "f2374721f0b03de2ae4c6a4c095b09398eeabb31", + "legacy_sha256": "0e1bffa22e1f71b582c04ac093bee0ba0d84abe790ffaa927059e978380a4bd0", + "recipe_sha256": "07c9bee0223472ff58276c2a2292ec9bb8137ea09e3254cacffc3dad136aae5c" + }, + { + "configuration": "qwen35-08b-standalone", + "workload": "DGX Spark AgentX nightly v1", + "source_sha": "4b35fe0741a6dce4c782676b0343b16e72fe0219", + "legacy_sha256": "a21f393ba33161a377fa2d797516f6e47a8dd911f1747f21deb53d62c6a13d72", + "recipe_sha256": "214a7858f18930f0fd883bfa84081f200ea2f9fdaa1fa6b65435ed37e74bef2d" + }, + { + "configuration": "qwen35-2b-standalone", + "workload": "DGX Spark AgentX nightly v1", + "source_sha": "4b35fe0741a6dce4c782676b0343b16e72fe0219", + "legacy_sha256": "a00cd61037b7bb2c456259a58f28ea866845b54ac4ec6e04af272ff539b62c23", + "recipe_sha256": "bb5bc22e2c60ac34ba7045156a5a954a80065598f9da754380f0e6b9b77310bc" + }, + { + "configuration": "qwen35-4b-standalone", + "workload": "DGX Spark AgentX nightly v1", + "source_sha": "4b35fe0741a6dce4c782676b0343b16e72fe0219", + "legacy_sha256": "301ccbaa67cd817c13ecade5c413b6f533c6bdbc2ac789f44381cd7a40a5081b", + "recipe_sha256": "664669b6bc14644629a6eec257afdd4a9611526c9554535dc06356af08869a2a" + }, + { + "configuration": "qwen35-9b-standalone", + "workload": "DGX Spark AgentX nightly v1", + "source_sha": "4b35fe0741a6dce4c782676b0343b16e72fe0219", + "legacy_sha256": "2f02098e4df3ccacbccdb223701bc810e6b81c2fda0ceb7ed6b1e013eff5cdcc", + "recipe_sha256": "5064cd7d26e7b7e32ed903847c70a4dabf331aabf41e23acbb9c071c31eb50ff" + }, + { + "configuration": "qwen38-27b-standalone", + "workload": "DGX Spark AgentX nightly v1", + "source_sha": "4b35fe0741a6dce4c782676b0343b16e72fe0219", + "legacy_sha256": "46801169b58d448f8290697f07d8066d4f41e1ec63a3c6a84b7a9805e4311d3b", + "recipe_sha256": "26065c5311441f1026abf7fb0e1135808562a170e76d604dfb3adaaf6cdff5c4" + }, + { + "configuration": "qwen3-coder-30b-a3b-standalone", + "workload": "DGX Spark AgentX nightly v1", + "source_sha": "4b35fe0741a6dce4c782676b0343b16e72fe0219", + "legacy_sha256": "7e163250fcedc147ca50acedf9d00c363dc08b01eba1c377ea866ea867abd6ad", + "recipe_sha256": "27743be8a30e30cf5295263f5996fb07914d48ffe83369584050eb0a45e54491" + }, + { + "configuration": "qwen36-35b-a3b-standalone", + "workload": "DGX Spark AgentX nightly v1", + "source_sha": "4b35fe0741a6dce4c782676b0343b16e72fe0219", + "legacy_sha256": "14132cbc8f93fe2cfeceb8eaeb90d63db90e1a52efd500f9d10dd244b74fcc4b", + "recipe_sha256": "fc240b7d0392ea973bd0f06db1c9feaa864e53e1ceb4e2c1b3c9a0878699d40d" + }, + { + "configuration": "qwen38-flash-next-standalone", + "workload": "DGX Spark AgentX nightly v1", + "source_sha": "4b35fe0741a6dce4c782676b0343b16e72fe0219", + "legacy_sha256": "bc8134fe0e6ee83ad3600069d504829f3d8bf3338a62d8967eb5b66883af8576", + "recipe_sha256": "2e35b61cd5735f1719a69edee5f146c4513086dce84eb0a4d4a31bea23279dc6" + }, + { + "configuration": "qwen35-08b-standalone", + "workload": "DGX Spark AgentX nightly v1", + "source_sha": "4eca7f82e342b0992dcf83cfa59cc69200dfa7da", + "legacy_sha256": "d3014e0940ddda51ca71ab4793e8f0d64e7aad95ffce43966a1445dd0cc1b2f5", + "recipe_sha256": "214a7858f18930f0fd883bfa84081f200ea2f9fdaa1fa6b65435ed37e74bef2d" + }, + { + "configuration": "qwen35-2b-standalone", + "workload": "DGX Spark AgentX nightly v1", + "source_sha": "4eca7f82e342b0992dcf83cfa59cc69200dfa7da", + "legacy_sha256": "3b4d48a0ebc96755f05107956dcf765063b5aa6a3ff929d4c90251c669cac3ad", + "recipe_sha256": "bb5bc22e2c60ac34ba7045156a5a954a80065598f9da754380f0e6b9b77310bc" + }, + { + "configuration": "qwen35-4b-standalone", + "workload": "DGX Spark AgentX nightly v1", + "source_sha": "4eca7f82e342b0992dcf83cfa59cc69200dfa7da", + "legacy_sha256": "043f2d2d3e8a7b2b9326256e45578ef1ab7e25f2fa6891bbc6fe58a185851949", + "recipe_sha256": "664669b6bc14644629a6eec257afdd4a9611526c9554535dc06356af08869a2a" + }, + { + "configuration": "qwen35-9b-standalone", + "workload": "DGX Spark AgentX nightly v1", + "source_sha": "4eca7f82e342b0992dcf83cfa59cc69200dfa7da", + "legacy_sha256": "af2b3de34cf7ac8497b4bdf35c2a257ea5f04a338f07e9bd2429c51b62bae78e", + "recipe_sha256": "5064cd7d26e7b7e32ed903847c70a4dabf331aabf41e23acbb9c071c31eb50ff" + }, + { + "configuration": "qwen38-27b-standalone", + "workload": "DGX Spark AgentX nightly v1", + "source_sha": "4eca7f82e342b0992dcf83cfa59cc69200dfa7da", + "legacy_sha256": "4b36e711b7db947dbf40384ee1d1342941f532012b05c79ae23e15f98c8338a2", + "recipe_sha256": "26065c5311441f1026abf7fb0e1135808562a170e76d604dfb3adaaf6cdff5c4" + }, + { + "configuration": "qwen38-27b-split", + "workload": "DGX Spark AgentX nightly v1", + "source_sha": "4eca7f82e342b0992dcf83cfa59cc69200dfa7da", + "legacy_sha256": "9e6be9fd113a7a579403d0aefe220a9f90d7e522dcb20520f99470888286c9d1", + "recipe_sha256": "a1f9b5dd4d271d68125f70d690482b767c548afe715e9c978e99d7886220483d" + }, + { + "configuration": "qwen3-coder-30b-a3b-standalone", + "workload": "DGX Spark AgentX nightly v1", + "source_sha": "4eca7f82e342b0992dcf83cfa59cc69200dfa7da", + "legacy_sha256": "61a208ade6c2c2fdf0b1938b4aa63f99195f3aa8e2f154d6d877ddee27374567", + "recipe_sha256": "27743be8a30e30cf5295263f5996fb07914d48ffe83369584050eb0a45e54491" + }, + { + "configuration": "qwen3-coder-30b-a3b-split", + "workload": "DGX Spark AgentX nightly v1", + "source_sha": "4eca7f82e342b0992dcf83cfa59cc69200dfa7da", + "legacy_sha256": "129fa40188262c257682aafcf3d956c2b852595933fa9e58808c829c35e74fe5", + "recipe_sha256": "82474af50a657e45a78f32d3c3d8087c02b82c46fae5efc75f83eeaa0a2355fb" + }, + { + "configuration": "qwen36-35b-a3b-standalone", + "workload": "DGX Spark AgentX nightly v1", + "source_sha": "4eca7f82e342b0992dcf83cfa59cc69200dfa7da", + "legacy_sha256": "206332f749a72f6b1486e3e8cb09f1f9dc557cbe9f369fc79b4e2dafcdeff279", + "recipe_sha256": "fc240b7d0392ea973bd0f06db1c9feaa864e53e1ceb4e2c1b3c9a0878699d40d" + }, + { + "configuration": "qwen36-35b-a3b-split", + "workload": "DGX Spark AgentX nightly v1", + "source_sha": "4eca7f82e342b0992dcf83cfa59cc69200dfa7da", + "legacy_sha256": "721497e8a8baa30ec60d99ec2af8842e9c21a33cb13f48f10f800b4efbd1cd98", + "recipe_sha256": "25ce6d1069d645e6bb816dcf595ee45fbc9b7edd01f8d2975144eb2b8437d789" + }, + { + "configuration": "qwen38-flash-next-standalone", + "workload": "DGX Spark AgentX nightly v1", + "source_sha": "4eca7f82e342b0992dcf83cfa59cc69200dfa7da", + "legacy_sha256": "9a17809d28577727514e37d1d1b68bd3ebaa9197cee8459f5ea50db7f5cb52e0", + "recipe_sha256": "2e35b61cd5735f1719a69edee5f146c4513086dce84eb0a4d4a31bea23279dc6" + }, + { + "configuration": "qwen38-flash-next-split", + "workload": "DGX Spark AgentX nightly v1", + "source_sha": "4eca7f82e342b0992dcf83cfa59cc69200dfa7da", + "legacy_sha256": "f4ce6449618801a149a8a803102559b6f8b73bbc95b954674edef9d6f4beabdd", + "recipe_sha256": "d8282c003b0e9a87b966f87e60fd7475ea70b2b51ddda1cd4061298971da56df" } ] } diff --git a/docs/design/inference-qualification-examples/README.md b/docs/design/inference-qualification-examples/README.md index 1fdb5587..a360b6d3 100644 --- a/docs/design/inference-qualification-examples/README.md +++ b/docs/design/inference-qualification-examples/README.md @@ -24,7 +24,7 @@ tags: ## Performance over time -Each panel shows one measured model and Spark configuration. The dashed line is the current comparison reference; the shaded band is ±1%. Blue circles are within tolerance, green triangles indicate improvements, red triangles indicate regressions, and grey squares mark first measurements. Missing measurements leave gaps. Dates are UTC. +Each panel shows one measured model and hardware configuration. The dashed line is the current comparison reference; the shaded band is ±1%. Blue circles are within tolerance, green triangles indicate improvements, red triangles indicate regressions, and grey squares mark first measurements. Missing measurements leave gaps. Dates are UTC. ### Output throughput diff --git a/docs/design/inference-qualification-examples/main-smoke-recorded.md b/docs/design/inference-qualification-examples/main-smoke-recorded.md index 366403fd..75348c0c 100644 --- a/docs/design/inference-qualification-examples/main-smoke-recorded.md +++ b/docs/design/inference-qualification-examples/main-smoke-recorded.md @@ -8,7 +8,7 @@ ## Performance over time -Each panel shows one measured model and Spark configuration. The dashed line is the current comparison reference; the shaded band is ±1%. Blue circles are within tolerance, green triangles indicate improvements, red triangles indicate regressions, and grey squares mark first measurements. Missing measurements leave gaps. Dates are UTC. +Each panel shows one measured model and hardware configuration. The dashed line is the current comparison reference; the shaded band is ±1%. Blue circles are within tolerance, green triangles indicate improvements, red triangles indicate regressions, and grey squares mark first measurements. Missing measurements leave gaps. Dates are UTC. ### Prefill throughput diff --git a/docs/design/inference-qualification-examples/nightly-promotion.md b/docs/design/inference-qualification-examples/nightly-promotion.md index c42c3e7d..af8c30b2 100644 --- a/docs/design/inference-qualification-examples/nightly-promotion.md +++ b/docs/design/inference-qualification-examples/nightly-promotion.md @@ -8,7 +8,7 @@ ## Performance over time -Each panel shows one measured model and Spark configuration. The dashed line is the current comparison reference; the shaded band is ±1%. Blue circles are within tolerance, green triangles indicate improvements, red triangles indicate regressions, and grey squares mark first measurements. Missing measurements leave gaps. Dates are UTC. +Each panel shows one measured model and hardware configuration. The dashed line is the current comparison reference; the shaded band is ±1%. Blue circles are within tolerance, green triangles indicate improvements, red triangles indicate regressions, and grey squares mark first measurements. Missing measurements leave gaps. Dates are UTC. ### Output throughput diff --git a/docs/design/inference-qualification-examples/nightly-regression.md b/docs/design/inference-qualification-examples/nightly-regression.md index 08f4e7b1..20248048 100644 --- a/docs/design/inference-qualification-examples/nightly-regression.md +++ b/docs/design/inference-qualification-examples/nightly-regression.md @@ -15,7 +15,7 @@ ## Performance over time -Each panel shows one measured model and Spark configuration. The dashed line is the current comparison reference; the shaded band is ±1%. Blue circles are within tolerance, green triangles indicate improvements, red triangles indicate regressions, and grey squares mark first measurements. Missing measurements leave gaps. Dates are UTC. +Each panel shows one measured model and hardware configuration. The dashed line is the current comparison reference; the shaded band is ±1%. Blue circles are within tolerance, green triangles indicate improvements, red triangles indicate regressions, and grey squares mark first measurements. Missing measurements leave gaps. Dates are UTC. ### Output throughput diff --git a/docs/design/inference-qualification-examples/nightly-seed.md b/docs/design/inference-qualification-examples/nightly-seed.md index a34469bb..f8ccd68f 100644 --- a/docs/design/inference-qualification-examples/nightly-seed.md +++ b/docs/design/inference-qualification-examples/nightly-seed.md @@ -8,7 +8,7 @@ ## Performance over time -Each panel shows one measured model and Spark configuration. The dashed line is the current comparison reference; the shaded band is ±1%. Blue circles are within tolerance, green triangles indicate improvements, red triangles indicate regressions, and grey squares mark first measurements. Missing measurements leave gaps. Dates are UTC. +Each panel shows one measured model and hardware configuration. The dashed line is the current comparison reference; the shaded band is ±1%. Blue circles are within tolerance, green triangles indicate improvements, red triangles indicate regressions, and grey squares mark first measurements. Missing measurements leave gaps. Dates are UTC. ### Output throughput diff --git a/docs/design/inference-qualification-examples/pr-pass.md b/docs/design/inference-qualification-examples/pr-pass.md index d239c122..2bc2f84f 100644 --- a/docs/design/inference-qualification-examples/pr-pass.md +++ b/docs/design/inference-qualification-examples/pr-pass.md @@ -8,7 +8,7 @@ ## Performance over time -Each panel shows one measured model and Spark configuration. The dashed line is the current comparison reference; the shaded band is ±1%. Blue circles are within tolerance, green triangles indicate improvements, red triangles indicate regressions, and grey squares mark first measurements. Missing measurements leave gaps. Dates are UTC. +Each panel shows one measured model and hardware configuration. The dashed line is the current comparison reference; the shaded band is ±1%. Blue circles are within tolerance, green triangles indicate improvements, red triangles indicate regressions, and grey squares mark first measurements. Missing measurements leave gaps. Dates are UTC. ### Prefill throughput diff --git a/docs/design/inference-qualification-examples/pr-regression.md b/docs/design/inference-qualification-examples/pr-regression.md index 7aacb4ee..9d410b1e 100644 --- a/docs/design/inference-qualification-examples/pr-regression.md +++ b/docs/design/inference-qualification-examples/pr-regression.md @@ -14,7 +14,7 @@ ## Performance over time -Each panel shows one measured model and Spark configuration. The dashed line is the current comparison reference; the shaded band is ±1%. Blue circles are within tolerance, green triangles indicate improvements, red triangles indicate regressions, and grey squares mark first measurements. Missing measurements leave gaps. Dates are UTC. +Each panel shows one measured model and hardware configuration. The dashed line is the current comparison reference; the shaded band is ±1%. Blue circles are within tolerance, green triangles indicate improvements, red triangles indicate regressions, and grey squares mark first measurements. Missing measurements leave gaps. Dates are UTC. ### Prefill throughput diff --git a/scripts/inference-build.py b/scripts/inference-build.py index b5f47785..64834fa3 100644 --- a/scripts/inference-build.py +++ b/scripts/inference-build.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 """Build and cache the exact-source inference executables on the JY host.""" +import argparse import hashlib import json import os @@ -35,23 +36,28 @@ def dependency_key(inputs): return cache_key({name: value for name, value in inputs.items() if name != "source"}) -def source_inputs(sha): +def source_inputs(sha, backend): environment = { name: value for name, value in os.environ.items() if name.startswith(("LLAMA_", "SKIPPY_")) or name in { "CC", "CXX", "CUDACXX", "CFLAGS", "CXXFLAGS", "RUSTFLAGS", "CARGO_ENCODED_RUSTFLAGS" } } - return { + inputs = { "schema": 2, "native_inputs_sha256": native_inputs(), "source": sha, "os": platform.system().lower(), "arch": platform.machine(), "compiler_extra_files": {path: digest(Path(path)) for path in filter(None, os.environ.get("SCCACHE_EXTRAFILES", "").split(os.pathsep))}, "cargo_lock_sha256": digest(Path("Cargo.lock")), "rust": capture(["rustc", "-vV"]), - "cuda": capture(["nvcc", "--version"]), "cxx": capture(["c++", "--version"]), - "cmake": capture(["cmake", "--version"]), "backend": "cuda", "architectures": "121", + "cxx": capture(["c++", "--version"]), "cmake": capture(["cmake", "--version"]), + "backend": backend, "link": "static", "debug": 0, "environment": environment, } + if backend == "cuda": + inputs.update(cuda=capture(["nvcc", "--version"]), architectures="121") + else: + inputs["macos_sdk"] = capture(["xcrun", "--sdk", "macosx", "--show-sdk-version"]).strip() + return inputs def install_binaries(directory): @@ -85,9 +91,10 @@ def build(sha, root, inputs, key, cached): except subprocess.CalledProcessError: pass command([sccache, "--start-server"], overrides=environment, timeout=30) - command(["just", "inference-build-uncached"], overrides=environment, timeout=7200) + backend = inputs["backend"] + command(["just", "inference-build-uncached", backend], overrides=environment, timeout=7200) install_binaries(cargo_target / "debug") - build_id = identity(sha) + build_id = identity(sha, backend) build_id.update(cache_key=key, dependency_cache_key=dependencies, build_inputs=inputs, cache_hit=False) write_json(BUILD_IDENTITY, build_id) with tempfile.TemporaryDirectory(dir=root, prefix="publish-") as tmp: @@ -102,11 +109,14 @@ def build(sha, root, inputs, key, cached): def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("backend", choices=("cuda", "metal"), nargs="?", default="cuda") + args = parser.parse_args() sha = os.environ["JIANYANG_COMMIT"] if not re.fullmatch(r"[0-9a-f]{40}", sha) or capture(["git", "rev-parse", "HEAD"]).strip() != sha: raise ValueError("build source differs from admitted JY commit") command(["git", "diff", "--exit-code", "HEAD"], timeout=30) - inputs = source_inputs(sha) + inputs = source_inputs(sha, args.backend) key = cache_key(inputs) root = Path(os.environ["HOME"]) / ".cache/skippy/inference-build-v2" root.mkdir(parents=True, exist_ok=True) diff --git a/scripts/inference-compare.py b/scripts/inference-compare.py index bbb8a1e3..0666381c 100644 --- a/scripts/inference-compare.py +++ b/scripts/inference-compare.py @@ -79,6 +79,9 @@ def same_harness(profile, source, repository, configuration=None): def compare(run, repository, *, load=published_baselines, compatible=same_harness): run = dict(run) + if run["profile"] == "release": + run["comparison_notice"] = "Release measurements establish separate series; nightly baselines do not apply." + return run revision, saved = load() if revision: run["baseline_revision"] = revision diff --git a/scripts/inference-dispatch.py b/scripts/inference-dispatch.py index bd4606a0..aaf2ad5b 100644 --- a/scripts/inference-dispatch.py +++ b/scripts/inference-dispatch.py @@ -12,10 +12,10 @@ from lib.ci_artifacts import read_json, write_json from lib.ci_process import cancel_on_signal -from lib.inference_ladder import plan +from lib.inference_ladder import matrix, plan +from lib.inference_nightly_metrics import collect_measurements from lib.inference_logs import NativeLogs from lib.inference_peer_evidence import verify_split_peer -from lib.inference_nightly_metrics import collect_nightly from lib.inference_throughput import collect from lib.jy_qualification import Pilot, placement @@ -137,8 +137,10 @@ def record(ledger, identifiers): temporary.unlink(missing_ok=True) -def dispatch(pilot, profile, sha, output, configuration, collect_metrics=False): +def dispatch(pilot, profile, sha, output, configuration, collect_metrics=False, *, backend="cuda"): result = plan(profile, sha) + if backend != "cuda": + result["rows"] = matrix(profile, sha, backend=backend) if configuration is not None: result["rows"] = [row for row in result["rows"] if row["id"] == configuration] if len(result["rows"]) != 1: @@ -154,14 +156,18 @@ def dispatch(pilot, profile, sha, output, configuration, collect_metrics=False): try: for row in result["rows"]: identity, mode = row["id"], row["mode"] - model_key = identity.removesuffix(f"-{mode}") + model_key = identity.removeprefix("metal-").removesuffix(f"-{mode}") template = "inference-" + ("pr-" if profile == "pr" else "") + mode + inputs = {"profile": profile, "model_key": model_key} + if backend == "metal": + template = "inference-metal-standalone" + else: + inputs["model"] = row["model"].split("/")[1] run_id = os.environ.get("GITHUB_RUN_ID", "local") attempt = os.environ.get("GITHUB_RUN_ATTEMPT", "1") body = { "ref": sha, - "inputs": {"profile": profile, "model": row["model"].split("/")[1], - "model_key": model_key}, + "inputs": inputs, "idempotency_key": f"inference-{run_id}-{profile}-{attempt}-{identity}-{sha}", } launched = launch(pilot, f"/v1/repos/skippy/templates/{template}/launch", body, @@ -175,7 +181,7 @@ def dispatch(pilot, profile, sha, output, configuration, collect_metrics=False): if mode == "split": verify_split_peer(pilot, job, row, sha, profile, output) if collect_metrics: - collect_nightly(pilot, job, row, sha, output, model_key, profile) + collect_measurements(pilot, job, row, sha, output, model_key, profile) elif profile == "pr": try: collect(pilot, job, row, sha, output, model_key) @@ -198,12 +204,14 @@ def main(): action.add_argument("output", type=Path) action.add_argument("configuration", nargs="?") action.add_argument("--collect-metrics", "--collect-public", dest="collect_metrics", action="store_true") + action.add_argument("--backend", choices=("cuda", "metal"), default="cuda") actions.add_parser("cancel").add_argument("ledger", type=Path) actions.add_parser("control-preflight") args = parser.parse_args() pilot = Pilot() if args.action == "dispatch": - dispatch(pilot, args.profile, args.sha, args.output, args.configuration, args.collect_metrics) + dispatch(pilot, args.profile, args.sha, args.output, args.configuration, args.collect_metrics, + backend=args.backend) elif args.action == "cancel": cancel(pilot, args.ledger) else: diff --git a/scripts/inference-execute.py b/scripts/inference-execute.py index a09f1a13..a44a20d9 100644 --- a/scripts/inference-execute.py +++ b/scripts/inference-execute.py @@ -17,6 +17,7 @@ from lib.ci_artifacts import read_json, write_json from lib.ci_process import cancel_on_signal, capture, command, start, stop from lib.ci_smoke import curl +from lib import inference_metal from lib.inference_checks import ENDPOINT, numerical, offload, performance, score, streaming from lib.inference_inputs import admit, fixture, input_hashes, record from lib.inference_ladder import plan @@ -25,21 +26,26 @@ from lib.inference_peer import PeerControl, port_available -def authority(): +def authority(backend): sha = os.environ["JIANYANG_COMMIT"] if capture(["git", "rev-parse", "HEAD"]).strip() != sha: raise ValueError("qualification source differs from admitted JY commit") + if backend == "metal": + gpu, budget = inference_metal.device_and_budget() + return sha, gpu, budget if platform.system() != "Linux" or platform.machine() != "aarch64": raise ValueError("DGX Spark Linux aarch64 required") gpu = capture(["nvidia-smi", "--query-gpu=name", "--format=csv,noheader"]) if "GB10" not in gpu: raise ValueError("NVIDIA GB10 required") - return sha, gpu + return sha, gpu, None -def available_memory(): +def available_memory(metal_budget): if os.geteuid() == 0: raise ValueError("native inference must not execute as root") + if metal_budget is not None: + return inference_metal.available_memory(capture(["vm_stat"]), metal_budget) for line in Path("/proc/meminfo").read_text().splitlines(): if line.startswith("MemAvailable:"): return int(line.split()[1]) * 1024 @@ -89,8 +95,10 @@ def wait_for(server, url, seconds, poll, check): raise RuntimeError("inference server or split leader timed out") -def execute(profile, key, mode): - sha, gpu = authority() +def execute(profile, key, mode, backend="cuda"): + if backend == "metal" and mode != "standalone": + raise ValueError("Metal qualification supports standalone jobs") + sha, gpu, metal_budget = authority(backend) result = plan(profile, sha) if not any(row["id"] == f"{key}-{mode}" for row in result["rows"]): raise ValueError("configuration not admitted by ladder") @@ -99,9 +107,9 @@ def execute(profile, key, mode): raise ValueError("worker role requires split qualification") output = Path(os.environ["JIANYANG_ARTIFACT_DIR"]) output.mkdir(parents=True, exist_ok=True) - record(output, sha) + record(output, sha, backend=backend) inputs = fixture(key) - if available_memory() < sum(file["size"] for file in inputs["files"]) + 16 * 1024**3: + if available_memory(metal_budget) < sum(file["size"] for file in inputs["files"]) + 16 * 1024**3: raise ValueError("insufficient free unified memory for weights and runtime reserve") peer_context = PeerControl.from_environment(sha, key, profile) if mode == "split" else nullcontext() with peer_context as peer: @@ -111,6 +119,8 @@ def execute(profile, key, mode): coordinate = f'{inputs["repo"]}@{inputs["revision"]}' context = 4096 if profile == "pr" else 65536 args = ["target/debug/skippy", "--debug", "serve", "--startup-timeout-secs", "300"] + if backend == "metal": + args[1:1] = ["--output", "jsonl"] if not worker: args += ["--speculative-strategy", "disabled", "--generation-concurrency", "1"] if mode == "split": @@ -143,7 +153,10 @@ def execute(profile, key, mode): peer.save(output) return wait_for(server, ENDPOINT + "/v1/models", 900, 2, lambda _body: True) - offload(log) + if backend == "metal": + inference_metal.offload(log, server) + else: + offload(log) score(coordinate, output, profile) if profile == "pr": streaming(coordinate, output) @@ -158,7 +171,8 @@ def execute(profile, key, mode): peer.save(output) write_json(output / "qualification.json", { "source_sha": sha, "model": key, "mode": mode, "profile": profile, "status": "passed", - "performance_claim": result["performance_claim"], "gpu": gpu, "layers": inputs["layers"], + "performance_claim": result["performance_claim"], "gpu": gpu, "backend": backend, + "layers": inputs["layers"], "artifact_manifest_sha256": input_hashes()["model_manifest_sha256"], "correctness_scope": scope, "split_peer": peer.proof() if peer is not None else None, @@ -174,9 +188,10 @@ def execute(profile, key, mode): parser.add_argument("profile") parser.add_argument("model") parser.add_argument("mode") + parser.add_argument("backend", choices=("cuda", "metal"), nargs="?", default="cuda") args = parser.parse_args() try: with cancel_on_signal(): - execute(args.profile, args.model, args.mode) + execute(args.profile, args.model, args.mode, args.backend) except (OSError, ValueError, KeyError, RuntimeError, subprocess.SubprocessError, KeyboardInterrupt) as error: sys.exit(str(error)) diff --git a/scripts/inference-plan.py b/scripts/inference-plan.py index f5329a5e..40e70ff7 100644 --- a/scripts/inference-plan.py +++ b/scripts/inference-plan.py @@ -114,12 +114,13 @@ def main(): action.add_argument("output", type=Path) else: action.add_argument("--include-smoke", action="store_true") + action.add_argument("--backend", choices=("cuda", "metal"), default="cuda") args = parser.parse_args() if args.action == "admit": admit() return if args.action == "matrix": - rows = matrix(args.profile, args.sha, args.include_smoke) + rows = matrix(args.profile, args.sha, args.include_smoke, backend=args.backend) output(matrix=json.dumps({"include": rows}, separators=(",", ":"))) else: result = plan(args.profile, args.sha) diff --git a/scripts/inference-report.sh b/scripts/inference-report.sh index 1f06c67c..0fe41633 100644 --- a/scripts/inference-report.sh +++ b/scripts/inference-report.sh @@ -2,6 +2,7 @@ # Runs from protected main; evidence is data, never executable source. set -euo pipefail export LC_ALL=C +root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd) fail() { printf '%s\n' "$*" >&2; exit 1; } [[ ${GITHUB_EVENT_NAME:-} == pull_request_target ]] || fail 'Results comments require pull_request_target' @@ -10,7 +11,6 @@ fail() { printf '%s\n' "$*" >&2; exit 1; } [[ ${GITHUB_RUN_ATTEMPT:-} =~ ^[1-9][0-9]*$ ]] || fail 'Invalid workflow attempt' [[ ${REQUIRED:-} == true ]] || fail 'Results comments require inference qualification' -root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd) repository=repos/Mesh-LLM/skippy marker='' number=$(jq -er '.number | select(type == "number" and . > 0 and . == floor)' "$GITHUB_EVENT_PATH") @@ -24,22 +24,20 @@ url="https://github.com/Mesh-LLM/skippy/actions/runs/$run" # Pagination is needed even though today's PR ladder fits on one page. gh api "$repository/actions/runs/$run/attempts/$attempt/jobs?per_page=100" --paginate --slurp | jq -e '[.[] | .jobs[]]' > "$temporary/jobs.json" -jq -e ' - if .schema_version != 1 then error("Unsupported ladder") else - [.models[] | select(.pr) | - if (.id | test("^[a-z0-9-]+$")) then - (.id + "-standalone"), (select(.split) | .id + "-split") - else error("Invalid configuration ID") end] - end | if length > 0 and length == (unique | length) then . else error("Invalid PR ladder") end -' "$root/ci/inference-ladder.json" > "$temporary/rows.json" +jq -en --argjson cuda "$CUDA_MATRIX" --argjson metal "$METAL_MATRIX" ' + [($cuda.include[], $metal.include[]) | {id, name}] | + if length > 0 and length == (map(.id) | unique | length) and + all(.[]; (.id | test("^[a-z0-9-]+$")) and (.name | test("^(CUDA|Metal) - [a-zA-Z0-9./_-]+ - (standalone|split) - pr$"))) + then . else error("Invalid PR qualification matrix") end +' > "$temporary/rows.json" outcome='Failed or incomplete' description='Inference admission or qualification incomplete or failed' if [[ ${PLAN:-} == success && ${RESULT:-} == success ]]; then - description='Native Spark lab qualification' + description='Native CUDA and Metal lab qualification' if jq -e --slurpfile jobs "$temporary/jobs.json" ' all(.[]; . as $id | any($jobs[0][]; - .name == ("qualification (" + $id + ")") and .conclusion == "success")) + .name == $id.name and .conclusion == "success")) ' "$temporary/rows.json" > /dev/null; then outcome=Passed fi @@ -75,9 +73,9 @@ rate() { if [[ $value == Unavailable ]]; then printf '%s' "$value"; else printf '%.1f' "$value"; fi } -jq -r '.[]' "$temporary/rows.json" > "$temporary/rows.txt" -while IFS= read -r row; do - job=$(jq -c --arg name "qualification ($row)" '[.[] | select(.name == $name)][0] // {}' "$temporary/jobs.json") +jq -r '.[] | [.id, .name] | @tsv' "$temporary/rows.json" > "$temporary/rows.txt" +while IFS=$'\t' read -r row name; do + job=$(jq -c --arg name "$name" '[.[] | select(.name == $name)][0] // {}' "$temporary/jobs.json") case $(jq -r '.conclusion // ""' <<< "$job") in success) state=Passed ;; failure|timed_out|action_required|startup_failure) state=Failed ;; diff --git a/scripts/lib/inference_comparability.py b/scripts/lib/inference_comparability.py index 144f05ac..4008d1e4 100644 --- a/scripts/lib/inference_comparability.py +++ b/scripts/lib/inference_comparability.py @@ -18,6 +18,8 @@ def benchmark_tree(node): }} if isinstance(node, list): return [benchmark_tree(value) for value in node] + if isinstance(node, bytes): + return {"bytes": node.hex()} return node diff --git a/scripts/lib/inference_inputs.py b/scripts/lib/inference_inputs.py index d576a29a..401b9f30 100644 --- a/scripts/lib/inference_inputs.py +++ b/scripts/lib/inference_inputs.py @@ -39,14 +39,16 @@ def check_executables(directory, identity, sha): raise ValueError("cached inference executable provenance mismatch") -def record(output, sha): +def record(output, sha, *, backend="cuda"): identity = read_json(BUILD_IDENTITY) check_executables(DEBUG_DIR, identity, sha) + if identity.get("build_inputs", {}).get("backend") != backend: + raise ValueError("native inference build backend differs from requested backend") identity.update(input_hashes(), harness="aiperf-0.13.0-python-3.12") write_json(output / "provenance.json", identity) -def identity(sha): +def identity(sha, backend): source = Path("crates/skippy-ffi/src/lib.rs").read_text(encoding="utf-8") abi = [] for component in ("MAJOR", "MINOR", "PATCH"): @@ -54,18 +56,26 @@ def identity(sha): if not match: raise ValueError("native ABI source constant missing") abi.append(int(match[1])) - cache = next(Path(".deps/llama-build").glob("*/CMakeCache.txt"), None) - if cache is None: - raise ValueError("native CUDA build cache missing") - compiler = next((line.partition("=")[2] for line in cache.read_text(encoding="utf-8").splitlines() - if line.startswith("CMAKE_CUDA_COMPILER:")), None) - if not compiler: - raise ValueError("native CUDA compiler missing from build cache") + settings = {"LLAMA_STAGE_BACKEND": backend, "LLAMA_STAGE_LINK_MODE": "static"} + if backend == "cuda": + settings["LLAMA_STAGE_CUDA_ARCHITECTURES"] = "121" + directory = command(["scripts/build-llama.sh", "--print-build-dir"], overrides=settings, + timeout=30, capture_stdout=True).strip() + cache = (Path(directory) / "CMakeCache.txt").read_text(encoding="utf-8") + if backend == "cuda": + compiler = re.search(r"^CMAKE_CUDA_COMPILER:[^=]+=(.+)$", cache, re.M) + if not compiler: + raise ValueError("native CUDA compiler missing from build cache") + toolkit = {"cuda_compiler": capture([compiler[1], "--version"])} + else: + if "GGML_METAL:BOOL=ON" not in cache.splitlines(): + raise ValueError("native build did not enable Metal") + toolkit = {"macos_sdk": capture(["xcrun", "--sdk", "macosx", "--show-sdk-version"]).strip()} return { "stack_commit": sha, "native_upstream": Path("llama_cpp/upstream.txt").read_text().strip(), "native_tree": capture(["git", "-C", ".deps/llama.cpp", "rev-parse", "HEAD^{tree}"]).strip(), "native_abi": abi, "harness": "aiperf-0.13.0-python-3.12", - "cuda_compiler": capture([compiler, "--version"]), **input_hashes(), + **toolkit, **input_hashes(), **{field: digest(DEBUG_DIR / name) for name, field in BINARIES.items()}, } diff --git a/scripts/lib/inference_labels.py b/scripts/lib/inference_labels.py index 61fab512..2d5a91da 100644 --- a/scripts/lib/inference_labels.py +++ b/scripts/lib/inference_labels.py @@ -15,6 +15,10 @@ def model_names(): def configuration_label(configuration): + if configuration.startswith("metal-"): + model = configuration.removeprefix("metal-").removesuffix("-standalone") + name = model_names().get(model, model) + return f"Metal - {name} (M3 Ultra)" model, _, placement = configuration.rpartition("-") count = {"standalone": "1 Spark", "split": "2 Sparks"}.get(placement) name = model_names().get(model) @@ -27,4 +31,8 @@ def workload_label(workload): "DGX Spark smoke v1": "Smoke test (v1)", "DGX Spark warm probe v2": "Warm throughput probe (v2)", "DGX Spark smoke v1 (experimental split)": "Smoke test (v1, experimental split)", + "Apple M3 Ultra AgentX nightly v1": "Nightly AgentX (v1)", + "Apple M3 Ultra smoke v1": "Smoke test (v1)", + "DGX Spark AgentX release v1": "Release AgentX (v1)", + "Apple M3 Ultra AgentX release v1": "Release AgentX (v1)", }.get(workload, workload) diff --git a/scripts/lib/inference_ladder.py b/scripts/lib/inference_ladder.py index ec0a7cb7..d3d5bdb6 100644 --- a/scripts/lib/inference_ladder.py +++ b/scripts/lib/inference_ladder.py @@ -53,14 +53,22 @@ def plan(profile, sha): } -def matrix(profile, sha, include_smoke=False): - rows = [{**row, "configuration": row["id"], "profile": profile} - for row in plan(profile, sha)["rows"]] +def matrix(profile, sha, include_smoke=False, *, backend="cuda"): + if backend not in {"cuda", "metal"}: + raise ValueError("unknown inference backend") + + def rows_for(selected_profile, prefix): + for row in plan(selected_profile, sha)["rows"]: + if backend == "metal" and row["mode"] != "standalone": + continue + configuration = row["id"] if backend == "cuda" else f'metal-{row["id"]}' + name = f'{backend.upper() if backend == "cuda" else "Metal"} - {row["model"]} - {row["mode"]} - {selected_profile}' + yield {**row, "id": prefix + configuration, "configuration": configuration, + "profile": selected_profile, "backend": backend, "name": name} + + rows = list(rows_for(profile, "")) if include_smoke: if profile != "nightly": raise ValueError("the additional smoke matrix requires the nightly profile") - rows.extend( - {**row, "id": f'smoke-{row["id"]}', "configuration": row["id"], "profile": "pr"} - for row in plan("pr", sha)["rows"] - ) + rows.extend(rows_for("pr", "smoke-")) return rows diff --git a/scripts/lib/inference_markdown.py b/scripts/lib/inference_markdown.py index f1e60550..4d3efd8d 100644 --- a/scripts/lib/inference_markdown.py +++ b/scripts/lib/inference_markdown.py @@ -162,8 +162,8 @@ def latest_tables(view): "Current values and signed changes against the saved reference, " "or the previous comparable measurement when no saved reference exists. " "Higher throughput and lower latency are better.", ""] - for split, heading in ((False, "One Spark"), (True, "Two Sparks")): - configs = [config for config in view["configurations"] if config["id"].endswith("-split") == split] + for platform, heading in (("standalone", "One Spark"), ("split", "Two Sparks"), ("metal", "Metal · Apple M3 Ultra")): + configs = [config for config in view["configurations"] if ("metal" if config["id"].startswith("metal-") else "split" if config["id"].endswith("-split") else "standalone") == platform] if not configs: continue if any("experimental" in config["workload"] for config in configs): @@ -223,7 +223,7 @@ def health_sections(view, charts, image_base_url=None, chart_format="png"): "The comparison colour indicates its 1% verdict: green improved, blue within tolerance, " "red regressed, and grey a new series. No unmeasured samples are filled in." if chart_format == "mermaid" else - f'Each panel shows one measured model and Spark configuration. The dashed line is ' + f'Each panel shows one measured model and hardware configuration. The dashed line is ' f'the current comparison reference; the shaded band is ±{tolerance}. ' 'Blue circles are within tolerance, green triangles indicate improvements, ' 'red triangles indicate regressions, and grey squares mark first measurements. ' diff --git a/scripts/lib/inference_metal.py b/scripts/lib/inference_metal.py new file mode 100644 index 00000000..f58be4d0 --- /dev/null +++ b/scripts/lib/inference_metal.py @@ -0,0 +1,40 @@ +"""Qualify native Apple M3 Ultra hardware and enforce its memory budget.""" + +import platform +import re +import time + +from .ci_process import capture +from .ci_smoke import require_device + + +DEVICE = "Apple M3 Ultra" + + +def device_and_budget(): + if platform.system() != "Darwin" or platform.machine() != "arm64": + raise ValueError("Metal qualification requires macOS ARM64") + if capture(["sysctl", "-n", "machdep.cpu.brand_string"]).strip() != DEVICE: + raise ValueError(f"Metal qualification requires {DEVICE}") + device, budget = capture(["xcrun", "swift", "-e", """ +import Metal +let device = MTLCreateSystemDefaultDevice()! +print(device.name) +print(device.recommendedMaxWorkingSetSize) +"""]).strip().splitlines() + if device != DEVICE or int(budget) <= 0: + raise ValueError("required Metal device or working set limit unavailable") + return device, int(budget) + + +def available_memory(stats, budget): + page_size = re.search(r"page size of ([0-9]+) bytes", stats) + counts = [re.search(rf"^Pages {kind}:\s+([0-9]+)\.$", stats, re.M) + for kind in ("free", "inactive")] + if not page_size or not all(counts): + raise ValueError("macOS available memory could not be measured") + return min(budget, int(page_size[1]) * sum(int(count[1]) for count in counts)) + + +def offload(log, server): + require_device([log], server, time.monotonic() + 5, backend="metal") diff --git a/scripts/lib/inference_nightly_metrics.py b/scripts/lib/inference_nightly_metrics.py index 0b3689bd..dd9b1853 100644 --- a/scripts/lib/inference_nightly_metrics.py +++ b/scripts/lib/inference_nightly_metrics.py @@ -11,13 +11,17 @@ from .inference_comparability import benchmark_functions from .inference_inputs import fixture, input_hashes from .inference_admission import split_admissions_digest +from .inference_metal import DEVICE as METAL_DEVICE from .inference_throughput import collect, successful_run from .inference_probe import WORKLOAD -WORKLOADS = {"pr": WORKLOAD, "nightly": "DGX Spark AgentX nightly v1"} +WORKLOADS = {"pr": WORKLOAD, "nightly": "DGX Spark AgentX nightly v1", + "release": "DGX Spark AgentX release v1"} +METAL_WORKLOADS = {"pr": "Apple M3 Ultra warm probe v2", "nightly": "Apple M3 Ultra AgentX nightly v1", + "release": "Apple M3 Ultra AgentX release v1"} SMOKE_METRICS = ("prefill_tok_s", "decode_tok_s") AGENTX_METRICS = ("output_tok_s", "ttft_p95_ms", "itl_p95_ms", "requests", "request_error_pct") -METRIC_NAMES = {"pr": SMOKE_METRICS, "nightly": AGENTX_METRICS} +METRIC_NAMES = {"pr": SMOKE_METRICS, "nightly": AGENTX_METRICS, "release": AGENTX_METRICS} def metric_value(value, *, positive=False): @@ -83,6 +87,9 @@ def benchmark_definition(profile, mode, backend="cuda"): functions["scripts/lib/inference_checks.py"].append("performance") functions["scripts/lib/inference_nightly_metrics.py"] = ["agentx_metrics"] files += ("ci/inference-corpus.json", "ci/aiperf-requirements.lock") + if backend == "metal": + functions["scripts/lib/inference_metal.py"] = ["device_and_budget", "available_memory", "offload"] + functions["scripts/lib/ci_smoke.py"] = ["require_device"] return functions, files @@ -90,7 +97,7 @@ def contract(profile, row, key): functions, files = benchmark_definition(profile, row["mode"], row.get("backend", "cuda")) inputs = { "recipe_version": 2, - "profile": profile, "mode": row["mode"], "device": "NVIDIA GB10", + "profile": profile, "mode": row["mode"], "device": METAL_DEVICE if row.get("backend") == "metal" else "NVIDIA GB10", "admission": "native-stage-plan-v2", "model": fixture(key), "harness": {name: digest(Path(name)) for name in files}, "benchmark_functions": {path: benchmark_functions(path, names) @@ -100,9 +107,9 @@ def contract(profile, row, key): return hashlib.sha256(encoded).hexdigest() -def collect_nightly(pilot, job, row, sha, output, key, profile): +def collect_measurements(pilot, job, row, sha, output, key, profile): if profile not in METRIC_NAMES: - raise ValueError("nightly publication only supports AgentX and smoke evidence") + raise ValueError("unsupported inference evidence profile") run_id = successful_run(job, sha) prefix = f"/v1/artifacts/{run_id}" if profile == "pr": @@ -119,8 +126,10 @@ def collect_nightly(pilot, job, row, sha, output, key, profile): "status": "passed", "artifact_manifest_sha256": input_hashes()["model_manifest_sha256"]} if any(qualification.get(field) != value for field, value in expected.items()): raise ValueError("nightly measurement provenance mismatch") - if qualification.get("gpu", "").strip() != "NVIDIA GB10": - raise ValueError("nightly evidence requires the DGX Spark GPU") + backend = row.get("backend", "cuda") + device = METAL_DEVICE if backend == "metal" else "NVIDIA GB10" + if qualification.get("gpu", "").strip() != device or qualification.get("backend", "cuda") != backend: + raise ValueError(f"inference evidence requires {backend} on {device}") admission_hash = None if row["mode"] == "split": admissions = await_artifacts(lambda: pilot.api("GET", prefix + "/raw/split-admissions.json")) @@ -130,6 +139,6 @@ def collect_nightly(pilot, job, row, sha, output, key, profile): write_json(output / "split-admissions.json", admissions) write_json(output / "measurements.json", { "schema_version": 1, "source_sha": sha, "configuration": row["id"], "profile": profile, - "job_id": job["id"], "run_id": run_id, "split_admissions_sha256": admission_hash, + "job_id": job["id"], "run_id": run_id, "split_admissions_sha256": admission_hash, "backend": backend, "contract_sha256": contract(profile, row, key), "metrics": measurements, }) diff --git a/scripts/lib/inference_nightly_results.py b/scripts/lib/inference_nightly_results.py index 1ef84992..9f365d9f 100644 --- a/scripts/lib/inference_nightly_results.py +++ b/scripts/lib/inference_nightly_results.py @@ -5,12 +5,16 @@ import sys from .ci_artifacts import read_json -from .inference_ladder import matrix from .inference_admission import split_admissions_digest -from .inference_nightly_metrics import METRIC_NAMES, WORKLOADS, contract, metric_value +from .inference_ladder import matrix +from .inference_nightly_metrics import METAL_WORKLOADS, METRIC_NAMES, WORKLOADS, contract, metric_value from .inference_throughput import successful_run +def workload_for(entry): + return (METAL_WORKLOADS if entry["backend"] == "metal" else WORKLOADS)[entry["profile"]] + + def measurements(directory, entry, sha): receipt = read_json(directory / "measurements.json") job = read_json(directory / f'{entry["configuration"]}-job.json') @@ -21,6 +25,7 @@ def measurements(directory, entry, sha): } if (type(receipt.get("schema_version")) is not int or receipt["schema_version"] != 1 or any(receipt.get(field) != value for field, value in expected.items()) + or receipt.get("backend", "cuda") != entry["backend"] or not re.fullmatch(r"job_[A-Za-z0-9_]+", job["id"])): raise ValueError("inference measurement receipt identity mismatch") if entry["mode"] == "split": @@ -31,11 +36,10 @@ def measurements(directory, entry, sha): or any(member["status"] != "succeeded" for member in members) or not any(member["role"] == "leader" and member["job_id"] == job["id"] for member in members)): raise ValueError("nightly receipt requires a successful split formation") - if entry["mode"] == "split": if receipt.get("split_admissions_sha256") != split_admissions_digest(read_json(directory / "split-admissions.json")): raise ValueError("nightly split admission evidence mismatch") - workload = WORKLOADS[entry["profile"]] - model = entry["configuration"].removesuffix(f'-{entry["mode"]}') + workload = workload_for(entry) + model = entry["configuration"].removeprefix("metal-").removesuffix(f'-{entry["mode"]}') fingerprint = contract(entry["profile"], entry, model) if receipt["contract_sha256"] != fingerprint: raise ValueError("inference workload fingerprint mismatch") @@ -79,7 +83,7 @@ def read_configuration(root, entry, sha, run_id, attempt, *, reuse_prior=True): return {"id": entry["configuration"], "workload": workload, "outcome": "passed", "metrics": rows} except (OSError, ValueError, KeyError, TypeError, AttributeError) as error: print(f'{entry["id"]}: unverified inference measurements ({type(error).__name__})', file=sys.stderr) - workload = WORKLOADS[entry["profile"]] + workload = workload_for(entry) return { "id": entry["configuration"], "workload": workload, "outcome": failure_outcome(directory, entry, sha), @@ -91,9 +95,11 @@ def read_configuration(root, entry, sha, run_id, attempt, *, reuse_prior=True): def qualification_run(root: Path, profile, source, run_id, attempt, started_at, matrix_passed, *, published=False): if profile not in METRIC_NAMES or (published and profile != "nightly"): raise ValueError("unsupported inference measurement profile") + entries = (matrix(profile, source, include_smoke=published) + + matrix(profile, source, include_smoke=published, backend="metal")) configs = [ - read_configuration(root, entry, source, run_id, attempt, reuse_prior=True) - for entry in matrix(profile, source, include_smoke=published) + read_configuration(root, entry, source, run_id, attempt) + for entry in entries ] passed = matrix_passed and all(config["outcome"] == "passed" for config in configs) return { diff --git a/scripts/tests/inference-report.sh b/scripts/tests/inference-report.sh index 154202cb..cebbc783 100644 --- a/scripts/tests/inference-report.sh +++ b/scripts/tests/inference-report.sh @@ -43,12 +43,16 @@ chmod +x "$fixture/bin/gh" printf '{"number":52}\n' > "$GITHUB_EVENT_PATH" jq -n --arg sha "$SOURCE_SHA" '{state:"open",head:{sha:$sha}}' > "$fixture/pr.json" printf '[[]]\n' > "$fixture/comments.json" -jq '[.models[] | select(.pr) | (.id + "-standalone"), (select(.split) | .id + "-split")]' \ - "$root/ci/inference-ladder.json" > "$fixture/rows.json" -jq 'to_entries | map({id:(.key+1), name:("qualification ("+.value+")"), conclusion:"success"}) | +GITHUB_OUTPUT="$fixture/cuda" python3 "$root/scripts/inference-plan.py" matrix pr "$SOURCE_SHA" +GITHUB_OUTPUT="$fixture/metal" python3 "$root/scripts/inference-plan.py" matrix pr "$SOURCE_SHA" --backend metal +CUDA_MATRIX=$(sed 's/^matrix=//' "$fixture/cuda") +METAL_MATRIX=$(sed 's/^matrix=//' "$fixture/metal") +export CUDA_MATRIX METAL_MATRIX +jq -n --argjson cuda "$CUDA_MATRIX" --argjson metal "$METAL_MATRIX" \ + '[$cuda.include[], $metal.include[]] | to_entries | map({id:(.key+1), name:.value.name, conclusion:"success"}) | [{jobs: .[:3]}, {jobs: .[3:]}]' \ - "$fixture/rows.json" > "$fixture/jobs.json" -row=$(jq -r '.[0]' "$fixture/rows.json") + > "$fixture/jobs.json" +row=$(jq -r '.include[0].id' <<< "$CUDA_MATRIX") receipt="$fixture/evidence/$row-job.json" rates="$fixture/evidence/$row-throughput.json" jq -n --arg sha "$SOURCE_SHA" '{repo_rev:$sha,id:"job_test",status:"succeeded",runs:[{id:"run_test",status:"succeeded"}]}' > "$receipt" @@ -66,7 +70,7 @@ reject() { } report -jq -e '.body | contains("Lab Qualification: Passed") and contains("| 500.0 | Unavailable | 100.0 | Unavailable |") and contains("/job/1") and (contains("pilot.jianyang.cloud") | not) and (contains("Lab record") | not) and contains("/attempts/2")' "$fixture/posted.json" > /dev/null +jq -e '.body | contains("Lab Qualification: Passed") and contains("| 500.0 | Unavailable | 100.0 | Unavailable |") and contains("/job/1") and (contains("pilot.jianyang.cloud") | not) and (contains("Lab record") | not) and contains("/attempts/2") and contains("metal-qwen35-4b-standalone")' "$fixture/posted.json" > /dev/null grep -q 'POST$' "$fixture/mutation" cmp "$GITHUB_STEP_SUMMARY" <(jq -rj .body "$fixture/posted.json") @@ -135,8 +139,10 @@ SOURCE_SHA=invalid reject 'mutable source' # Latest successful main: ignore newer failed runs and PR branches called main. cp "$fixture/good-receipt.json" "$receipt" cp "$fixture/good-rates.json" "$rates" -jq 'to_entries | map({id:(.key+1), name:("qualification ("+.value+")"), conclusion:"success"}) | - [{jobs: .}]' "$fixture/rows.json" > "$fixture/jobs.json" +jq -n --argjson cuda "$CUDA_MATRIX" --argjson metal "$METAL_MATRIX" \ + '[$cuda.include[], $metal.include[]] | to_entries | map({id:(.key+1), name:.value.name, conclusion:"success"}) | + [{jobs: .}]' > "$fixture/jobs.json" +jq -n --argjson cuda "$CUDA_MATRIX" '[$cuda.include[].id]' > "$fixture/rows.json" export BASELINE_SHA=2222222222222222222222222222222222222222 jq -n --arg sha "$BASELINE_SHA" '[{workflow_runs:[ {id:40,run_attempt:3,head_branch:"main",head_sha:$sha,conclusion:"success",event:"workflow_dispatch",created_at:"2026-11-21"}, @@ -144,7 +150,8 @@ jq -n --arg sha "$BASELINE_SHA" '[{workflow_runs:[ {id:50,run_attempt:1,head_branch:"main",head_sha:$sha,conclusion:"failure",event:"schedule",created_at:"2026-11-22"}, {id:60,run_attempt:1,head_branch:"main",head_sha:$sha,conclusion:"success",event:"pull_request_target",created_at:"2026-11-22"} ]}]' > "$fixture/main-runs.json" -cp "$fixture/jobs.json" "$fixture/main-jobs.json" +jq 'to_entries | map({id:(.key+1), name:("qualification ("+.value+")"), conclusion:"success"}) | + [{jobs: .}]' "$fixture/rows.json" > "$fixture/main-jobs.json" jq -n '{truncated:false,tree:(["scripts/inference-execute.py", "scripts/lib/inference_checks.py", "scripts/lib/inference_throughput.py", "scripts/lib/inference_probe.py", "scripts/lib/inference_inputs.py", "scripts/lib/inference_ladder.py", "scripts/lib/ci_artifacts.py", "scripts/lib/ci_process.py", @@ -171,7 +178,8 @@ jq --arg row "$row" '.[0].jobs[0].name=("qualification (smoke-"+$row+")")' "$fix report jq -e '.body | contains("+100.0% (main 250.0)")' "$fixture/posted.json" > /dev/null mv "$nightly" "$baseline" -cp "$fixture/jobs.json" "$fixture/main-jobs.json" +jq 'to_entries | map({id:(.key+1), name:("qualification ("+.value+")"), conclusion:"success"}) | + [{jobs: .}]' "$fixture/rows.json" > "$fixture/main-jobs.json" unavailable() { report @@ -194,7 +202,8 @@ done cp "$fixture/main-job.json" "$baseline/$row-job.json" jq '.[0].jobs[0].conclusion="failure"' "$fixture/jobs.json" > "$fixture/main-jobs.json" unavailable -cp "$fixture/jobs.json" "$fixture/main-jobs.json" +jq 'to_entries | map({id:(.key+1), name:("qualification ("+.value+")"), conclusion:"success"}) | + [{jobs: .}]' "$fixture/rows.json" > "$fixture/main-jobs.json" # One phase can remain comparable when only the other phase has different work. jq '.prefill_tokens=301' "$fixture/main-rates.json" > "$baseline/$row-throughput.json" report diff --git a/scripts/tests/inference_build.py b/scripts/tests/inference_build.py index 2b2104ca..a0a7f5a9 100644 --- a/scripts/tests/inference_build.py +++ b/scripts/tests/inference_build.py @@ -13,6 +13,35 @@ class NativeCacheTests(unittest.TestCase): + def test_backend_inputs_preserve_metal_sdk_without_probing_cuda(self): + source_inputs = BUILD["source_inputs"] + calls = [] + def capture(args): + calls.append(args) + return "26.1\n" if args[0] == "xcrun" else "tool-version\n" + with patch.dict(os.environ, {"SCCACHE_EXTRAFILES": ""}), patch.dict( + source_inputs.__globals__, capture=capture, + native_inputs=lambda: "1" * 64, digest=lambda _: "2" * 64, + ): + metal = source_inputs("a" * 40, "metal") + self.assertEqual(metal["backend"], "metal") + self.assertEqual(metal["macos_sdk"], "26.1") + self.assertNotIn("cuda", metal) + self.assertFalse(any(args[0] == "nvcc" for args in calls)) + + def test_backend_inputs_preserve_cuda_architecture_and_separate_cache_keys(self): + source_inputs = BUILD["source_inputs"] + with patch.dict(os.environ, {"SCCACHE_EXTRAFILES": ""}), patch.dict( + source_inputs.__globals__, capture=lambda _: "tool-version\n", + native_inputs=lambda: "1" * 64, digest=lambda _: "2" * 64, + ): + cuda = source_inputs("a" * 40, "cuda") + metal = source_inputs("a" * 40, "metal") + self.assertEqual(cuda["architectures"], "121") + self.assertIn("cuda", cuda) + self.assertNotIn("macos_sdk", cuda) + self.assertNotEqual(BUILD["dependency_key"](cuda), BUILD["dependency_key"](metal)) + def test_native_transition_isolates_dependencies_but_rust_edits_reuse_them(self): old = {"schema": 2, "source": "a" * 40, "native_inputs_sha256": "1" * 64} new = dict(old, source="b" * 40, native_inputs_sha256="2" * 64) @@ -34,7 +63,8 @@ def test_patch_removal_and_native_build_changes_invalidate_identity(self): def test_build_hashes_native_identity_in_compiler_cache_and_retains_extra_files(self): build = BUILD["build"] calls = [] - inputs = {"schema": 2, "source": "a" * 40, "native_inputs_sha256": "1" * 64} + inputs = {"schema": 2, "source": "a" * 40, "native_inputs_sha256": "1" * 64, + "backend": "cuda"} def command(args, overrides, timeout): calls.append((args, overrides)) # The command helper merges overrides into the complete inherited environment. @@ -42,13 +72,13 @@ def command(args, overrides, timeout): with TemporaryDirectory() as tmp, chdir(tmp), patch.dict(os.environ, { "SCCACHE_EXTRAFILES": "/existing/input", "PROVIDER_CONFIGURATION": "retained", }), patch.dict(build.__globals__, command=command, install_binaries=lambda _: None, - identity=lambda _: {}), \ + identity=lambda _sha, _backend: {}), \ patch("shutil.which", return_value="/bin/sccache"), \ patch("shutil.copy"), patch("pathlib.Path.rename"): root = Path(tmp) / "inference-build-v2" root.mkdir() build(inputs["source"], root, inputs, "key", root / "key") - compiler = next(env for args, env in calls if args == ["just", "inference-build-uncached"]) + compiler = next(env for args, env in calls if args == ["just", "inference-build-uncached", "cuda"]) self.assertIn("cargo-v2", compiler["CARGO_TARGET_DIR"]) self.assertEqual(compiler["SCCACHE_EXTRAFILES"].split(os.pathsep)[0], "/existing/input") self.assertTrue(compiler["SCCACHE_EXTRAFILES"].endswith("target/inference-native-inputs.json")) diff --git a/scripts/tests/inference_contracts.py b/scripts/tests/inference_contracts.py index f42cd562..64981d81 100644 --- a/scripts/tests/inference_contracts.py +++ b/scripts/tests/inference_contracts.py @@ -10,6 +10,7 @@ from urllib.error import HTTPError from unittest.mock import Mock, patch +from lib import inference_metal from lib import inference_ladder, inference_throughput, inference_probe from lib.inference_inputs import fixture from lib.jy_qualification import Pilot, PilotHTTPError, placement @@ -51,6 +52,18 @@ def test_invalid_source_and_duplicate_model(self): with self.assertRaises(ValueError): inference_ladder.plan("pr", self.sha) + def test_metal_uses_the_same_models_only_in_standalone_mode(self): + for profile, count in (("pr", 4), ("nightly", 8), ("release", 8)): + cuda = inference_ladder.matrix(profile, self.sha) + metal = inference_ladder.matrix(profile, self.sha, backend="metal") + self.assertEqual(len(metal), count) + self.assertEqual([row["model"] for row in metal], + [row["model"] for row in cuda if row["mode"] == "standalone"]) + self.assertTrue(all(row["mode"] == "standalone" and row["name"].startswith("Metal - ") + for row in metal)) + self.assertFalse({row["id"] for row in cuda} & {row["id"] for row in metal}) + self.assertEqual(len(inference_ladder.matrix("nightly", self.sha, True, backend="metal")), 12) + class PilotRequestTests(unittest.TestCase): def test_jy_requests_identify_the_client(self): @@ -262,6 +275,46 @@ def test_scheduled_candidate_uses_release_profile_and_candidate_source(self): planner.assert_called_once_with("release", self.candidate) output.assert_called_once_with(source=self.candidate, profile="release", publication="false") + def test_only_the_staged_commit_from_protected_release_dispatch_is_admitted(self): + admission = run_path(str(Path(__file__).resolve().parents[1] / "inference-plan.py")) + admit = admission["admit_release_candidate"] + candidate, base = "a" * 40, "b" * 40 + env = { + "GITHUB_EVENT_NAME": "workflow_dispatch", + "GITHUB_REF": "refs/heads/main", + "GITHUB_WORKFLOW_REF": "Mesh-LLM/skippy/.github/workflows/release.yml@refs/heads/main", + "GITHUB_RUN_ID": "123", + "GITHUB_SHA": base, + } + ref = {"object": {"sha": candidate}} + commit = {"parents": [{"sha": base}], "message": "Release\n\nSkippy-Release-Run: 123"} + with patch.dict(os.environ, env): + with patch.dict(admit.__globals__, github=lambda path: ref if "/ref/" in path else commit): + admit(candidate) + with patch.dict(os.environ, {"GITHUB_EVENT_NAME": "schedule"}): + admit(candidate) + with self.assertRaisesRegex(ValueError, "does not belong"): + admit("c" * 40) + with patch.dict(os.environ, GITHUB_REF="refs/heads/branch"): + with self.assertRaisesRegex(ValueError, "protected Release dispatch or schedule"): + admit(candidate) + + +class MetalAdmissionTests(unittest.TestCase): + def test_available_memory_is_bounded_by_vm_stats_and_metal_budget(self): + stats = "Mach Virtual Memory Statistics: (page size of 16384 bytes)\nPages free: 3.\nPages inactive: 5.\n" + self.assertEqual(inference_metal.available_memory(stats, 2**20), 8 * 16384) + self.assertEqual(inference_metal.available_memory(stats, 65536), 65536) + with self.assertRaisesRegex(ValueError, "could not be measured"): + inference_metal.available_memory("invalid", 65536) + + def test_rejects_the_wrong_apple_chip(self): + with patch.object(inference_metal.platform, "system", return_value="Darwin"), \ + patch.object(inference_metal.platform, "machine", return_value="arm64"), \ + patch.object(inference_metal, "capture", return_value="Apple M5 Max\n"): + with self.assertRaisesRegex(ValueError, "Apple M3 Ultra"): + inference_metal.device_and_budget() + if __name__ == "__main__": unittest.main() diff --git a/scripts/tests/inference_markdown.py b/scripts/tests/inference_markdown.py index 99275e56..30fb571b 100644 --- a/scripts/tests/inference_markdown.py +++ b/scripts/tests/inference_markdown.py @@ -178,7 +178,7 @@ def test_missing_samples_leave_gaps_and_future_runs_do_not_leak_into_summaries(s def test_history_aliases_are_explicit_and_scoped_to_configuration_and_workload(self): audit = json.loads(AUDITS.read_text()) - self.assertEqual(len(audit["series"]), 28) + self.assertEqual(len(audit["series"]), 52) entry = audit["series"][0] args = entry["legacy_sha256"], entry["recipe_sha256"] self.assertTrue(contracts_match(entry["configuration"], entry["workload"], *args)) diff --git a/scripts/tests/inference_nightly.py b/scripts/tests/inference_nightly.py index 74da1af5..23efaaf9 100644 --- a/scripts/tests/inference_nightly.py +++ b/scripts/tests/inference_nightly.py @@ -14,7 +14,7 @@ from lib.inference_ladder import matrix from lib.inference_markdown import run_summary from lib.inference_admission import split_admissions_digest -from lib.inference_nightly_metrics import agentx_metrics, await_artifacts, collect_nightly, contract +from lib.inference_nightly_metrics import agentx_metrics, await_artifacts, collect_measurements, contract from lib.inference_nightly_results import nightly_run, qualification_run, read_configuration from lib.inference_publication_policy import publication_allowed @@ -41,9 +41,9 @@ def trial(throughput, latency, requests): def smoke_receipt(root, sha, run_id, configuration="qwen35-4b-standalone", value=100, - *, published=True, attempt="1"): + *, published=True, attempt="1", backend="cuda"): profile = "nightly" if published else "pr" - entry = next(row for row in matrix(profile, sha, include_smoke=published) + entry = next(row for row in matrix(profile, sha, include_smoke=published, backend=backend) if (row["profile"], row["configuration"]) == ("pr", configuration)) directory = root / f'inference-{entry["id"]}-{run_id}-{attempt}' directory.mkdir(parents=True) @@ -60,9 +60,10 @@ def smoke_receipt(root, sha, run_id, configuration="qwen35-4b-standalone", value {"job_id": "job_worker", "role": "worker", "status": "succeeded"}], }) write_json(directory / f"{configuration}-job.json", job) - model = configuration.removesuffix(f'-{entry["mode"]}') + model = configuration.removeprefix("metal-").removesuffix(f'-{entry["mode"]}') write_json(directory / "measurements.json", { "schema_version": 1, "source_sha": sha, "configuration": configuration, "profile": "pr", + "backend": backend, "job_id": "job_fixture", "run_id": "run_fixture", "split_admissions_sha256": admission_hash, "contract_sha256": contract("pr", entry, model), "metrics": {"prefill_tok_s": value, "decode_tok_s": value}, @@ -110,7 +111,7 @@ def test_nightly_split_retains_native_admission_after_valid_agentx_trials(self): root = Path(temporary) directory = root / f"inference-{configuration}-23-1" directory.mkdir() - collect_nightly(pilot, job, entry, SOURCE, directory, key, "nightly") + collect_measurements(pilot, job, entry, SOURCE, directory, key, "nightly") write_json(directory / f"{configuration}-job.json", job) write_json(directory / f"{configuration}-formation.json", formation) result = read_configuration(root, entry, SOURCE, "23", "1") @@ -119,6 +120,23 @@ def test_nightly_split_retains_native_admission_after_valid_agentx_trials(self): self.assertEqual(result["metrics"][0]["measured"], 21) self.assertEqual(result["metrics"][0]["contract_sha256"], contract("nightly", entry, key)) + def test_platform_recipes_and_audited_cuda_history_stay_separate(self): + from lib.inference_comparability import canonical_contract + audit = json.loads(Path("ci/inference-comparability.json").read_text()) + for entry in audit["series"]: + row = next(row for row in matrix("nightly", SOURCE) if row["id"] == entry["configuration"]) + recipe = contract("nightly", row, row["id"].removesuffix("-" + row["mode"])) + canonical = canonical_contract(row["id"], entry["workload"], entry["legacy_sha256"]) + # Main now verifies formation peers and fresh serving listeners. + # Its execution contract starts a new series; historical aliases + # remain bound to their audited recipes instead of being rewritten. + self.assertNotEqual(canonical, recipe) + self.assertEqual(canonical, entry["recipe_sha256"]) + cuda = matrix("nightly", SOURCE)[0] + metal = matrix("nightly", SOURCE, backend="metal")[0] + key = cuda["id"].removesuffix("-standalone") + self.assertNotEqual(contract("nightly", cuda, key), contract("nightly", metal, key)) + def test_matrix_preserves_existing_profiles_and_uses_pr_smoke(self): ordinary = matrix("nightly", SOURCE) both = matrix("nightly", SOURCE, include_smoke=True) @@ -202,7 +220,7 @@ def test_receipts_are_bound_to_source_and_missing_evidence_fails(self): if config["id"] == "qwen3-coder-30b-a3b-split" and config["workload"] == "DGX Spark warm probe v2") self.assertEqual(split["outcome"], "passed") self.assertEqual(report["outcome"], "failed") - self.assertEqual(len(report["configurations"]), 19) + self.assertEqual(len(report["configurations"]), 31) wrong_source = nightly_run(root, "b" * 40, "23", "1", report["started_at"], True) self.assertTrue(all(config["outcome"] != "passed" for config in wrong_source["configurations"])) @@ -259,8 +277,9 @@ def test_publication_admission_controls_manual_matrix_and_collection(self): values = dict(line.split("=", 1) for line in output.read_text().splitlines()) publish = values["publication"] == "true" self.assertEqual(publish, profile == "nightly") - rows = matrix(values["profile"], values["source"], include_smoke=publish) - self.assertEqual(len(rows), {"nightly": 19, "pr": 7, "release": 12}[profile]) + rows = [row for backend in ("cuda", "metal") for row in matrix( + values["profile"], values["source"], include_smoke=publish, backend=backend)] + self.assertEqual(len(rows), {"nightly": 31, "pr": 11, "release": 20}[profile]) class ComparisonTests(unittest.TestCase): @@ -308,9 +327,10 @@ def test_pr_comparison_reuses_verified_receipts_and_cannot_publish_a_baseline(se stamp = "2026-11-21T00:00:00Z" with TemporaryDirectory() as temporary: root = Path(temporary) - for index, row in enumerate(matrix("pr", candidate)): - value = (94, 107, 99)[index % 3] - smoke_receipt(root, candidate, "23", row["id"], value, published=False) + for backend in ("cuda", "metal"): + for index, row in enumerate(matrix("pr", candidate, backend=backend)): + value = (94, 107, 99)[index % 3] + (12 if backend == "metal" else 0) + smoke_receipt(root, candidate, "23", row["id"], value, published=False, backend=backend) smoke_receipt(root, candidate, "23", matrix("pr", candidate)[1]["id"], 108, published=False, attempt="2") run = qualification_run(root, "pr", candidate, "23", "2", stamp, True) @@ -321,7 +341,8 @@ def test_pr_comparison_reuses_verified_receipts_and_cannot_publish_a_baseline(se "contract_sha256": row["contract_sha256"], "source_sha": SOURCE, "value": 100} for c in run["configurations"] for row in c["metrics"] ] - compared = COMPARISON["compare"](run, repo, load=lambda: (revision, saved), compatible=Mock(return_value=True)) + compared = COMPARISON["compare"](run, repo, load=lambda: (revision, saved), + compatible=Mock(return_value=True)) self.assertEqual(compared["outcome"], "failed") observations = [row for c in compared["configurations"] for row in c["metrics"]] self.assertEqual({row["verdict"] for row in observations}, {"regressed", "improved", "passed"}) @@ -331,7 +352,10 @@ def test_pr_comparison_reuses_verified_receipts_and_cannot_publish_a_baseline(se for expected in ("6 regressions", "```mermaid", "Regressed", "Improved", "94.00 tok/s", "-6.00%", f"/blob/{revision}/baselines.json"): self.assertIn(expected, report) - changed = COMPARISON["compare"](run, repo, load=lambda: (revision, saved), compatible=Mock(return_value=False)) + charts = [part.split("```", 1)[0] for part in report.split("```mermaid")[1:]] + self.assertIn("Metal - Qwen3.5-4B", report) + changed = COMPARISON["compare"](run, repo, load=lambda: (revision, saved), + compatible=Mock(return_value=False)) self.assertEqual(changed["outcome"], "passed") self.assertIn("changed benchmark inputs", changed["note"]) first = COMPARISON["compare"](run, repo, load=lambda: (None, [])) diff --git a/scripts/tests/inference_peer.py b/scripts/tests/inference_peer.py index e64256e5..3545620a 100644 --- a/scripts/tests/inference_peer.py +++ b/scripts/tests/inference_peer.py @@ -142,9 +142,9 @@ def preparation(*_args): raise RuntimeError("stop during preparation") start = Mock() overrides = { - "authority": lambda: (SHA, "GB10"), + "authority": lambda _: (SHA, "GB10", None), "plan": lambda *_: {"rows": [{"id": "fixture-split"}]}, - "record": Mock(), "available_memory": lambda: 10**15, + "record": Mock(), "available_memory": lambda _: 10**15, "fixture": lambda _: {"files": [{"size": 1}], "repo": "Fixture/Model", "revision": "b" * 40}, "admit": Mock(return_value=Path("fixture.gguf")), "prepare_split": Mock(return_value=[]), "start": start, @@ -158,6 +158,7 @@ def preparation(*_args): start.assert_not_called() port_available("127.0.0.1", local.port) + def test_leader_control_is_served_during_nightly_and_release_numerical_checks(self): execute = run_path(str(Path(__file__).resolve().parents[1] / "inference-execute.py"))["execute"] for profile in ("nightly", "release"): @@ -172,9 +173,9 @@ def numerical(*_args): raise RuntimeError("stop after observing control during numerical preparation") with worker, patch.dict(os.environ, JIANYANG_ROLE="leader", JIANYANG_ARTIFACT_DIR=tmp), \ patch.dict(execute.__globals__, { - "authority": lambda: (SHA, "GB10"), + "authority": lambda _: (SHA, "GB10", None), "plan": lambda *_: {"rows": [{"id": "fixture-split"}]}, - "record": Mock(), "available_memory": lambda: 10**15, + "record": Mock(), "available_memory": lambda _: 10**15, "fixture": lambda _: {"files": [{"size": 1}], "repo": "Fixture/Model", "revision": "b" * 40}, "admit": Mock(), "prepare_split": Mock(return_value=[]), "numerical": numerical, "PeerControl": Mock(from_environment=Mock(return_value=leader)), @@ -193,9 +194,9 @@ def test_failed_peer_acknowledgement_does_not_publish_qualification(self): stop = Mock() with TemporaryDirectory() as tmp, patch.dict(os.environ, JIANYANG_ROLE="leader", JIANYANG_ARTIFACT_DIR=tmp), \ patch.dict(execute.__globals__, { - "authority": lambda: (SHA, "GB10"), + "authority": lambda _: (SHA, "GB10", None), "plan": lambda *_: {"rows": [{"id": "fixture-split"}], "performance_claim": "smoke-only"}, - "record": Mock(), "available_memory": lambda: 10**15, + "record": Mock(), "available_memory": lambda _: 10**15, "fixture": lambda _: {"files": [{"size": 1}], "repo": "Fixture/Model", "revision": "b" * 40, "layers": 2}, "admit": Mock(), "prepare_split": Mock(return_value=[]), "port_available": Mock(), "PeerControl": Mock(from_environment=Mock(return_value=peer)), diff --git a/scripts/tests/inference_publication.py b/scripts/tests/inference_publication.py index b5f4a5fd..678e4cb8 100644 --- a/scripts/tests/inference_publication.py +++ b/scripts/tests/inference_publication.py @@ -9,6 +9,7 @@ from inference_nightly import PR_PATH, SOURCE, smoke_receipt from lib.ci_artifacts import read_json +from lib.inference_markdown import dataset_charts from lib.inference_parquet import read_run @@ -119,6 +120,7 @@ def release(source, run_id, number, started_at): first_stamp = "2026-11-21T00:00:00Z" smoke_receipt(evidence, SOURCE, "23") + smoke_receipt(evidence, SOURCE, "23", "metal-qwen35-4b-standalone", 125, backend="metal") first = release(SOURCE, "23", 1, first_stamp) self.assertEqual(first["outcome"], "failed") self.assertEqual(dataset.version, 2) @@ -127,7 +129,7 @@ def release(source, run_id, number, started_at): "https://huggingface.co/datasets/meshllm/skippy-inference-qualification/resolve/" + dataset.sha + "/reports/23-1") initial = read_json(dataset.directory / "baselines.json") - self.assertEqual(len(initial["baselines"]), 2) + self.assertEqual(len(initial["baselines"]), 4) self.assertEqual(read_run(dataset.directory / "runs/23/1.parquet"), first) self.assertTrue((dataset.directory / "charts/qualification-1.png").is_file()) self.assertEqual(release(SOURCE, "23", 1, first_stamp), first) @@ -137,6 +139,7 @@ def release(source, run_id, number, started_at): second_stamp = "2026-11-22T00:00:00Z" other_source = "b" * 40 smoke_receipt(evidence, other_source, "24", value=90) + smoke_receipt(evidence, other_source, "24", "metal-qwen35-4b-standalone", 112, backend="metal") second = release(other_source, "24", 2, second_stamp) self.assertEqual(second["outcome"], "failed") self.assertEqual(second["baseline_revision"], f"{2:040d}") @@ -153,6 +156,11 @@ def release(source, run_id, number, started_at): self.assertIn("## Latest numbers", card) self.assertIn("-10.00% · Regressed", card) self.assertIn("## Performance over time", card) + self.assertIn("Metal · Apple M3 Ultra", card) + charts = dataset_charts({"schema_version": 1, "runs": [first, second]}) + self.assertEqual(len(charts[0].panels), 2) + self.assertEqual({panel.current for panel in charts[0].panels}, {90, 112}) + self.assertEqual({panel.reference for panel in charts[0].panels}, {100, 125}) self.assertNotIn("job_fixture", card) self.assertEqual(read_run(dataset.directory / "runs/24/1.parquet"), second) # Replaying an older run must embed its own immutable images, not