Repository navigation
Build and verify Skippy CPU runtimes for Windows ARM64 - #248
Conversation
Ported-from: Mesh-LLM/mesh-llm#3077 Source-commit: de604b9835c1a72065f7fe446d74d3bbf2f0d24d
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
@i386 The required
I have left this author declaration unchecked while working through CI. |
Skippy Lab Qualification: PassedCommit: Native Spark lab qualification. Latest successful main: run 45835599636, attempt 1, commit
TPS comes from three separate warmed, uncached probes at concurrency 1, each generating exactly 128 tokens. The scored correctness answers and each probe's 64-token warmup are excluded. Each rate is total tokens / total server-reported phase time, not an average of request rates. Client elapsed times and raw responses are retained in throughput-probe.json. These bounded samples are not sustained benchmarks or controlled speedup comparisons. Legacy short-answer receipts and missing or invalid probe evidence show as Unavailable. Deltas use unrounded rates from matching PR-profile smoke receipts on the latest successful main run, including the nightly smoke evidence. Positive means faster. Changed workload inputs, different serving host classes, unequal phase token counts or missing evidence show Unavailable. Physical Spark placement and runtime conditions can differ; deltas are descriptive, not controlled speedup claims. Smoke checks cover GPU startup, deterministic endpoint repeats and bounded streaming. They do not establish an AgentX performance score. Nightly history and saved performance baselines are published separately; a saved baseline can be older than the latest successful main run used here. Native build and qualification output streams into each configuration’s Actions log, with per-attempt copies in Saved evidence. Any capture gaps are reported in the log and saved diagnostics. GitHub evidence copies expire after 30 days. |
i386
left a comment
There was a problem hiding this comment.
I reviewed target selection through the PowerShell wrapper, Cargo, native packaging, and the PE verifier. Please exercise an actual x64-to-ARM64 build and ARM64 startup after fixing target resolution.
| $targetDir = ($cargoMetadata | ConvertFrom-Json).target_directory | ||
| # Pass an explicit triple when crossing architectures. A native build | ||
| # keeps Cargo's ordinary layout unless the caller already selected a target. | ||
| if ($architecture -eq "arm64" -or $machineIsArm64 -or $env:CARGO_BUILD_TARGET) { |
There was a problem hiding this comment.
[P2] Resolve Cargo and native packaging to the same target. On an x64 host with CARGO_BUILD_TARGET=aarch64-pc-windows-msvc, omitting -Target selects x64 from the OS and this block overwrites the caller's ARM64 target. A target set via Cargo's build.target config can also escape this block, letting Cargo build for that target while the wrapper packages x64 and prints an unqualified output path. Resolve one effective triple before initializing MSVC, honor or explicitly reject conflicting caller settings, and use that triple for both builds and the output directory.
michaelneale
left a comment
There was a problem hiding this comment.
Approve with qualification. Windows ARM64 CPU runtime build and verification. Validated with synthetic ARM64 PE fixtures and script syntax checks. Qualification open: real ARM64 build and model-backed inference are unverified. The PR body states this explicitly. No runtime ABI or wire changes. Reviewed by Glum on behalf of @mic.
Signed-off-by: James Dumay <james@generalinference.xyz>
Signed-off-by: James Dumay <james@generalinference.xyz>
## Summary Rebased onto the external Skippy dependency (#3193). The Skippy half of this PR, the ARM64 CPU runtime and its packaging checks, now lives in Mesh-LLM/skippy#248. What is left here is the host. `scripts\build-windows.ps1 -TargetArch arm64` builds `mesh-llm` for `aarch64-pc-windows-msvc`, cross-compiling from an x64 machine or natively on Windows on ARM, where it is the default. - **MSVC environment**: arm64 imports `vcvarsall amd64_arm64` (or `arm64` on an ARM64 machine) and checks that `VSCMD_ARG_TGT_ARCH` really is `arm64`. An x64 build re-imports `vcvars64` when the shell was left targeting another architecture, since `cl`, `link` and `lib` are then on `PATH` but build for ARM64. - **clang**: Visual Studio's clang goes on `PATH` for the `ring` crate, which compiles its aarch64 assembly with it. - **cargo** gets `--target aarch64-pc-windows-msvc`, so the host lands in `target\aarch64-pc-windows-msvc\<profile>`. - The root `scripts\build-windows.ps1` forwards `-TargetArch`, and CONTRIBUTING.md documents the command and the two Visual Studio components it needs. This PR builds on #3241 and uses its published Skippy v0.80.6 Windows ARM64 CPU runtime. The installer, updater, and release workflow select the native ARM64 package. Pinned CI includes a Windows ARM64 runtime-download and inference smoke. ## Testing On an x64 Windows 11 machine (Visual Studio 2022 Build Tools with the ARM64 tools and Clang components, Rust `aarch64-pc-windows-msvc` target), from this branch: - `scripts\build-windows.ps1 -TargetArch arm64` cross-compiles the host in 3.5 minutes; `target\aarch64-pc-windows-msvc\debug\mesh-llm.exe` is PE machine `0xAA64` (159.8 MB). - `scripts\build-windows.ps1` without `-TargetArch` still builds the x64 host (`0x8664`, 176.2 MB). - Both in one PowerShell session, ARM64 first: the ARM64 run leaves `VSCMD_ARG_TGT_ARCH=arm64` and the ARM64 `cl` on `PATH`, the x64 run then says it re-imports vcvars64, and the hosts are `0xAA64` and `0x8664`. Native Windows ARM64 validation runs in pinned CI. Local PowerShell tests verified architecture selection for native builds and cross-builds. The package selector identified the published ARM64 executable from its PE header. One thing I hit on that machine, unrelated to this change: the repository's `.cargo/config.toml` sets `rustc-wrapper = "sccache"`, so `build-windows.ps1` fails with "program not found" where sccache isn't installed. I removed that line locally for these builds. --------- Co-authored-by: James Dumay <james@generalinference.xyz>
Original problem
Standalone Windows source builds selected x64, and a target label alone cannot establish that a bundled DLL uses the requested architecture. Windows ARM64 users need a source-built CPU runtime alongside the ARM64 CLI.
Ported from Mesh #3077 for the Skippy cutover.
Diagnostics
The release verifier exercises ARM64 PE fixtures covering the primary DLL, an executable tool, and a manifest-declared helper. It rejects x64 images substituted in any of those positions even when the checksums match the substituted bytes.
Fix
Select the native Windows architecture by default, support ARM64 source builds from either host architecture, initialize the matching MSVC environment, and build the CPU runtime with Clang. Verify the PE machine for every packaged binary. Resolve the selected Windows triple consistently across MSVC, Cargo and packaging. Full CI and releases build the Windows ARM64 CPU product on the hosted ARM64 image, check its provenance and archive contents, and publish the verified archive without executing smoke. GitHub ARM64 runner image
Usage
Run from PowerShell with the ARM64 MSVC tools, Clang, and the ARM64 Rust target installed.
Illustrative output for the default Cargo target directory.
Compatibility
Windows ARM64 is CPU-only. The source build puts the runtime beside the CLI in Cargo’s target-qualified directory. The new release entry uses package verification as its validation policy.
Validation
bash -n scripts/build-llama.sh,bash -n scripts/package-native-runtime.sh,git diff --check, andPYTHONPATH=scripts python3.12 scripts/tests/release_contracts.pypassed.scripts/package-native-runtime.sh --backend cpu --target aarch64-pc-windows-msvc --out <fixture-out> --no-model-package-toolandpython3.12 scripts/native-inspect.py verify-runtime-package <fixture-bundle>passed using a synthetic ARM64 input. The full and PR planner checks, 31 Node workflow tests,just automation-contracts, ShellCheck andgit diff --checkpassed. The release inventory fixture verified ARM64 publication inputs with no smoke report. Local actionlint reported the existing releaseconcurrency.queuekey and passed with that unchanged diagnostic excluded. The hosted Windows ARM64 package build remains unverified.Workflow changes
Shared CI
flowchart LR subgraph BeforeCI[Before] A[PR profile or full CI invocation] --> B[Plan and quality] B --> C[Selected package jobs and existing smoke] C --> D[CI gate] end subgraph AfterCI[After] E[PR profile or full CI invocation] --> F[Plan and quality] F --> G[Selected package jobs and existing smoke] F -->|Full profile| H[Windows ARM64 CPU package and verification] G --> I[CI gate] H -->|Product archive and job result| I endPackage action
flowchart LR subgraph BeforePackage[Before] A[Set up toolchain and restore source] --> B[Build or download verified CLI] B --> C[Build and verify runtime and compose archive] C --> D[Run configured smoke] D --> E[Upload product artifact] end subgraph AfterPackage[After] F[Set up toolchain and restore source] --> G[Build or download verified CLI] G --> H[Build and verify runtime and compose archive] H -->|Existing smoke modes| I[Run configured smoke] H -->|Windows ARM64 CPU| J[Upload product artifact] I --> J endRelease workflow
flowchart LR subgraph BeforeRelease[Before] A[Scheduled or dispatched release] --> B[Prepare candidate] B --> C[Full CI and qualification] C -->|Archives and smoke evidence| D[Verify release inventory] D -->|Verified assets| E[Protected publisher] end subgraph AfterRelease[After] F[Scheduled or dispatched release] --> G[Prepare candidate] G --> H[Full CI and qualification] H -->|Existing archives and smoke evidence| I[Verify release inventory] H -->|Windows ARM64 archive and provenance| I I -->|Verified assets| J[Protected publisher] endMain CI fixes refreshed —
c42417ba6a1cMerged target main
cc2a27435e798649a9cb938d600d39722e4a2263, including #254's separate queue/execution budgets and #256's formation-bound peer rendezvous, verified child listener readiness and control availability during preparation. Earlier split qualification failures included connection-refused/timeouts at the leader control port; those older results predate these shared fixes. Other merged CI fixes include Windows Vulkan path handling and the shared Windows GPU smoke workflow.SKIPPY_PYTHON=/tmp/skippy-ci-repair/automation-venv312/bin/python just ci-automationpassed on the merged tree, including deadline, peer identity, listener ownership, log streaming, reporting/publication and workflow contracts.git diff --checkandgit diff --cached --checkpassed. This is a normal base merge preserving the PR's feature changes; no additional Rust/native feature change was authored in this refresh. New exact-head source/package/device checks and native inference qualification are pending; earlier native results do not qualify this new head. The previous head remains available in history as65f0c67df3124da9fe6634d647876f41cae3c612.Acceptance criteria