fix IGNORE_OOB=0 for WEBGPU (#13926)

This commit is contained in:
chenyu
2025-12-31 10:41:28 -05:00
committed by GitHub
parent 35bd39e4ba
commit 4968060ad4
2 changed files with 7 additions and 1 deletions

View File

@@ -584,6 +584,8 @@ jobs:
name: Linux (WebGPU)
runs-on: ubuntu-22.04
timeout-minutes: 20
env:
IGNORE_OOB: 0
steps:
- name: Checkout Code
uses: actions/checkout@v4
@@ -829,6 +831,8 @@ jobs:
name: MacOS (WebGPU)
runs-on: macos-14
timeout-minutes: 10
env:
IGNORE_OOB: 0
steps:
- name: Checkout Code
uses: actions/checkout@v4
@@ -906,6 +910,8 @@ jobs:
name: Windows (${{ matrix.backend }})
runs-on: windows-latest
timeout-minutes: 15
env:
IGNORE_OOB: 0
steps:
- name: Checkout Code
uses: actions/checkout@v4

View File

@@ -68,7 +68,7 @@ def validate_index(buf:UOp, idx:UOp, gate:UOp|None=None):
if 0<=idx.vmin and idx.vmax<sz: return True
# WEBGPU has a BITCAST in the index. TODO: fix
if any(x.op is Ops.BITCAST for x in idx.toposort()): return True
if any(x.op is Ops.BITCAST for x in idx.toposort() | gate.toposort()): return True
if not z3_imported: raise ImportError("bounds checking requires z3 >= 4.12.4, use IGNORE_OOB=1 to disable, or \"pip install 'z3-solver>=4.12.4\"")
solver = z3.Solver(ctx=z3.Context())