Asynchronous fanin/fanout. #594
Replies: 2 comments
|
Here is perhaps a more applicable example: We will have several "sources" of initial kinematics. These might be from file or from upstream Phlex subgraphs:
We want to merge these into a single stream of kinematics in time order for input to Geant4. (Note, we can argue that we should instead run Geant4 separately on each source but that simply moves the problem up to how to handle different sources of depos). That "merge node" can not be a simple "join" type node taking a 4-tuple because each source has very different mean interaction times and those times are randomly distributed according to a distribution. The merge algorithm MUST (I believe) be able to selectively decide when to accept fresh input from any given port based on what input it already has from all ports so that it can minimally buffer until it is safe to perform a partial merge. To reduce buffer bloat, best if the merge node also may perform "eager output" of any time period for which all input ports have "spoken". I think of two alternatives, both with downsides.
|
|
A maybe need it example: If we do not require empty place holder records then we can expect async merging pattern to apply when we bring together per-APA/CRU streams across their full detector module. The async merge is needed due to each stream being sparse without the placeholders. |
Uh oh!
There was an error while loading. Please reload this page.
I believe Phlex lacks a DFP graph pattern is included in WCT. This may be okay for Phlex but it is critical in WCT to supply the so called "sparse processing" mode, aka "asynchronous fanin/fanout" aka "hydra" (the WCT node category that implements it). Likely this particular use case need not ever "leak" out of the WCT DFP graph and into the Phlex graph but I'll describe it in case the general pattern would be needed in some Phlex context.
The basic idea is to NOT require all input to be populated prior to executing the node and/or allowing only a subset of output ports to be populated.
Specifically for WCT, we narrow this allowance to exactly one input port or exactly one output port being populated.
This is used to implement "sparse processing" mode in the following way:
Where this pipeline would be drawn for each, say, APA in a graph that spans the entire DUNE FDHD. Not drawn is an upstream (normal) fanout that sends depos into each pipeline.
Here, each time a "fanout" is called it evaluates its input depos in the context of its configured APA and decides if they are "interesting" or not. If interesting the depos are output to port 0 going to "simsp" else port 1 going to "dummy".
The "simsp" is the relatively expensive full simulation + signal processing, and the "dummy" is trivial and fast and simply outputs an empty frame matching the data type output by "simsp" but with close to zero content (and specifically no signal waveforms).
The final fanin gets input on port 0 or port 1 but not both and simply outputs what it gets to downstream consumers.
I tried to figure out if/how Phlex supports this by pointing an LLM at phlex code and the design doc and it concludes that the input side (fanin) is not supported but the output can be. To save the tokens, I'll paste that LLM verbiage but I do not claim to fully understand it.
All reactions