Skip to content

Reduce memory consumption in b-tagging, by sharing NNs

Dan Guest requested to merge dguest/athena:bsvc into 24.0

This shouldn't change any outputs. It should just reduce memory consumption and startup time.

The GN2 transformer is getting kind of big: it pulls around 80 MB of memory per instance. Unfortunately we currently duplicate it a few times for various reasons: different jet collections with the same tagger, different "flip" configurations, etc. The idea is to introduce an optional service that lets us share the underlying NN where possible.

I also removed some very bad track decoration code which would break the EDM if anyone ever enabled it by accident.

Steps:

  • Add an option redefinition constructor for the GNN
  • Add a service that GNNTool can use to register the GNNs we've constructed so far
  • Add the service in FlavorTagNNConfig.py and use it in our standard NN Cfg functions
  • Remove super unsafe track decoration stuff from GNN (this should have been done much earlier)
  • See if it works

Tagging @svanstro who might be mucking around some of the same code, e.g. in !71095 (merged).

Edited by Dan Guest

Merge request reports