-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
CMSSW Integration of LST #45117
base: master
Are you sure you want to change the base?
CMSSW Integration of LST #45117
Changes from all commits
0cf5c03
7bc53be
7c6bcfa
0edc116
ee1e94e
f1dee27
e9733d4
9f697fd
314e95d
4747b41
0829926
85682e8
f555485
944652f
f4bd702
3552ad3
14af981
dc13ac5
e64c2cc
4cd8924
e0acfa5
ef48f74
a3f65da
eb5de05
f46b6cb
149c628
236ad8c
a97714a
4d7e54a
c563eb0
d3e5999
f47212f
86503a2
a3a8054
7cfe3a5
ae67290
34c56c6
7187927
23ec786
1d9b396
9c87a88
9fd3355
64a7bf1
c4ac510
ccd29f4
d33ac32
fb12af0
1250a8c
1fb0489
d0e320a
ff12237
5d0ef1e
1a6e27b
e54c6f1
304929e
a22faeb
7fdcabd
fac2958
69debc2
375a06c
77e6b9a
07e0f40
d5e0b69
9268f49
e076050
96aa7c0
ce79bc1
2af0685
954a22a
3fc9904
ae851e0
5d5bd29
944e1b4
961d01e
24aa3a2
d378a59
67c2376
c3f41a7
a076afb
5b1e21c
d7689bb
ecd8e3e
0bcb06c
14b8bd9
4cd5974
77854d9
8f720ad
d3549cb
8557644
e8cc7a8
7343156
4ef678d
a7d73c0
c6a2468
80ffdc3
a0432cc
22192ec
43ce20e
c1767fa
7889093
4ff4aaf
8d2366b
d5e443a
787dfe1
5cce69a
9f6d612
fb5c0ea
1a5e2c4
79ea879
fe0d0ac
ff27cf3
9544a58
fcb5e32
3864e82
03da845
c4d12fc
9713499
1b6a0e1
bb8402d
b5a1383
24f587e
f245be0
1bff72d
0340221
3eb7a56
f0e560b
d2b9e89
46f7f22
2bc333b
5f9c2f6
d764312
f68981e
135e18b
83897c8
d5da756
a7e3ec3
acff43f
37fe122
77ff0e5
9e2a402
3858cf3
96be4f7
94df11b
18a1f6e
3e98eb4
a5822d0
8864fd1
af1f68f
155fc82
20f6f9c
52377d1
a296da7
efef777
f430d1b
69804f0
8338254
8fba6cb
129a2d4
66612e8
3b4fa9e
36a8c43
d3156d1
fc3fc6a
6b37c07
0e0b5e1
cb84b9c
6f1ea3f
1bbe663
fd99b50
9b8d26d
534ac1b
018204d
5e2bf7b
00013dd
ccc4bf4
043dfe0
891a97d
d08032a
48d01f3
f8e7884
cb1557e
04d02b4
4d603ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
# This modifier sets the iterative tracking to use a minimal set of iterations, first two | ||
trackingIters01 = cms.Modifier() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
# This modifier sets the LST (Phase-2 line segment tracking) used for track building | ||
trackingLST = cms.Modifier() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,8 @@ The offsets currently in use are: | |
* 0.7: trackingMkFit modifier | ||
* 0.701: DisplacedRegionalStep tracking iteration for Run-3 | ||
* 0.702: trackingMkFit modifier for Phase-2 (initialStep only) | ||
* 0.703: LST tracking, initialStep+HighPtTripletStep only, on CPU | ||
* 0.704: LST tracking, initialStep+HighPtTripletStep only, on GPU | ||
Comment on lines
+68
to
+69
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another thing: the description says "on GPU", but the implementation is "on NVIDIA GPU". Would you rather add a different workflow for AMD GPUs (and, maybe in the future, Intel GPUs) ? - '--accelerators' : 'gpu-nvidia'
+ '--accelerators' : 'gpu-*'
Comment on lines
+68
to
+69
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another thing: would it make sense to implement a "GPU vs CPU" workflow, similar to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good idea for a todo in some followup PR. Or did you mean it has to be now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's fine for me if this is added in a later PR. |
||
* 0.75: HLT phase-2 timing menu | ||
* 0.751: HLT phase-2 timing menu Alpaka variant | ||
* 0.752: HLT phase-2 timing menu ticl_v5 variant | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -482,6 +482,56 @@ def condition_(self, fragment, stepList, key, hasHarvest): | |
'--procModifiers': 'trackingMkFitCommon,trackingMkFitInitialStep' | ||
} | ||
|
||
# LST on CPU, initialStep+highPtTripletStep-only tracking-only | ||
class UpgradeWorkflow_lstOnCPUIters01TrackingOnly(UpgradeWorkflowTracking): | ||
def setup__(self, step, stepName, stepDict, k, properties): | ||
if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]]) | ||
elif 'HARVEST' in step: stepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM'}, stepDict[step][k]]) | ||
elif 'ALCA' in step: stepDict[stepName][k] = None | ||
def condition_(self, fragment, stepList, key, hasHarvest): | ||
return ('2026' in key) | ||
upgradeWFs['lstOnCPUIters01TrackingOnly'] = UpgradeWorkflow_lstOnCPUIters01TrackingOnly( | ||
steps = [ | ||
'RecoGlobal', | ||
'HARVESTGlobal', | ||
# Add ALCA steps explicitly, so that they can be properly removed | ||
'ALCA', | ||
'ALCAPhase2' | ||
], | ||
PU = [], | ||
suffix = '_lstOnCPUIters01TrackingOnly', | ||
offset = 0.703, | ||
) | ||
upgradeWFs['lstOnCPUIters01TrackingOnly'].step3 = upgradeWFs['trackingOnly'].step3 | { | ||
'--procModifiers': 'trackingIters01,trackingLST', | ||
'--accelerators' : 'cpu' | ||
} | ||
|
||
# LST on GPU, initialStep+highPtTripletStep-only tracking-only | ||
class UpgradeWorkflow_lstOnGPUIters01TrackingOnly(UpgradeWorkflowTracking): | ||
def setup__(self, step, stepName, stepDict, k, properties): | ||
if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]]) | ||
elif 'HARVEST' in step: stepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM'}, stepDict[step][k]]) | ||
elif 'ALCA' in step: stepDict[stepName][k] = None | ||
def condition_(self, fragment, stepList, key, hasHarvest): | ||
return ('2026' in key) | ||
upgradeWFs['lstOnGPUIters01TrackingOnly'] = UpgradeWorkflow_lstOnGPUIters01TrackingOnly( | ||
steps = [ | ||
'RecoGlobal', | ||
'HARVESTGlobal', | ||
# Add ALCA steps explicitly, so that they can be properly removed | ||
'ALCA', | ||
'ALCAPhase2' | ||
], | ||
PU = [], | ||
suffix = '_lstOnGPUIters01TrackingOnly', | ||
offset = 0.704, | ||
) | ||
upgradeWFs['lstOnGPUIters01TrackingOnly'].step3 = upgradeWFs['trackingOnly'].step3 | { | ||
'--procModifiers': 'trackingIters01,trackingLST', | ||
'--accelerators' : 'gpu-nvidia' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AFAICT, the other alpaka-based workflows do not explicitly request the presence of GPUs. If the decision is to keep the explicit workflow, could you address also the AMD GPU case ? |
||
} | ||
|
||
#DeepCore seeding for JetCore iteration workflow | ||
class UpgradeWorkflow_seedingDeepCore(UpgradeWorkflow): | ||
def setup_(self, step, stepName, stepDict, k, properties): | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<use name="DataFormats/Common"/> | ||
<use name="alpaka"/> | ||
<use name="DataFormats/TrackerRecHit2D"/> | ||
<use name="HeterogeneousCore/AlpakaInterface"/> | ||
<use name="RecoTracker/LSTCore"/> | ||
<flags ALPAKA_BACKENDS="1"/> | ||
<export> | ||
<lib name="1"/> | ||
</export> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#ifndef RecoTracker_LST_interface_LSTOutput_h | ||
#define RecoTracker_LST_interface_LSTOutput_h | ||
|
||
#include <memory> | ||
#include <vector> | ||
|
||
class LSTOutput { | ||
public: | ||
LSTOutput() = default; | ||
LSTOutput(std::vector<std::vector<unsigned int>> const hitIdx, | ||
std::vector<unsigned int> const len, | ||
std::vector<int> const seedIdx, | ||
std::vector<short> const trackCandidateType) | ||
: hitIdx_(std::move(hitIdx)), | ||
len_(std::move(len)), | ||
seedIdx_(std::move(seedIdx)), | ||
trackCandidateType_(std::move(trackCandidateType)) {} | ||
|
||
enum LSTTCType { T5 = 4, pT3 = 5, pT5 = 7, pLS = 8 }; | ||
|
||
// Hit indices of each of the LST track candidates. | ||
std::vector<std::vector<unsigned int>> const& hitIdx() const { return hitIdx_; } | ||
// Number of hits of each of the LST track candidates. | ||
std::vector<unsigned int> const& len() const { return len_; } | ||
// Index of the pixel track associated to each of the LST track candidates. | ||
// If not associated to a pixel track, which is the case for T5s, it defaults to -1. | ||
std::vector<int> const& seedIdx() const { return seedIdx_; } | ||
// LSTTCType as per the enum above. | ||
std::vector<short> const& trackCandidateType() const { return trackCandidateType_; } | ||
|
||
private: | ||
std::vector<std::vector<unsigned int>> hitIdx_; | ||
std::vector<unsigned int> len_; | ||
std::vector<int> seedIdx_; | ||
std::vector<short> trackCandidateType_; | ||
}; | ||
|
||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#ifndef RecoTracker_LST_interface_LSTPhase2OTHitsInput_h | ||
#define RecoTracker_LST_interface_LSTPhase2OTHitsInput_h | ||
|
||
#include <memory> | ||
#include <vector> | ||
|
||
#include "DataFormats/TrackerRecHit2D/interface/Phase2TrackerRecHit1D.h" | ||
|
||
class LSTPhase2OTHitsInput { | ||
public: | ||
LSTPhase2OTHitsInput() = default; | ||
LSTPhase2OTHitsInput(std::vector<unsigned int> const detId, | ||
std::vector<float> const x, | ||
std::vector<float> const y, | ||
std::vector<float> const z, | ||
std::vector<TrackingRecHit const*> const hits) | ||
: detId_(std::move(detId)), x_(std::move(x)), y_(std::move(y)), z_(std::move(z)), hits_(std::move(hits)) {} | ||
|
||
std::vector<unsigned int> const& detId() const { return detId_; } | ||
std::vector<float> const& x() const { return x_; } | ||
std::vector<float> const& y() const { return y_; } | ||
std::vector<float> const& z() const { return z_; } | ||
std::vector<TrackingRecHit const*> const& hits() const { return hits_; } | ||
|
||
private: | ||
std::vector<unsigned int> detId_; | ||
std::vector<float> x_; | ||
std::vector<float> y_; | ||
std::vector<float> z_; | ||
std::vector<TrackingRecHit const*> hits_; | ||
}; | ||
|
||
#endif |
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.
Some questions and comments about these workflows, as implemented in
Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py
.For the Run 3 alpaka-based workflows, we do not have a distinction of "cpu" vs "gpu" workflows: the same workflows (e.g.
xxx.402
) should work on CPU-only, on NVIDIA GPUs and on AMD GPUs.@cms-sw/reconstruction-l2 @cms-sw/pdmv-l2 @cms-sw/upgrade-l2 do you think it is useful to have different workflows for different backends ?
If yes, we should do the same for the Run 3 workflows.
If not, we shouldn't do it for the LST workflows, either.
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.
I think the gpu here is not forced. So, the workflows map fully to available workflow patterns: e.g. .501,502 for pixel quads or .511/512 for ECAL
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.
Currently:
.703
force running on CPU with--accelerators cpu
.704
force running on NVIDIA GPUs with--accelerators gpu-nvidia
(see below)
By the way, the CUDA-based workflows like
.5xx
are going to be removed soon (either by the last 14.1.x prerelease or early in the following release cycle), so they shouldn't be used as a recerence.