From 07d145debd98dc00e106fe8a62f35e6676a3dade Mon Sep 17 00:00:00 2001 From: chenyu Date: Fri, 20 Feb 2026 12:23:52 -0500 Subject: [PATCH] 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 --- .github/workflows/benchmark.yml | 2 ++ tinygrad/engine/jit.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 89bb998201..3c283f790c 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -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 diff --git a/tinygrad/engine/jit.py b/tinygrad/engine/jit.py index e4959bafd8..5213a5f7fb 100644 --- a/tinygrad/engine/jit.py +++ b/tinygrad/engine/jit.py @@ -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()