tests/int_ops_differential.rs (feature legacy_int, test-only; a [[test]] entry with required-features): - an oracle that names, from the payload and the set alone, the planned break of integer-operators §15.3 a case falls under: a reserved byte that is not 0, C of 0, latents past 2^26, no layers, a field past 32 bits, a shift of 128 or more, k or stride of 0, out_ch of 0, an uncropped output or a tensor past 2^26, a certificate that does not meet acc64 (lowered and loaded), and a shift from 64 to 127 (exact now, by build before); - random sets and payloads (1-3 layers, kernels 1-4, strides 1-3, paddings and output paddings mostly in range, shifts 0-24, weights to 2^4, 2^10, 2^14 and, one set in eight, 2^20; latents a quarter at their ends; outputs one in eight off the payload's H and W; reserved bytes one in thirty-two not 0): outside a planned break both decodes give the same bytes or both refuse, and the direct decode never panics; under one, the decode through the operator set refuses; - each planned break shown on a payload and set the direct decode decodes, the operator set refusing it (or, for a shift of 64, giving it its exact meaning). Among them two the extension's text does not yet list: a set with no layers, and a layer with out_ch 0. Fixed count (3000 cases) on every push in wai-conformance's fast-kernel steps, both profiles (legacy_int at the end of the feature list, where gate tooling that greps for the step still finds it). WAI_DIFF_SECS / WAI_DIFF_SEED run it by time and seed: wai-ops-differential.yml does, an hour per profile, nightly on linux, seeded by the date. Co-Authored-By: Claude Opus 5.5 <[email protected]>
63 lines
2.5 KiB
YAML
63 lines
2.5 KiB
YAML
name: wai-ops differential (nightly)
|
|
|
|
# Each integer decoder that decodes through the integer operator set
|
|
# (wai/extensions/integer-operators.md) against its direct decode (the test-only
|
|
# `legacy_int` feature), on random parameter sets and payloads, for an hour under each
|
|
# build profile: with overflow checks on and with them off. Outside the planned breaks
|
|
# of integer-operators §15.3 the two decode to the same bytes or both refuse, and the
|
|
# direct decode never panics; under a planned break the decode through the operator set
|
|
# refuses (wai/wai-rs/tests/int_ops_differential.rs). Today: wai.neural.int_synth.
|
|
#
|
|
# Each night starts from its own seed, the date, which the log prints; a failing case
|
|
# names its seed, and `WAI_DIFF_SEED=<seed>` re-runs it. The same tests run for a fixed
|
|
# count on every push, in wai-conformance.yml's fast-kernel steps.
|
|
|
|
# One run per branch at a time. A push supersedes the run before it.
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '41 2 * * *'
|
|
# A change to this file runs it for two minutes per profile, so a broken job is seen
|
|
# before the night.
|
|
pull_request:
|
|
paths:
|
|
- '.github/workflows/wai-ops-differential.yml'
|
|
|
|
jobs:
|
|
differential:
|
|
name: differential · ${{ matrix.profile }}
|
|
runs-on: linux
|
|
timeout-minutes: 120
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
profile: [debug, release]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
# The docker image ships no Rust.
|
|
- 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: Through the operator set against the direct decode, random sets and payloads
|
|
working-directory: wai/wai-rs
|
|
shell: bash
|
|
env:
|
|
WAI_DIFF_SECS: ${{ github.event_name == 'schedule' && '3600' || '120' }}
|
|
run: |
|
|
set -euo pipefail
|
|
P=""
|
|
if [ "${{ matrix.profile }}" = release ]; then P="--release"; fi
|
|
export WAI_DIFF_SEED="$(date -u +%Y%m%d)"
|
|
echo "WAI_DIFF_SECS=$WAI_DIFF_SECS WAI_DIFF_SEED=$WAI_DIFF_SEED"
|
|
cargo test $P --locked --no-default-features --features legacy_int --test int_ops_differential -- --nocapture
|