Skip to content

Commit e782aff

Browse files
larsgebclaude
andcommitted
demo.py: cap diffuse n_steps_list on CI to prevent GPU timeout
The diffuse_python_loop benchmark with ns=500 does 4 × 500 Metal round-trips (laplacian + saxpy) on a 512×512 grid = 2 000 command-buffer pairs per benchmark run. The CI paravirtual GPU times out and SIGSEGVs during this loop (confirmed: crash at cell 28, after cell 26 N-body benchmark completed fine). Cap to [10, 50] steps on CI; full [10, 50, 100, 500] runs locally. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d926638 commit e782aff

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

demo.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,8 +709,10 @@ def diffuse_python_loop(ctx, field, dt, n_steps):
709709

710710

711711
# Benchmark: diffuse_steps (C++ loop) vs Python-loop GPU vs NumPy
712+
# The Python-loop variant does N Python→GPU round-trips per iteration; CI
713+
# crashes (GPU timeout) at 500 steps, so cap to 50 on the paravirtual device.
712714
grid_size = 512
713-
n_steps_list = [10, 50, 100, 500]
715+
n_steps_list = [10, 50] if _ci else [10, 50, 100, 500]
714716
dt = 0.1
715717

716718
gpu_fused = []

0 commit comments

Comments
 (0)