All checks were successful
wai-quantum matrix-extension member / does this change touch it (pull_request) Successful in 8s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 11s
standards workspaces build + test / macOS energy backends (pull_request) Has been skipped
wai-quantum Metal member / does this change touch it (pull_request) Successful in 11s
wai-quantum matrix-extension member / member · matrix extension, emulated (aarch64 Linux) (pull_request) Successful in 25s
wai-quantum Metal member / member · Metal absent (linux) (pull_request) Successful in 52s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 2m44s
wai-quantum Metal member / member · Metal (macos) (pull_request) Successful in 7m34s
wai-quantum matrix-extension member / member · matrix extension absent (macos) (pull_request) Successful in 10m11s
Three new runners joined `macos` and `linux` on 2026-10-29: an M5 Max and an M4 Max (both with the matrix extension, and other GPUs), and the iMac's Linux VM. #533's run put two Studio-certified members on them: - `member · Metal (macos)`, pinned to the Studio's gpu-msl-1009, ran on the M5 Max: every c0-c5 test failed, the device undeclared. - `member · matrix extension absent (macos)` ran on an M4 Max: "this runner has SME". Both now ask for `macos-m3-ultra`, a label the Studio's runner carries beside `macos`. The fleet's other macOS jobs stay on `macos`. Members for the laptops' GPUs and their matrix extension are for a run on them to declare. (The third failure, the riscv64 vector member on the iMac's VM, was the VM lacking a riscv64 binfmt handler. That is fixed on the host: qemu-user 8.2.2's handlers are installed there, as on jetson-hub.) Co-Authored-By: Claude Opus 5.5 <[email protected]>
157 lines
9 KiB
YAML
157 lines
9 KiB
YAML
name: wai-quantum Metal member
|
|
|
|
# The fabric's Metal member: the gate kernels in the Metal shading language,
|
|
# compiled at run time by the operating system's own compiler for the device,
|
|
# and certified bit-exact against the CPU reference's pinned corpus digests.
|
|
#
|
|
# - metal-hw (the macOS runner's GPU): the device tests must find exactly the
|
|
# declared device, agree with the CPU on the arithmetic probe and on random
|
|
# states (out-of-range runs included), reproduce all four pinned certificates
|
|
# (two gatesets, random-v1 and fabric-v1), and catch every kernel mutant; and
|
|
# the matrix kernel, every product formed by the GPU's SIMD-group matrix
|
|
# multiply from 8-bit limbs, must do all of the same under its own
|
|
# implementation id, with its own mutants caught; and so must the
|
|
# tensor-operation kernel, every product formed by the shading language's
|
|
# tensor operation from offset-binary 8-bit limbs.
|
|
# - metal-absent (a container with no Metal): the same build finds no member
|
|
# and says why, rather than failing; the device tests run over no member with
|
|
# the declaration `none`.
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'wai/wai-quantum/**'
|
|
- 'rust-toolchain.toml'
|
|
- '.github/workflows/wai-quantum-metal.yml'
|
|
schedule:
|
|
- cron: '56 7 * * *'
|
|
|
|
jobs:
|
|
relevant:
|
|
name: does this change touch it
|
|
runs-on: linux-arm64
|
|
outputs:
|
|
run: ${{ steps.gate.outputs.run }}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
- id: gate
|
|
run: |
|
|
set -euo pipefail
|
|
r=$(python3 scripts/pr-touches-paths.py .github/workflows/wai-quantum-metal.yml \
|
|
"${{ github.event.pull_request.base.sha }}" \
|
|
"${{ github.event.pull_request.head.sha }}")
|
|
echo "this change touches wai-quantum-metal: $r"
|
|
echo "run=$r" >> "$GITHUB_OUTPUT"
|
|
|
|
metal-hw:
|
|
name: member · Metal (macos)
|
|
needs: relevant
|
|
if: needs.relevant.outputs.run == 'true'
|
|
# The pins are the Mac Studio's GPU (gpu-msl-1009). The fleet's other macOS runners
|
|
# (an M4 Max and an M5 Max) have other GPUs, so this member runs on the Studio by its
|
|
# own label; a member for theirs is declared from a run on them.
|
|
runs-on: macos-m3-ultra
|
|
timeout-minutes: 90
|
|
env:
|
|
WAI_QUANTUM_METAL_EXPECT: gpu-msl-1009
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
# launchd's PATH omits cargo on the macOS host runner.
|
|
- name: Put cargo on PATH
|
|
shell: bash
|
|
run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
|
- name: The member's unit tests
|
|
shell: bash
|
|
working-directory: wai/wai-quantum
|
|
run: |
|
|
set -euo pipefail
|
|
nice -n 10 cargo test --locked --features quantum_fabric_metal --lib -- quantum_fabric_metal:: quantum_fabric::metal:: 2>&1 | tee "$RUNNER_TEMP/unit.log"
|
|
grep -qE '^test result: ok\. [1-9][0-9]* passed; 0 failed' "$RUNNER_TEMP/unit.log" || { echo "::error::no unit test ran"; exit 1; }
|
|
- name: The member's device tests
|
|
shell: bash
|
|
working-directory: wai/wai-quantum
|
|
run: |
|
|
set -euo pipefail
|
|
report="$RUNNER_TEMP/metal-report.txt"; : > "$report"
|
|
WAI_QUANTUM_METAL_REPORT="$report" nice -n 10 \
|
|
cargo test --locked --release --features quantum_fabric_metal --test metal_member -- --test-threads=1 2>&1 | tee "$RUNNER_TEMP/device.log"
|
|
grep -qE '^test result: ok\. 9 passed; 0 failed' "$RUNNER_TEMP/device.log" || { echo "::error::not every device test ran and passed"; exit 1; }
|
|
cat "$report"
|
|
key="$WAI_QUANTUM_METAL_EXPECT"
|
|
grep -qx "metal devices: as declared ($key)" "$report" || { echo "::error::the devices found are not the declared ones"; exit 1; }
|
|
n="$(grep -c "^metal certified: key=$key .* implementation=metal-lanes64/[0-9a-f]\{16\} parity=bit-exact " "$report")"
|
|
[ "$n" = 4 ] || { echo "::error::$n of 4 certificates were earned"; exit 1; }
|
|
grep -qx "metal mutants: key=$key killed 6 of 6" "$report" || { echo "::error::a kernel mutant survived"; exit 1; }
|
|
- name: The matrix kernel, every product by the SIMD-group matrix multiply
|
|
shell: bash
|
|
working-directory: wai/wai-quantum
|
|
run: |
|
|
set -euo pipefail
|
|
report="$RUNNER_TEMP/metal-matrix-report.txt"; : > "$report"
|
|
WAI_QUANTUM_METAL_REPORT="$report" nice -n 10 \
|
|
cargo test --locked --release --features quantum_fabric_metal --test metal_matrix -- --test-threads=1 2>&1 | tee "$RUNNER_TEMP/matrix.log"
|
|
grep -qE '^test result: ok\. 9 passed; 0 failed' "$RUNNER_TEMP/matrix.log" || { echo "::error::not every matrix test ran and passed"; exit 1; }
|
|
cat "$report"
|
|
key="$WAI_QUANTUM_METAL_EXPECT"
|
|
grep -qx "metal matrix devices: as declared ($key)" "$report" || { echo "::error::the devices found are not the declared ones"; exit 1; }
|
|
grep -q "^metal matrix member: key=$key .* implementation=metal-matrix-limbs8/[0-9a-f]\{16\} " "$report" || { echo "::error::the device ran no matrix member"; exit 1; }
|
|
n="$(grep -c "^metal matrix certified: key=$key .* implementation=metal-matrix-limbs8/[0-9a-f]\{16\} parity=bit-exact " "$report")"
|
|
[ "$n" = 4 ] || { echo "::error::$n of 4 matrix certificates were earned"; exit 1; }
|
|
grep -qx "metal matrix mutants: key=$key killed 7 of 7" "$report" || { echo "::error::a matrix mutant survived"; exit 1; }
|
|
- name: The tensor-operation kernel, every product by the tensor operation
|
|
shell: bash
|
|
working-directory: wai/wai-quantum
|
|
run: |
|
|
set -euo pipefail
|
|
report="$RUNNER_TEMP/metal-tensor-ops-report.txt"; : > "$report"
|
|
WAI_QUANTUM_METAL_REPORT="$report" nice -n 10 \
|
|
cargo test --locked --release --features quantum_fabric_metal --test metal_tensor_ops -- --test-threads=1 2>&1 | tee "$RUNNER_TEMP/tensor-ops.log"
|
|
grep -qE '^test result: ok\. 9 passed; 0 failed' "$RUNNER_TEMP/tensor-ops.log" || { echo "::error::not every tensor-operation test ran and passed"; exit 1; }
|
|
cat "$report"
|
|
key="$WAI_QUANTUM_METAL_EXPECT"
|
|
grep -qx "metal tensor-ops devices: as declared ($key)" "$report" || { echo "::error::the devices found are not the declared ones"; exit 1; }
|
|
grep -q "^metal tensor-ops member: key=$key .* implementation=metal-tensor-ops-limbs8/[0-9a-f]\{16\} " "$report" || { echo "::error::the device ran no tensor-operation member"; exit 1; }
|
|
n="$(grep -c "^metal tensor-ops certified: key=$key .* implementation=metal-tensor-ops-limbs8/[0-9a-f]\{16\} parity=bit-exact " "$report")"
|
|
[ "$n" = 4 ] || { echo "::error::$n of 4 tensor-operation certificates were earned"; exit 1; }
|
|
grep -qx "metal tensor-ops mutants: key=$key killed 8 of 8" "$report" || { echo "::error::a tensor-operation mutant survived"; exit 1; }
|
|
|
|
metal-absent:
|
|
name: member · Metal absent (linux)
|
|
needs: relevant
|
|
if: needs.relevant.outputs.run == 'true'
|
|
runs-on: linux
|
|
timeout-minutes: 60
|
|
env:
|
|
WAI_QUANTUM_METAL_EXPECT: none
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- name: Install Rust 1.98.0
|
|
shell: bash
|
|
run: |
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
|
command -v rustup >/dev/null 2>&1 || \
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain 1.98.0
|
|
rustup toolchain install 1.98.0 --profile minimal
|
|
rustup default 1.98.0
|
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
|
- name: No Metal here, and the member says so
|
|
shell: bash
|
|
working-directory: wai/wai-quantum
|
|
run: |
|
|
set -euo pipefail
|
|
cargo test --locked --features quantum_fabric_metal --lib -- quantum_fabric_metal:: quantum_fabric::metal:: 2>&1 | tee "$RUNNER_TEMP/unit.log"
|
|
grep -qE '^test quantum_fabric_metal::tests::off_macos_nothing_is_found_and_discovery_says_why \.\.\. ok$' "$RUNNER_TEMP/unit.log" || { echo "::error::the off-platform discovery test did not run"; exit 1; }
|
|
report="$RUNNER_TEMP/metal-report.txt"; : > "$report"
|
|
for t in metal_member metal_matrix metal_tensor_ops; do
|
|
WAI_QUANTUM_METAL_REPORT="$report" cargo test --locked --features quantum_fabric_metal --test "$t" -- --test-threads=1 2>&1 | tee "$RUNNER_TEMP/$t.log"
|
|
grep -qE '^test result: ok\. 9 passed; 0 failed' "$RUNNER_TEMP/$t.log" || { echo "::error::$t did not run over no device"; exit 1; }
|
|
done
|
|
grep -qx 'metal devices: as declared (none)' "$report" || { echo "::error::the absent case was not established"; exit 1; }
|
|
grep -qx 'metal matrix devices: as declared (none)' "$report" || { echo "::error::the matrix absent case was not established"; exit 1; }
|
|
grep -qx 'metal tensor-ops devices: as declared (none)' "$report" || { echo "::error::the tensor-operation absent case was not established"; exit 1; }
|