Skip to content

Graph renaming for HLT2 TCK

Pawel Kopciewicz requested to merge hlt2tck into master

Assigns meaningful names to the algorithms in the HLT2 control flow.

This MR is a standalone part of a bigger development (TCKs for HLT2) that will come next and addresses the issue of not meaningful names in the control flow and the instability of the algorithm names.

The hash is removed, and the algorithms are provided with the longest common prefix of these line names, where they are referenced. This improvement removes the instability due to hash variation when the properties of the algorithm have changed. To ensure a bijection, cases of many-to-one correspondence are resolved by appending a numeric suffix.

The procedure is done in two steps:

  1. Find new names and map them in dictionary old: new with O(A = algorithms)
  2. Propagate new names into dataflow configuration with O(E = elements).

The recursive function walks the graph and renames the strings inside. New names cannot be assigned during instantiation because there is no information yet which lines the algorithm will belong to.

To optimize the algorithmic complexity a few helper objects are defined to allow O(1) lookups and avoid O(A*E), which would make the procedure explode in time for large graphs like hlt2_pp_2024.

An estimate of execution time with a single swdev core illustrates linearity:

  • For hlt2_pp_ref_2024: (A = 4070, E = 4242): O(A) = 0.04s, O(E) = 0.38s
  • For hlt2_pp_2024: (A = 31107, E = 31533): O(A) = 0.27s, O(E) = 4.01s

Requires LHCb!4946

Edited by Pawel Kopciewicz

Merge request reports

Loading