open-standards/.github/workflows/wai-quantum-landscape-fpga.yml
Transaction Science 39d8a84b29 wai-quantum-landscape-fpga: held to the grown conformance set, and what it cannot hold said
Main's set now holds settle cases to 1,000 cells, chains to 1,024 cells, sampled fields to
2^31 - 1 and a battery workload whose uncertain fields span 135,000, and a member may decline only
fields above 2^31 - 1. The member declines that and nothing else (takes). What the 64-cell engine
cannot hold it refuses with a sentence; member::beyond says why, and the checks hold the board to
the reference's bits on every case it holds and to a refusal on every case it does not. On the
model: 21/21 settle cases and 227/227 chains held, 13 cases refused, so the host certifies both
kernels uncertified under the current set. The README, the changelog and CI say so; the board
was certified bit-exact under the set of 2026-11-06, when its measurements were taken. The build
record carries the testbenches' results on the new session, in Icarus Verilog and xsim alike.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-07 03:36:31 -05:00

146 lines
6.8 KiB
YAML

name: wai-quantum-landscape-fpga reference design
# The FPGA board's member of energy-landscape jobs (wai/wai-quantum-landscape-fpga): its unit tests and
# clippy, warnings as errors; the member certified on the model of the logic (src/model.rs) and every
# check of the conformance set, every worked example and the joint-statistics test run on it; the
# board's code built and tested on the board's processor's architecture (aarch64, linux-arm64),
# where its cache maintenance compiles;
# and the logic itself: both testbenches replay the model's session against the RTL in an
# open-source simulator, every read checked. No board and no vendor tool here: the board's own runs
# are in the crate's measurements and README.
#
# Push filters match the push's delta, so every path the jobs read is listed.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: [main]
paths:
- 'wai/wai-quantum-landscape-fpga/**'
- 'wai/wai-quantum/src/quantum_landscape/**'
- 'wai/wai-quantum/src/quantum_landscape.rs'
- 'wai/wai-quantum/src/repro.rs'
- 'wai/wai-quantum/Cargo.toml'
- 'wai/quantum-conformance/landscape/**'
- 'rust-toolchain.toml'
- '.github/workflows/wai-quantum-landscape-fpga.yml'
pull_request:
paths:
- 'wai/wai-quantum-landscape-fpga/**'
- 'wai/wai-quantum/src/quantum_landscape/**'
- 'wai/wai-quantum/src/quantum_landscape.rs'
- 'wai/wai-quantum/src/repro.rs'
- 'wai/wai-quantum/Cargo.toml'
- 'wai/quantum-conformance/landscape/**'
- 'rust-toolchain.toml'
- '.github/workflows/wai-quantum-landscape-fpga.yml'
jobs:
relevant:
name: does this change touch it
runs-on: gate
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-landscape-fpga.yml \
"${{ github.event.pull_request.base.sha }}" \
"${{ github.event.pull_request.head.sha }}")
echo "this change touches wai-quantum-landscape-fpga: $r"
echo "run=$r" >> "$GITHUB_OUTPUT"
model:
name: the member against the model of the logic, and the logic against the model · linux, release
needs: relevant
if: needs.relevant.outputs.run == 'true'
runs-on: linux
timeout-minutes: 60
steps:
- uses: actions/checkout@v5
- name: Install Rust 1.99.1 and the simulator
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.99.1
rustup toolchain install 1.99.1 --profile minimal --component clippy
rustup default 1.99.1
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
SUDO=""; [ "$(id -u)" -ne 0 ] && SUDO="sudo"
command -v iverilog >/dev/null || { $SUDO apt-get update -qq; $SUDO apt-get install -y -qq iverilog; }
- name: Unit tests and clippy
shell: bash
working-directory: wai/wai-quantum-landscape-fpga
run: |
set -euo pipefail
cargo test --locked --release 2>&1 | tee "$RUNNER_TEMP/test.log"
grep -qE '^test result: ok\. [1-9][0-9]* passed; 0 failed' "$RUNNER_TEMP/test.log" || { echo "::error::no test ran"; exit 1; }
cargo clippy --locked --release --all-targets -- -D warnings
# Every case the engine holds must give the reference's bits and every one it cannot must be
# refused (the checks); the host's certification is printed, whatever it is: under the set
# as it stands, cases beyond the engine's 64 cells cost it its certificate (README).
- name: The member certified, the conformance set and the worked examples, on the model
shell: bash
working-directory: wai/wai-quantum-landscape-fpga
run: |
set -euo pipefail
cargo run --locked --release -- selftest --scale 0.05 --seeds 5 | tee "$RUNNER_TEMP/selftest.log"
grep -q 'certified by the host on the conformance set: settle ' "$RUNNER_TEMP/selftest.log"
grep -qE '^settle cases the engine holds: ([0-9]+)/\1 bit for bit' "$RUNNER_TEMP/selftest.log"
grep -qE '^chains the engine holds: ([0-9]+)/\1 bit for bit' "$RUNNER_TEMP/selftest.log"
grep -qE '^[0-9]+ checks, 0 failed$' "$RUNNER_TEMP/selftest.log"
- name: A job on the model, certified and sealed, with the reference's answer
shell: bash
working-directory: wai/wai-quantum-landscape-fpga
run: |
set -euo pipefail
printf '{"program": "vars 2\\noppose 0 1\\nsolve\\n", "seed": "7"}' | cargo run --locked --release -- landscape run - --model --demo-key > "$RUNNER_TEMP/job.json"
grep -q '"id": "fpga:model-landscape-64"' "$RUNNER_TEMP/job.json"
grep -q '"state": "-+"' "$RUNNER_TEMP/job.json"
- name: Joint statistics against exact enumeration, on the model
shell: bash
working-directory: wai/wai-quantum-landscape-fpga
run: |
set -euo pipefail
cargo run --locked --release -- joint --model --scale 0.05 | tee "$RUNNER_TEMP/joint.log"
grep -qE '^[0-9]+ checks, 0 failed$' "$RUNNER_TEMP/joint.log"
- name: The logic against the model, both testbenches
shell: bash
working-directory: wai/wai-quantum-landscape-fpga
run: sh scripts/run_tb.sh both
board-target:
name: the board's code on the board's processor's architecture · linux-arm64, release
needs: relevant
if: needs.relevant.outputs.run == 'true'
runs-on: linux-arm64
timeout-minutes: 60
steps:
- uses: actions/checkout@v5
- name: Install Rust 1.99.1
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.99.1
rustup toolchain install 1.99.1 --profile minimal --component clippy
rustup default 1.99.1
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
# The cache maintenance the DMA needs (dc cvac, dc civac, dsb) compiles only for aarch64.
- name: Unit tests and clippy
shell: bash
working-directory: wai/wai-quantum-landscape-fpga
run: |
set -euo pipefail
cargo test --locked --release 2>&1 | tee "$RUNNER_TEMP/test.log"
grep -qE '^test result: ok\. [1-9][0-9]* passed; 0 failed' "$RUNNER_TEMP/test.log" || { echo "::error::no test ran"; exit 1; }
cargo clippy --locked --release --all-targets -- -D warnings