Scaling improves - #179
Merged
Merged
Conversation
…ered over a huge address range (3.4 GB span for 40 MB of real data at n=1M). cl.cells itself was visited via cell_indices_real in particle-arrival order (effectively random for the serial build path), not spatial order — this turned out to be the bigger contributor. Fix: a single _compact_particles! post-processing pass, run once at the end of every cell-list build (regardless of which of the four build paths produced it), that: copies each cell's particles into one flat, contiguous cl.particles buffer, and reorders cl.cells itself into linear cell-index (spatial) order, remapping cell_indices/cell_indices_real to match.
…th a stride equal to the batch count — actively fights the earlier cache-locality fix as batch count grows) to Consecutive() (keeps each chunk spatially contiguous, matching the cell ordering from _compact_particles!). Replaced the static "one fixed chunk per thread" scheme with a work-queue: cells are split into 16 × nbatches small chunks, and a fixed pool of nbatches worker tasks pulls chunks on demand from a shared atomic counter. Faster cores (P-cores) naturally claim more chunks; slower cores (E-cores) do fewer — this is the "distribute to free processors on demand" behavior you asked about. Memory stays exactly what it was: output_threaded is still sized to nbatches (not to chunk count), so there's no regression for large vector-valued outputs like the ones you flagged as a concern.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #179 +/- ##
==========================================
- Coverage 98.87% 98.65% -0.23%
==========================================
Files 21 21
Lines 1515 1631 +116
==========================================
+ Hits 1498 1609 +111
- Misses 17 22 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.