-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rotate FK-tables instead of EKOs #183
Comments
Yes, I definitely agree about this, and we already discussed many times in the past with @felixhekhorn. The only limitation in this respect was never PineAPPL itself, but just person power. In principle, we didn't even need to be able to rotate grids in order to implement this optimization: it would have been sufficient for EKO to expose the rotation, and for PineAPPL to consume during evolution, i.e. at the end of the evolution. In this case, our graph has three nodes, and it was pretty simple to optimize the contraction by hand. The only limitation was the availability of all ingredients in the same place. |
The rotation is already implemented in PineAPPL (thanks to @scarlehoff insisting on having this feature). In the CLI you can ask for: pineappl write --rotate-pid-basis=EVOL <INPUT> <OUTPUT> We just need to add a Python wrapper for |
Having it both in PineAPPL and EKO is a duplicated feature, since the two of them are working often together. Especially for the purpose for which the rotation is usually involved. In principle, we could always deduplicate it by exposing the rotation matrix from PineAPPL as an Most likely, the clean approach would be to split these rotations as a separate crate, even within the EKO repo, as soon as EKO will be rustified-enough. Since there is no need for frequent changes on that side, it would become rapidly very stable, and a good dependency for PineAPPL. |
Strictly speaking yes, but the rotation in PineAPPL does something very simple: it only rewrites the channel definition of the interpolation grid and doesn't even perform an evolution. This operation is extremely fast, and takes just a fraction of a second. |
Yes, because you're essentially postponing once more the contraction: it will be applied when you're going to convolve the PDF. However, the duplication is not in the application, that is PineAPPL-specific, but just in the matrix elements. The same could be used in both packages. And dropping the zero elements you would obtain the same improvement for many different basis (e.g. not only the QCD evolution basis, but even the unified basis used in QEDxQCD evolution). |
Just to say that I agree on the idea of having the 14x14 matrix only once, but both programs need the feature since they are having very different scopes. EKO is a (very) active player in flavor space so it knows more and may hold all necessary information. In fact our beloved
more over: rotating the PDF has only to be done once, because then PineAPPL closes all open indices (something that is beyond EKO) |
Just one caveat: lines are blurring (as always) when you consider very huge replica sets. In those cases, it is not any longer clear that is more convenient to prefer rotating the PDF over the grid, since it depends on the relative sizes. But, for sure, it is always convenient to rotate the evolved object, being it the PDF set or the grid. And not the EKO itself. |
I don't think I understand this point; whether I evolve with a rotated EKO or evolve and then rotate the FK-tables, the FK-table is in both cases exactly the same (up numerical inaccuracies and the ordering of the channels). They must be the same, because in the past we decided that FK-tables only allow trivial particle combinations, for instance |
I'm just referring to performances. No doubt the observable will be the same (up to double precision). Since the operation is associative, you can contract in your favorite order. But which is the best one depends on the size of the various dimensions.
The FK table is not necessarily the exact same: if you store the final rotation in the channels definition, instead of burning in the subgrids. |
I left out an important detail: after rotating the channel definition the grid is no longer an FK-table as explained in my previous comment. But we can restore that property by calling 1) |
wait, this is a pure technical decision, because
that is the only thing we can discuss here - where and when it is numerically advantages to rotate; the physics has to stay the same |
Yes, but then you'd also have to change |
After looking into this for a bit, I think I agree with @cschwan's proposition, and indeed the changes would be quite minimal from The only thing I am not sure in the upcoming |
The reinterpolation is still required in any case, I believe! |
someone needs to match the EKO (process scale) x-grid to the PineAPPL (process scale) x-grid and pineko is the correct player to do so |
There's another big optimization potential to speed up the generation of FK-tables. Currently, I believe, pineko works the following way (correct me if I'm wrong):
ATLAS_1JET_8TEV_R06
, is 2.4 GB.ATLAS_1JET_8TEV_R06
this blows up the size of the EKO to 22 GB.But thanks to some developments on PineAPPL's side, we can now perform a rotation at the level of grids (and therefore also FK-tables). So I suggest that
The evolution in the flavour basis is much faster, it's roughly the quotient of the size of the EKOs. For
ATLAS_1JET_8TEV_R06
it's roughly twice as fast (45 GB / 22 GB
). With the added benefit that we need less disk space, of course.Practically speaking, the changes on pineko's side should be minimal. We probably have to delete the following lines:
pineko/src/pineko/evolve.py
Lines 282 to 286 in 9f8b03c
and instead add the rotation after the evolution:
pineko/src/pineko/evolve.py
Lines 313 to 320 in 9f8b03c
The text was updated successfully, but these errors were encountered: