compile3 0.10.1 driving_vision in mac pytest (#14911)

* compile3 0.10.1 driving_vision in mac pytest

* sync before re-executing onetime kernels
This commit is contained in:
chenyu
2026-02-20 12:23:52 -05:00
committed by GitHub
parent d895713116
commit 07d145debd
2 changed files with 4 additions and 0 deletions

View File

@@ -45,6 +45,8 @@ jobs:
run: |
source /tmp/tinygrad_pytest_ci/bin/activate
pytest -nauto --durations=20
- name: openpilot compile3 0.10.1 driving_vision
run: FLOAT16=1 CL=1 IMAGE=2 python3.11 examples/openpilot/compile3.py https://github.com/commaai/openpilot/raw/720392c9a5b986981fdbed1bb8c47a6c5573a50e/selfdrive/modeld/models/driving_vision.onnx
testmacbenchmark:
name: Mac Benchmark

View File

@@ -348,6 +348,8 @@ class TinyJit(Generic[ReturnType]):
update_depends(depends, jit_cache)
pruned, onetime = partition(jit_cache, lambda ei: any(b in depends for b in get_out_buffers_for_ei(ei)))
if DEBUG >= 1: print(f"pruned from {len(jit_cache)} -> {len(pruned)} kernels")
# sync before re-executing onetime kernels
for dev in set(Device[b.device] for ei in onetime for b in ei.bufs if b is not None): dev.synchronize()
# run the onetime kernels here
for ei in onetime:
for b in ei.bufs: cast(Buffer, b).ensure_allocated()