Four authored cases over engine/split_store_tail, 16 threads at two a row over 8 rows, out filled with 0xCD: sst_split at rows of 7, 6 and 5 floats (each row's second thread writes three, two or one float after its first) and sst_block at rows of 7 (the four in one block, nothing where the row does not hold them). A row starts at 4w bytes times its index, so the first word of a run of four sits at every residue of 16 across the rows. Installed with corpus-case-check (m3-max-80423) and qualified on Metal on the Apple M3 Max, three executions each (m3-max-80428). Each Metal output equals the MSL's stores computed on the CPU, byte for byte (output sha256 d875b981, 2f994d06, 1a84d360, 21ceb16b). scripts/qualify-public-cases now runs the four on lavapipe against those rows. At the branch's last commit their Vulkan runs match Metal on lavapipe (m3-max-80560), the AMD Radeon RX 7900 XTX (m3-max-80568) and the AMD Radeon 780M (m3-max-80570). Not run on an Intel card.
96 lines
4.9 KiB
Bash
Executable File
96 lines
4.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# The "Qualify public cases on native Vulkan (Linux)" step of .github/workflows/ci.yml, shared
|
|
# with scripts/linux-gate-ci so the two cannot drift.
|
|
#
|
|
# scripts/qualify-public-cases <bin-dir> # <bin-dir> holds the built validation binaries
|
|
#
|
|
# Executes the owned public cases with the engine (the only engine the validation binaries run
|
|
# since cutover X2b) on the CPU Vulkan ICD (lavapipe), against their committed
|
|
# Metal observations in the reference list's primary environment
|
|
# (crates/metal2vulkan-validation/cutover/c3-references.json), then rebuilds the disposable index and
|
|
# requires each case's engine slot to be current. Run it from the repository root.
|
|
#
|
|
# Rows written here are ephemeral CI evidence under the operator environment `ci-lavapipe`, which
|
|
# no C3 venue names: a runner's lavapipe is not a venue's declared device, so a
|
|
# venue's environment would refuse it (`venue_mismatch`), and these rows are no venue's evidence.
|
|
#
|
|
# A public checkout has no private store, so `corpus-index` indexes only the rows of public
|
|
# sources and reports the committed rows of private AIR it left out (`scope=public-only ...`);
|
|
# any failure of it fails the step.
|
|
set -euo pipefail
|
|
|
|
[ "$#" -eq 1 ] || { echo "usage: scripts/qualify-public-cases <bin-dir>" >&2; exit 64; }
|
|
bin=$1
|
|
export LP_NUM_THREADS=1
|
|
|
|
environment=ci-lavapipe
|
|
metal=$(python3 -c 'import json, sys; print(json.load(open(sys.argv[1]))["primary"]["environment_id"])' \
|
|
crates/metal2vulkan-validation/cutover/c3-references.json)
|
|
cases=(
|
|
d9ce86618e0924966fbb1e7de63761ef471bb6e85b592a70193a26375ec0423f
|
|
4659fedddd1695fba79c3faa797ec3be647e3fd1a87ecec23bde55ccbfbcf656
|
|
1e54315eb0ffcac633d4992c577f3e6ac384ed1bdf2321887c1f37242c00c887
|
|
# A kernel that asks two bound visible-function tables whether they are null and their sizes,
|
|
# and one that calls through a table of four entries, one of them null.
|
|
3a8f75e182b71ba42a94dd39d178cf6789010fbe1355b56944adf0a1c75ba807
|
|
af884d65cb584518fcb8b7319dfe9deff15b20604cfc68f6d72dd97ca3113536
|
|
# An AIR 1.8 fragment (engine/air_1_8_sampling) that samples plainly and by gradient through
|
|
# an argument sampler: the forms an AIR library declares before AIR 2.0.
|
|
884ad7d75a221a11480581ae8d55ef5773defdd021c4fc56c6bde51445e87d37
|
|
# A float (engine/fc_float_gate) and a half (engine/fc_half_gate) function constant that gate
|
|
# a kernel's argument and a fragment's sample mask: Metal keeps what they gate where the
|
|
# value's bits are not all zero (1.5, -0.0 and a quiet NaN), and drops it at +0.0 and unsupplied.
|
|
3a843c7911108e011ac425010de8918ea2ffaabc680efe846d1fa60427bb89da
|
|
ad28780327b4d7bfdfbeba9985f9a065b96766455d39f2187a45aa667acbcb9d
|
|
c7440f65e3dc4b2a20e5a80e1303bd4733973ef4a9d7e0da4f8b2d852b82ead8
|
|
8e22d09b34c6911bf89e9a3819fe8935c877298faf69b235cba74f83cc9f0d1e
|
|
4db5409a6e7d85d95d16cf6a0c2c6a386ee0a2ca281834c5ebf7d54481a115e5
|
|
0ec889df18ff07ab70791b6116fe2dd30331251d9715e62f6644c561ff411426
|
|
03cbdd46a5c0dbe4edcd3aaee7205110805835347288f0f8269131e743362d4d
|
|
8235cf2527e58712c73b1baacb72b2cd576cf45786fe3024b3776d88c969b71f
|
|
579eb7c4c5c2eb7cd30871124eac021cbb131e7931e514cd6ee03234bcc68983
|
|
16bb9c40891adce3e478f143c4d0cf1abd093e6b6c8ba1b5793bcff70f50487a
|
|
deeca6b1a5f4a5daa333c7cb757bd330eccc2f50870a4b73afe7b3704328c853
|
|
0d652c7e36e231111b77232853ae8237603e2eaf0205a30a08c9e517e2b27dfe
|
|
4534a2f6acfe169228698c79410b9f69a2a27193be26d24df48f04bfa212f134
|
|
18c8aab797757953abb8725f36053c4607a1829a8b4f1dcb8c5b877d697fdf1b
|
|
b9bfa9f2737e76d6052e4f705891209af9e7306206b5999acae1a9c30d7a13aa
|
|
# A row of floats written four at a time from a float4 (engine/split_store_tail), the first in
|
|
# one block and the rest where the row holds them, at rows of 5, 6 and 7 floats, and the four
|
|
# in one block at rows of 7: every residue of 16 for the first word's offset.
|
|
1c1ad4164a77a6c10927742ee54ce9b5e6757df96f8eaa3a4e5dcf70eb7c3fe3
|
|
440c5d434c2c77b1147d0ccf9cd482c4f48424f80f1e72042c0e025e3dcd030c
|
|
5cc3b69ff9552e7dc62f5b2f3e89d0c09666f48f9886406506a55842aaf0ead7
|
|
861ff4ddf6f7458effd523d90fdb1d816e4d5d1ba39759ef8755bff0b2243817
|
|
)
|
|
|
|
for case_id in "${cases[@]}"; do
|
|
"$bin/corpus-vulkan" \
|
|
--case-id "$case_id" \
|
|
--metal-environment-id "$metal" \
|
|
--environment-id "$environment" \
|
|
--device-type cpu
|
|
done
|
|
|
|
"$bin/corpus-index"
|
|
"$bin/corpus-index" --check
|
|
named=()
|
|
for case_id in "${cases[@]}"; do
|
|
named+=(--case-id "$case_id")
|
|
done
|
|
status=$("$bin/corpus-status" "${named[@]}")
|
|
echo "$status"
|
|
incomplete=0
|
|
tab=$'\t'
|
|
slot="$environment@engine"
|
|
for case_id in "${cases[@]}"; do
|
|
if ! grep -Fqx "slot${tab}${case_id}${tab}vulkan${tab}${slot}${tab}current" <<<"$status"; then
|
|
echo "native Vulkan qualification of $case_id in $slot is not current" >&2
|
|
incomplete=1
|
|
fi
|
|
done
|
|
if [ "$incomplete" -ne 0 ]; then
|
|
echo "native Vulkan qualification is incomplete" >&2
|
|
exit 1
|
|
fi
|