Repository navigation
n2tiled-improved-scaling-on-multithread - #252
graeme-a-stewart merged 11 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #252 +/- ##
==========================================
+ Coverage 81.91% 82.78% +0.86%
==========================================
Files 24 24
Lines 1521 1621 +100
==========================================
+ Hits 1246 1342 +96
- Misses 275 279 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
In case you were using different version of formatter https://github.com/JuliaHEP/JetReconstruction.jl/blob/main/docs/src/contributing.md#formatting |
|
I pushed to your branch to remove the unrelated formatting changes. Please pull to synchronize and avoid conflicts |
Thank a lot sir. |
graeme-a-stewart
left a comment
There was a problem hiding this comment.
@HarshitNagpal29 - excellent work in designing something we can work with here.
I feel we have some way to go towards an optimal implementation with as few code path divergences in the implementation as possible (can we create a temporary workspace if there isn't a real one, then everything looks the same internally).
It also becomes more and more important to merge #247, as this PR is being broken every time we do a significant update of the code (currently it is broken by the fallout of #242). Having parameterised types is a big deal.
We also have to think about the convenient today of jet_reconstruct(particles; algorithm=..., which allows the user not to have to bother about the details of which reconstruction algorithm and strategy will be chosen. But here we start to move back to very explicit alg/strategy specific workspaces.
If we stick with this interface, we need to give q lot more examples of how to use the with_n2tiled_reconstruction for the most common cases.
And adding a multi-threaded example script in examples is essential.
b51be3b to
5b598e1
Compare
graeme-a-stewart
left a comment
There was a problem hiding this comment.
Hello @HarshitNagpal29 - great, this is really converging. I think the code is good to go. I only have some comments about how we structure the documentation and a few of the docstrings.
Very minor documentation points. Revert inclusive_jets() documentation.
|
@HarshitNagpal29 - I tweaked a few last documentation points (no point in ping-ponging them between us again). Merging now - thanks so much for this! 👏 |
Summary
This PR adds an opt-in reusable workspace for full N2Tiled reconstruction, aimed at improving multithreaded event-processing scalability by reducing per-event allocations and garbage-collection pressure.
Changes
N2TiledWorkspacefor reusing jets, complete clustering history, tiling data, nearest-neighbour arrays, and inclusive-jet output.with_n2tiled_reconstruction.inclusive_jets!.jet_reconstructandtiled_jet_reconstructbehaviour.The workspace path still produces a complete
ClusterSequence; users can perform normal history, constituent, exclusive-jet, and inclusive-jet queries inside the callback.Compatibility
This is an additive API change. Existing users continue receiving independently owned results. High-throughput applications can opt into reusable storage and copy only the values that must be retained.
Validation