Skip to content

WireCell sim+SP graph: do not hold frames nobody uses (DNN ROI modes) - #988

Open
jzennamo wants to merge 1 commit into
developfrom
feature/jaz_wirecell_dnnroi_graph_memory
Open

jzennamo wants to merge 1 commit into
developfrom
feature/jaz_wirecell_dnnroi_graph_memory

Conversation

@jzennamo

Copy link
Copy Markdown
Contributor

Two changes to wcls-sim-drift-depoflux-nf-sp.jsonnet, both only in the DNN ROI modes: (1) with roi both, a ChannelSelector passes only the gauss and wiener traces to the traditional branch's fan-in, so the dense DNN ROI inputs of both anodes are no longer kept alive; (2) with roi dnn or both, the frame saver for the simulated digits is only added when save_simdigits is set.

Measured effect: detsim peak memory from 2.18 GB to 1.98 GB with the DNN ROI served remotely (5 events, 3 runs); same time, Wire products the same size.

Validation: Downstream output agrees with the release within detsim's own run-to-run variation.

Context: one item of a menu of time, memory, and disk savings for the Gen3 MC production. Each change is its own PR with one commit on develop, so they can be taken (or not) independently. Profiling and validation are in the slides "Gen3 MC Production: Where the Time and Disk Go" (Nov 2026). The validation is a fixed-seed comparison of the full gen-to-CAF chain against v10_26_00 (124 events, release run twice to measure its own run-to-run variation), plus each change applied alone on the release's own inputs and compared in the flat CAF (2895 branches).

🤖 Generated with Claude Code

Two changes to wcls-sim-drift-depoflux-nf-sp.jsonnet. (1) With roi 'both', a ChannelSelector passes only the gauss and wiener traces of each anode to the fan-in of the traditional branch; before, the fan-in and the frame saver kept the dense DNN ROI inputs (loose_lf, decon_charge, mp2/mp3 ROIs) of both anodes alive. (2) With roi 'dnn' or 'both', the wclsFrameSaver for the simulated digits is only put in the graph when save_simdigits is true; it converted and held the whole ADC frame (155 MB of floats plus a RawDigit copy) for the whole event although nothing was saved.

detsim with the DNN ROI served remotely: peak RSS 2.18 to 1.98 GB (5 events, 3 runs), same time, Wire products the same size.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant