Files
Jungfraujoch/image_analysis/structure_refinement
leonarski_f 4a8e13ddfa Refinement GPU engine: its waits on the stream asleep (blocking-sync event) rather than spinning
Bitwise. cudaStreamSynchronize spins a core for the whole wait; the weight trials' engines wait on a shared card
for most of a run, so about half of the user cycles of a refinement were the spin (PROFILE.md: 38-50%). A
StreamWaiter (CUDAMemHelpers.h: an event made with cudaEventBlockingSync, recorded and waited for) now takes the
refinement engine's waits - evaluation, Fcalc, Fmask, the uploads of positions, row model, blur and restraints.
The short waits of the host-driven loops stay spinning: the scale fit's Levenberg-Marquardt (one launch of
66-120 us per step) and the gather's pair count; making those block too cost 2-3% of wall (wake-up latency),
here the wall is unchanged. No process-wide cudaDeviceScheduleBlockingSync: that would change every GPU wait
of the broker.

CPU use (-N 8, time -v): 5reo 301-315% -> 190%, 5f6m 326% -> 181%, 9yl4 333% -> 222-228%, 7d98 307% -> 181%,
5f6m MD start 309-320% -> 151%. Wall, two interleaved runs each: 5reo 1.43-1.52 -> 1.43, 5f6m 2.19-2.20 ->
2.19-2.20, 9yl4 6.83-6.84 -> 6.88-6.89, 7d98 3.50-3.51 -> 3.58, 5f6m MD start 4.16-4.34 -> 4.16 s. Refined
CIF md5 unchanged on the 5 GPU cases; side by side = one at a time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015CeEGgpKdfkCTJb3YNMJcu
(cherry picked from commit d23d2cf7bb99b30617a3f57c531b03db8bc03e05)
2026-10-26 09:16:34 +01:00
..
2026-10-19 07:03:28 +02:00
2026-10-19 07:03:28 +02:00
2026-10-19 07:03:28 +02:00
2026-10-19 07:03:28 +02:00
2026-10-16 15:34:43 +02:00
2026-10-16 15:34:43 +02:00
2026-10-19 07:03:28 +02:00
2026-10-19 07:03:28 +02:00
2026-10-16 15:34:43 +02:00
2026-10-16 15:34:43 +02:00
2026-10-24 14:52:29 +02:00
2026-10-21 11:20:01 +02:00
2026-10-21 11:20:01 +02:00
2026-10-21 11:20:01 +02:00
2026-10-21 11:20:01 +02:00
2026-10-19 07:03:28 +02:00
2026-10-19 07:03:28 +02:00
2026-10-21 11:20:01 +02:00
2026-10-19 07:03:28 +02:00
2026-10-21 11:20:01 +02:00
2026-10-16 15:34:43 +02:00
2026-10-16 15:34:43 +02:00
2026-10-19 07:03:28 +02:00
2026-10-16 15:34:43 +02:00
2026-10-16 15:34:43 +02:00