GPUPhysBench: Benchmarking Coding Agents for Correct and Efficient GPU Physics Simulation
Organizations: Georgia Institute of Technology
Abstract
Writing fast GPU code for physical simulation is difficult: implementations must preserve numerical accuracy while handling irregular data access, synchronization, and iterative solvers. We introduce GPUPhysBench, a benchmark of 50 tasks testing whether coding agents can meet these demands. Tasks cover fluids, deformable solids, and granular materials, from individual simulation operators to complete simulators. Agents write, compile, test, and optimize GPU code with access to a NVIDIA GPU under fixed time budgets. We report pass rates and runtime performance relative to expert-optimized reference implementations. In a single-attempt evaluation of six frontier model-harness pairs, the two strongest pass all 50 tasks, but even the fastest reaches at least 0.9 the reference speed on only 22% of them, and no submission is more than 5% faster than the reference. The largest gaps arise in collision detection, constraint solving, and iterative solvers. GPUPhysBench brings physical simulation workloads to coding-agent evaluation, testing both the ability to implement numerical methods correctly and the ability to make them run efficiently.
Figures & tables
| Model | Harness | Correctness | Pass Rate | |||
|---|---|---|---|---|---|---|
| Claude-Opus-5 | Claude Code | 100% | 100% | 66% | 22% | 0% |
| GPT-5.6-Sol | Codex CLI | 100% | 100% | 42% | 16% | 0% |
| Gemini-3.5-Flash | Gemini CLI | 88% | 88% | 28% | 16% | 0% |
| DeepSeek-V4.1-Flash | DeepSeek Harness | 86% | 86% | 38% | 16% | 0% |
| Qwen-3.8-Max | Qwen Code | 52% | 52% | 34% | 14% | 0% |
| GLM-5.3 | OpenCode | 88% | 86% | 34% | 16% | 0% |
| Attempts | Time Budget | Coding Agent | Correctness | Pass Rate | |||
|---|---|---|---|---|---|---|---|
| 1 | Opus | 98% | 98% | 54% | 18% | 0% | |
| GPT | 100% | 100% | 36% | 16% | 0% | ||
| Opus | 100% | 100% | 66% | 22% | 0% | ||
| GPT | 100% | 100% | 42% | 16% | 0% | ||
| Opus | 100% | 100% | 76% | 34% | 4% | ||
| GPT | 100% | 100% | 40% | 18% | 0% |
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| Task | Opus | GPT | Gemini | DeepSeek | Qwen | GLM |
|---|---|---|---|---|---|---|
| Local Grid and Lattice Computations | ||||||
| advect_rk1 | 0.87 | 0.80 | 0.55 | 0.88 | – | – |
| advect_rk2 | 0.83 | 0.74 | 0.70 | 0.83 | 0.67 | 0.82 |
| advect_rk3 | 0.85 | 0.44 | 0.42 | 0.73 | 0.62 | – |
| advect_rk4 | 0.89 | 0.76 | 0.75 | 0.44 | 0.86 | 0.63 |
| advect_mc | 0.81 | 0.51 | 0.66 | 0.64 | – | 0.54 |
| Model | Run | Pass Rate | Geo. mean | |||
|---|---|---|---|---|---|---|
| Claude-Opus-5 | Run 1 | 100% | 66% | 22% | 0% | 0.53 |
| Run 2 | 98% | 64% | 24% | 2% | 0.53 | |
| Run 3 | 100% | 64% | 28% | 0% | 0.52 | |
| Mean s.d. | 99.3 1.2 | 64.7 1.2 | 24.7 3.1 | 0.7 1.2 | 0.53 0.01 | |
| Best of 3, public selection | 100% | 76% | 36% | 2% | 0.63 | |
| Best of 3, hidden selection | 100% | 76% | 36% | 2% | 0.63 |
| Model | Pass Rate | ||
|---|---|---|---|
| Claude-Opus-5 | 100% / 100% | 66% / 65% | 22% / 16% |
| GPT-5.6-Sol | 100% / 100% | 42% / 35% | 16% / 8% |
| Gemini-3.5-Flash | 88% / 84% | 28% / 14% | 16% / 8% |
| DeepSeek-V4.1-Flash | 86% / 85% | 38% / 29% | 16% / 8% |
| Qwen-3.8-Max | 52% / 53% | 34% / 28% | 14% / 8% |
| GLM-5.3 | 86% / 87% | 34% / 26% | 16% / 8% |
| Model | Harness | Time (min) | Budget used | Deadline hits | Input tok. | Cached | Output tok. |
|---|---|---|---|---|---|---|---|
| Claude-Opus-5 | Claude Code | 15.7 | 43% | 0 | 1.65M | 96% | 45k |
| GPT-5.6-Sol | Codex CLI | 18.0 | 50% | 0 | 2.72M | 97% | 33k |
| Gemini-3.5-Flash | Gemini CLI | 8.9 | 25% | 0 | 2.88M | 90% | 16k |
| DeepSeek-V4.1-Flash | DeepSeek Harness | 18.5 | 54% | 0 | 7.34M | 99% | 116k |
| Qwen-3.8-Max | Qwen Code | 30.0 | 92% | 19 | 1.65M | 49% | 41k |
| GLM-5.3 | OpenCode | 23.8 | 66% | 4 | 2.96M | 97% | 66k |
| Task | Model | |
|---|---|---|
| PIC/FLIP particle-to-grid transfer | Claude-Opus-5 | |
| Gemini-3.5-Flash | ||
| Dirichlet Poisson solve | Claude-Opus-5 | |
| Gemini-3.5-Flash |
| No. | Category | Test name | Description |
|---|---|---|---|
| 1 | Global Solves and Pressure Projection | poisson_dirichlet | Solve a Poisson system with homogeneous Dirichlet boundaries using preconditioned CG. |
| 2 | Global Solves and Pressure Projection | poisson_neumann | Solve a pure-Neumann Poisson system using preconditioned CG and return a zero-mean solution. |
| 3 | Global Solves and Pressure Projection | viscosity_implicit | Solve implicit viscous diffusion for velocity components on a MAC grid. |
| 4 | Global Solves and Pressure Projection | mass_spring_newtonian_implicit | Advance an implicit mass-spring step using Newton’s method. |
| 5 | Global Solves and Pressure Projection | fem_newtonian_implicit | Advance an implicit tetrahedral FEM step using Newton’s method. |
| 6 | Global Solves and Pressure Projection | mass_spring_pd | Advance a mass-spring step using projective dynamics local-global iterations. |
| Task | Public / hidden size | Hidden-input variation | Checks and tolerances |
|---|---|---|---|
| Local Grid and Lattice Computations | |||
| advect_rk1 | MAC velocity grid | seed; Fourier modes 16 20 (same RMS, same ) | rel. of ( ): |
| advect_rk2 | MAC velocity grid | seed; Fourier modes 16 20 (same RMS, same ) | rel. of ( ): |
| advect_rk3 | MAC velocity grid | seed; Fourier modes 16 20 (same RMS, same ) | rel. of ( ): |
| advect_rk4 | MAC velocity grid | seed; Fourier modes 16 20 (same RMS, same ) | rel. of ( ): |
| advect_mc | MAC velocity grid | seed; Fourier modes 16 20 (same RMS, same ) | rel. of ( ): |
| Solver | Total (ms) | Setup (ms) | Solve (ms) | Iterations |
|---|---|---|---|---|
| Reference (geometric multigrid PCG) | 19.1 | 0.3 | 18.0 | 10 |
| AMGX PCG + classical AMG | 171.8 | 101.1 | 65.8 | 17 |
| AMGX PCG + aggregation AMG | 323.5 | 64.8 | 253.6 | 28 |
| Task | Library (example) | Reference (ms) | Library (ms) |
|---|---|---|---|
| mpm_explicit | Taichi ( mpm3d.py ) | 9.08 | 63.12 |
| dem | Warp ( example_dem.py ) | 1.15 | 3.03 |
| fem_explicit | Taichi ( implicit_fem.py ) | 0.95 | 3.59 |