host: use zero-allocation wide_each_scoped in sift_front and sift_refreshes #3332
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3332"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Maverick0351a on 2026-11-29T21:54:29Z.
Summary
sift_front(VICTORY_FRONT_SIFT=1, on by default) andsift_refreshes(VICTORY_FLUSH_SIFT=1) currently callwide_each(sift.len(), 32, ...)when!new_batch && sift.len() >= 128.wide_each_scoped,wide_eachwraps the closure in anArc<dyn Fn(usize) + Send + Sync>per dispatch, prevents borrowing stack slices directly (&self.resources,&ranges,&sift,&out) withoutSendPtrwrappers, and is bypassed entirely ifVICTORY_NEW_BATCH=1is set (which runsnothing_new_allsingle-threaded on the submitting thread and allocates aVec<u64>per span while lockingj.written).wide_each+SendPtrinsift_frontandsift_refresheswithwide_each_scoped(sift.len(), 32, ...)eliminates the per-flushArcheap allocation andSendPtrboilerplate while keeping lock-free parallelWRITTEN_EPOCHSsifting across the worker pool.Live Telemetry (RTX 5080 Laptop GPU 16 GB, GTA VI
v1.0.2.1)VICTORY_FRONT_SIFT=1andVICTORY_FLUSH_SIFT=1usingwide_each_scoped(..., 32, ...):refreshesdropped from22.9 ms/frame(35.4-37.9 ms/framewithVICTORY_NEW_BATCH=1) down to11.9-14.2 ms/frameacross 41-44 flushes of6,728-11,196spans (5,674-9,918sifted out asknown to copy nothing,1,048-1,271refreshed across worker threads).preparing per framedropped to35.6 ms/frame(24.8 ms in the lists' steps).Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Maverick0351a on 2026-11-30T21:32:05Z.
Superseded by 79b22c5 and #3762 (
d7f42429), which landed wide_each_scoped +othing_new_with in sift_spans on main.
Pull request closed