-
Notifications
You must be signed in to change notification settings - Fork 488
Global (currently TPC only) refit on GPU using either GPU or TrackParCov track model #5116
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
Conversation
a984db4 to
d7965ad
Compare
shahor02
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Was your benchmark with mat.LUT attached? If I understand correctly, with GPU track model a pre-calculated material correction is applied, while with TrackParCov the material is queried per step.
|
@shahor02 : Good point. I actually tried to run the benchmark with the LUT in both cases, but after your question I double-checked and found a bug in the refit code which passed a nullptr in case of the GPU track model... :) I just reran with LUT in all cases:
|
d7965ad to
22cdc82
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still on mat.correction: on the CPU this will use by default MatCorrType matCorr = MatCorrType::USEMatCorrTGeo, i.e. slow TGeo query (although, in case of TPC volume it should be faster than average TGeo query).
To avoid this, I can change the default matCorr to USEMatCorrLUT, with fall-back to using TGeo in
AliceO2/Detectors/Base/src/Propagator.cxx
Line 516 in 4c65d47
| GPUd() MatBudget Propagator::getMatBudget(Propagator::MatCorrType corrType, const math_utils::Point3D<float>& p0, const math_utils::Point3D<float>& p1) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shahor02 : I am quite sure I was not using TGeo but the matLut, because my benchmark is not even aware of TGeo. I have added the forced switch here: https://github.com/AliceO2Group/AliceO2/blob/22cdc82f69322f0710d549944740667d0d3130dd/Detectors/Base/src/Propagator.cxx#L521
So for GPU and for my standalone tool it will always use the matLut.
Perhaps I should throw an exception if the setting points to TGeo, or do you think it is OK as is?
In general, I think it makes sense to use matLut by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, if for the benchmark you have used GPUCA_... also for CPU / TrackParCov case, then you have used matLUT.
I will change default to USEMatCorrLUT and add a fall-back to TGeo in getMatBudget (respecting your ifdef).
22cdc82 to
a6d3915
Compare
@shahor02 : For reference. The TrackParCov and propagator now work on the GPU (using sergeys polynomial version of the magnetic field, the MagFieldFast is not compatible). I did a quick benchmark, and it is ~2x slower than Sergey's model on the GPU. On the CPU Sergey's model is still ~30% faster.