From 591becdac5536bd301ebd7820a8938b05a959e91 Mon Sep 17 00:00:00 2001 From: Transaction Science Date: Wed, 14 Oct 2026 01:42:56 -0400 Subject: [PATCH] wai-quantum WebGPU: the windows member, five adapters certified bit-exact The windows runner is back (cbio-device-0000), so the member the workflow had only sketched in a comment is now a job. It replaces that comment. One job, not one per backend. The member test enumerates every adapter wgpu finds in the one process, and this host exposes five: both of its GPUs through both backends, plus Microsoft's software adapter through DX12. gpu-dx12-10de discrete NVIDIA, DX12 gpu-dx12-8086 integrated Intel, DX12 gpu-vulkan-10de discrete NVIDIA, Vulkan gpu-vulkan-8086 integrated Intel, Vulkan swgpu-dx12-1414 WARP, class Cpu The DX12 keys are the first coverage of the WGSL -> HLSL path (naga): every other member reaches its adapter through Metal or Vulkan. Run on the host before this was written, at this tree: 14 of 14 member tests pass; the adapters found are exactly the declared five; 40 bit-exact certificates, which is five adapters by four pinned corpus digests by both implementations (the per-gate kernel and tile runs); 7 of 7 shader mutants and 3 of 3 tile mutants killed on every one of the five; and the conformance corpus verifies through the member, statevector-equivalence holding, every reject file refused as listed. Two host facts the steps have to carry, both of which would otherwise fail in a way that looks like a code defect: `bash` here resolves to the WindowsApps WSL stub, and the machine PATH holds Git\cmd (git.exe) but not Git\bin (bash.exe). Under WSL the steps would reach none of the Windows GPU drivers, so Git Bash is put on PATH first and the next step refuses to continue unless `uname -s` reports MINGW or MSYS. The runner writes an unsigned .ps1 per step, so the process execution policy is set to Bypass; pwsh rather than Windows PowerShell, whose 5.1 parser rejects the PS7 syntax this repo's scripts use. Not a required status, per the note it replaces. Co-Authored-By: Claude Opus 5 --- .github/workflows/wai-quantum-webgpu.yml | 62 +++++++++++++++++++++--- 1 file changed, 56 insertions(+), 6 deletions(-) diff --git a/.github/workflows/wai-quantum-webgpu.yml b/.github/workflows/wai-quantum-webgpu.yml index dc3bf3178..ae59fb27e 100644 --- a/.github/workflows/wai-quantum-webgpu.yml +++ b/.github/workflows/wai-quantum-webgpu.yml @@ -339,9 +339,59 @@ jobs: "$RUNNER_TEMP/browser-webgpu.log" \ || { echo "::error::no GPU member certified bit-exact 4 of 4, per-gate and in tile runs, in the browser"; exit 1; } -# Windows, when its runner is back (DX12, translator naga+dxbc, and Vulkan, as separate members): -# member-windows: -# runs-on: windows -# env: { WAI_QUANTUM_WEBGPU_EXPECT: "" } -# steps: checkout; Set-ExecutionPolicy Bypass; run the script with `shell: bash` -# (Git Bash on PATH). Not a required status. + # Windows reaches both of this host's GPUs through both backends, so one job + # certifies five adapters rather than one per backend: the member test + # enumerates every adapter in the one process, and the DX12 keys exercise the + # WGSL -> HLSL path (naga) that no other member covers. Not a required status. + member-windows: + name: member ยท DX12 and Vulkan (cbio-windows) + runs-on: windows + timeout-minutes: 150 + env: + # The key list this host's first run printed: + # gpu-dx12-10de discrete NVIDIA, DX12 + # gpu-dx12-8086 integrated Intel, DX12 + # gpu-vulkan-10de discrete NVIDIA, Vulkan + # gpu-vulkan-8086 integrated Intel, Vulkan + # swgpu-dx12-1414 Microsoft's software adapter (WARP), class Cpu + # Adding or removing a driver changes this set, and the member test fails + # until this line matches it again. + WAI_QUANTUM_WEBGPU_EXPECT: gpu-dx12-10de,gpu-dx12-8086,gpu-vulkan-10de,gpu-vulkan-8086,swgpu-dx12-1414 + steps: + - uses: actions/checkout@v5 + # The runner writes an unsigned .ps1 per step, which the default policy + # refuses. pwsh, not Windows PowerShell: the 5.1 parser rejects the PS7 + # syntax this repo's scripts use. + - name: Allow the runner's generated scripts to run + shell: pwsh + run: Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force + # `bash` on this host resolves to the WindowsApps WSL stub, and the machine + # PATH carries Git\cmd (git.exe) but not Git\bin (bash.exe). Without this + # every `shell: bash` step below would run under WSL, which reaches none of + # the Windows GPU drivers. + - name: Put Git Bash on PATH + shell: pwsh + run: | + $gitBash = 'C:\Program Files\Git\bin' + if (-not (Test-Path "$gitBash\bash.exe")) { throw "Git Bash is missing at $gitBash" } + $gitBash | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + - name: The shell is Git Bash, not WSL + shell: bash + run: | + set -euo pipefail + command -v bash + # A WSL bash reports Linux; Git Bash reports MINGW or MSYS. + case "$(uname -s)" in + MINGW*|MSYS*) ;; + *) echo "::error::bash is $(uname -s), not Git Bash"; exit 1 ;; + esac + - name: The member's tests + shell: bash + run: scripts/wai-quantum-webgpu-member.sh + # wai-rs is built with --no-default-features here for the same reason as the + # other GPU members: its default `codecs` feature links system codec + # libraries this host does not have, and the corpus needs none of them. + - name: The conformance corpus through the member + shell: bash + working-directory: wai/wai-rs + run: cargo run --locked --no-default-features --features quantum_fabric_webgpu --bin wai_quantum_vectors -- verify ../quantum-conformance --webgpu -- 2.54.0 (Apple Git-157)