What problem does it solve?
Differentiable simulations and training loops built on NVIDIA Warp often fail silently: the forward pass looks healthy while wp.Tape gradients are zero, NaN, doubled, or subtly wrong due to taping-pattern bugs like buffer reuse, missing requires_grad, or faulty custom adjoints. This Skill provides an evidence-driven workflow to verify gradients against finite differences, localize the root cause, and apply a minimal verified fix.
Core Features & Use Cases
- Finite-difference verification: Establishes ground truth with wp.autograd.gradcheck and the overwrite tracker (wp.config.verify_autograd_array_access) before hypothesizing causes.
- Failure-signature diagnosis: Matches observed gradient symptoms (zero, NaN/inf, exact-factor errors, scale-dependent corruption) to a ranked hypothesis table and a known-bug-pattern checklist.
- Custom gradient guidance: Covers @wp.func_grad, @wp.func_replay, and @wp.func_native usage, misuse patterns, and straight-through estimators for piecewise-constant ops.
- Use Case: A user's cloth simulation training loss creeps back up despite learning-rate tuning; the Skill shrinks the repro, detects a write-after-read overwrite from ping-pong state buffers, fixes the dataflow with distinct per-step buffers, and re-verifies with the same FD harness.
Quick Start
Ask your agent to debug why training through your Warp kernels diverges or produces wrong gradients, pointing it at your reproduction script.