Files
foxhunt/crates
jgrusewski e4f838d4e3 perf: GPU-native HER random donors — eliminate last CPU touch in hot path
Added her_sample_random_donors kernel to her_episode_kernel.cu.
Uses the existing per-sample LCG RNG state (already allocated in
GpuHer constructor, already used by Future strategy).

The per-step training hot path now has:
- Zero memcpy_htod (was 1 for HER random donors)
- Zero memcpy_dtoh
- Zero Vec/alloc
- Zero .clone()
- Zero cuStreamSynchronize
- Zero format!/String

Every CPU→GPU and GPU→CPU transfer has been eliminated.
The only remaining sync is the 1-step-lagged async readback
event check in replay_adam_and_readback (non-blocking in practice).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 09:24:36 +02:00
..