A Levenberg-Marquardt step is a few short launches the host then reads the sums of, a hundred or so steps per
fit, and the process has every synchronisation sleep until the device raises the wake-up
(set_gpu_blocking_sync): for these launches the wake-up costs more than the work. The fit's waits poll the
stream instead. Outputs are byte-identical; the refinement's scale refit counter drops 20-27% and the
molecular replacement's scale fits gain a little on the demo-sized sets.
Summing the block partials on the host instead of in a kernel was tried alongside and dropped: the coarse
solvent grid of 88 fits made it a megabyte of read-back per step, slower than the kernel.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015CeEGgpKdfkCTJb3YNMJcu