Skip to content
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

Open
wants to merge 183 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
0cf5c03
Added RecoTracker/LSTCore package
ariostas May 31, 2024
7bc53be
Added RecoTracker/LST package
ariostas May 31, 2024
7c6bcfa
Add two-iteration,tracking-only LST workflows, both on CPU and GPU
VourMa Jun 3, 2024
0edc116
Update directory for LST data files
VourMa Jun 5, 2024
ee1e94e
Fixed standalone build
ariostas Jun 5, 2024
f1dee27
Truncate git logs to 100 commits
ariostas Jun 5, 2024
e9733d4
Remove outdated files
VourMa Jun 6, 2024
9f697fd
put lstModulesDevESProducer on a dummy visible task to bypass the mod…
slava77devel Jun 5, 2024
314e95d
code-format
slava77devel Jun 6, 2024
4747b41
Make compilation flags for duplicate cleaning and triplet pLSs into r…
VourMa Jun 7, 2024
0829926
Code checks and format
VourMa Jun 8, 2024
85682e8
Resolving PR comments LST folder
VourMa Jun 10, 2024
f555485
Merge pull request #37 from SegmentLinking/CMSSW_14_1_0_pre3_LST_X_LS…
slava77 Jun 10, 2024
944652f
Keep comment closer to the added task object
VourMa Jun 10, 2024
f4bd702
Fix typo in T3 code
VourMa Jun 12, 2024
3552ad3
Fixing CMS coding rule 1
VourMa Jun 13, 2024
14af981
Merge pull request #44 from SegmentLinking/CMSSW_14_1_0_pre3_LST_X_LS…
slava77 Jun 13, 2024
dc13ac5
Removed LST_IS_CMSSW_PACKAGE flag
ariostas Jun 14, 2024
e64c2cc
Merge pull request #38 from SegmentLinking/CMSSW_14_1_0_pre3_LST_X_LS…
slava77 Jun 15, 2024
4cd8924
code-format/checks
slava77devel Jun 15, 2024
e0acfa5
Addressed ESProducer comments
ariostas Jun 18, 2024
ef48f74
Removal of gpu modifier from LST workflows
VourMa Jun 24, 2024
a3f65da
Separated EndcapGeometry into host-only and buffers struct
ariostas Jun 24, 2024
eb5de05
Minor cleanup
ariostas Jun 24, 2024
f46b6cb
Removed -Wshadow flag
ariostas Jun 24, 2024
149c628
Resolve conflicts regarding workflows
VourMa Jun 28, 2024
236ad8c
Simplification of sqrt operations for pT3s
VourMa Jun 29, 2024
a97714a
Apply reco comments: Naming values and sqrt, loop, etc. simplifications
VourMa Jul 3, 2024
4d7e54a
Merge pull request #58 from SegmentLinking/remove_LST_IS_CMSSW_PACKAGE
slava77 Jul 5, 2024
c563eb0
Further work on naming values and sqrt, loop, etc. simplifications
VourMa Jul 8, 2024
d3e5999
Merge remote-tracking branch 'SegLink/CMSSW_14_1_0_pre3_LST_X_LSTCore…
ariostas Jul 8, 2024
f47212f
Renamed new endcap geometry class
ariostas Jul 8, 2024
86503a2
Fixed include guards for headers in interface directory
ariostas Jul 8, 2024
a3a8054
Even further work on naming values and sqrt, loop, etc. simplifications
VourMa Jul 9, 2024
7cfe3a5
Code format and checks
VourMa Jul 9, 2024
ae67290
Simplify LST workflows
VourMa Jul 9, 2024
34c56c6
Merge pull request #49 from SegmentLinking/ESProducer_fixes
slava77 Jul 9, 2024
7187927
Merge pull request #50 from SegmentLinking/CMSSW_14_1_0_pre3_LST_X_LS…
slava77 Jul 10, 2024
23ec786
Merge tag 'CMSSW_14_1_0_pre5' into CMSSW_14_1_0_pre3_LST_X_LSTCore_re…
ariostas Jul 16, 2024
1d9b396
Updated setup scripts to use CMSSW 14_1_0_pre5
ariostas Jul 16, 2024
9c87a88
Moved some things out into a common library
ariostas Jul 11, 2024
9fd3355
Use pre-defined alpaka types
ariostas Jul 15, 2024
64a7bf1
Moved more things out of the alpaka directory
ariostas Jul 17, 2024
c4ac510
Fixed standalone compilation
ariostas Jul 17, 2024
ccd29f4
Format and cleanup
ariostas Jul 17, 2024
d33ac32
A bit more cleanup
ariostas Jul 18, 2024
fb12af0
Format code
ariostas Jul 18, 2024
1250a8c
Merge pull request #65 from SegmentLinking/use_common_library
slava77 Jul 18, 2024
1fb0489
split ranges from modules
slava77devel Jul 19, 2024
d0e320a
remove inheritance of buffers on underlying SoAs
slava77devel Jul 19, 2024
ff12237
Merge pull request #67 from slava77/CMSSW_14_1_0_pre5/LSTb4-buf-base
ariostas Jul 19, 2024
5d0ef1e
Namespace renaming SDL->lst and inclusion of the T5DNN->t5dnn namespa…
VourMa Jul 19, 2024
1a6e27b
Fix for wrong loop range in pT3 kernel
VourMa Jul 20, 2024
e54c6f1
Apply comments namespace and type renaming
VourMa Jul 20, 2024
304929e
Fixes after rebase
VourMa Jul 21, 2024
a22faeb
Revert change in TrackListMerger
VourMa Jul 21, 2024
7fdcabd
Renaming of classes/structs/macros/constants
VourMa Jul 22, 2024
fac2958
Merge pull request #68 from SegmentLinking/renameClassesRemoveCopies
slava77 Jul 22, 2024
69debc2
use cms::alpakatools::once_per_block
slava77devel Jul 23, 2024
375a06c
Renaming of constants and removal of custom functions now implemented…
VourMa Jul 24, 2024
77e6b9a
Removal of vector copies, as per comments
VourMa Jul 24, 2024
07e0f40
geometry ::get single search
slava77devel Jul 24, 2024
d5e0b69
remove Vec3D createVec
slava77devel Jul 24, 2024
9268f49
More constness, removal of vector copies, and movement of general-pur…
VourMa Jul 26, 2024
e076050
Revert moving general purpose functions to common CMSSW file
VourMa Jul 27, 2024
96aa7c0
Revert constness on arguments passed by value
VourMa Jul 28, 2024
ce79bc1
First batch of fixing function arguments
VourMa Jul 29, 2024
2af0685
Second batch of fixing function arguments
VourMa Jul 29, 2024
954a22a
Third batch of fixing function arguments
VourMa Jul 30, 2024
3fc9904
Merge pull request #70 from slava77/CMSSW_14_1_0_pre5/LSTb4-buf-lite
VourMa Jul 30, 2024
ae851e0
Fourth batch of fixing function arguments
VourMa Jul 30, 2024
5d5bd29
Split PixelTriplets to PixelQuintuplets
VourMa Jul 30, 2024
944e1b4
Code checks and format
VourMa Jul 30, 2024
961d01e
Remove sdl from variable names
VourMa Jul 30, 2024
24aa3a2
Merge pull request #71 from SegmentLinking/renameClassesRemoveCopies
slava77 Jul 30, 2024
d378a59
Removal of sdl/SDL from all standalone code
VourMa Jul 30, 2024
67c2376
Simplification of variable naming
VourMa Jul 30, 2024
c3f41a7
Code checks and format
VourMa Jul 30, 2024
a076afb
Remove forgotten flag
VourMa Jul 31, 2024
5b1e21c
Fix workflow conflict
VourMa Jul 31, 2024
d7689bb
Merge pull request #73 from SegmentLinking/CMSSW_14_1_0_pre3_LST_X_LS…
slava77 Jul 31, 2024
ecd8e3e
Merge pull request #72 from SegmentLinking/removalOfSDL
slava77 Jul 31, 2024
0bcb06c
Removed alpaka functions from host ES code
ariostas Jul 31, 2024
14b8bd9
Minor cleanup
ariostas Aug 2, 2024
4cd5974
Merge pull request #66 from SegmentLinking/CMSSW_14_1_0_pre3_LST_X_LS…
slava77 Aug 2, 2024
77854d9
name=1 -> name=RecoTracker/LSTCore
slava77 Aug 2, 2024
8f720ad
Fixed memcpy
ariostas Aug 5, 2024
d3549cb
Merge pull request #76 from SegmentLinking/LSTESData_fixes
slava77 Aug 5, 2024
8557644
remove spurious semicolons at the end of method implementations
slava77devel Aug 2, 2024
e8cc7a8
cleanup unnecessary alpaka::wait
slava77devel Aug 2, 2024
7343156
cleanup unnecessary alpaka::wait; add comments justifying other alpak…
slava77devel Aug 8, 2024
4ef678d
switch to using alpaka::exec
slava77devel Aug 8, 2024
a7d73c0
replace alpaka::getPtrNative(buf) with buf.data()
slava77devel Aug 8, 2024
c6a2468
lst::createWorkDiv now depends on Acc to avoid ODR; allocBufWrapper c…
slava77devel Aug 8, 2024
80ffdc3
Changed syntax of atomic operations
ariostas Aug 12, 2024
a0432cc
Reduce number of moduleConnections_ lookups
ariostas Aug 12, 2024
22192ec
Add include for fp16 on HIP
ariostas Aug 12, 2024
43ce20e
explicitly require 1D single block kernels to use Acc1D and have one …
slava77devel Aug 12, 2024
c1767fa
Merge pull request #82 from SegmentLinking/more_review_fixes
slava77 Aug 14, 2024
7889093
add synchronizations in callers of the event methods where it matters…
slava77devel Aug 15, 2024
4ff4aaf
Merge pull request #77 from slava77/CMSSW_14_1_0_pre5/LSTb5-alpaka-ca…
ariostas Aug 16, 2024
8d2366b
Remove pass by const reference when std::move-ing
VourMa Aug 16, 2024
d5e443a
Remove user-defined destructors
VourMa Aug 16, 2024
787dfe1
Renaming of kernels
VourMa Aug 16, 2024
5cce69a
Code format and checks
VourMa Aug 16, 2024
9f6d612
Moved LST and Event classes to ALPAKA_ACCELERATOR_NAMESPACE
ariostas Aug 16, 2024
fb5c0ea
Merge pull request #83 from SegmentLinking/CMSSW_14_1_0_pre3_LST_X_LS…
slava77 Aug 16, 2024
1a5e2c4
Merge branch 'CMSSW_14_1_0_pre3_LST_X_LSTCore_realfiles_batch5' into …
ariostas Aug 17, 2024
79ea879
Moved all alpaka code to ALPAKA_ACCELERATOR_NAMESPACE
ariostas Aug 17, 2024
fe0d0ac
Merge pull request #84 from SegmentLinking/use_namespaces_instead_of_…
slava77 Aug 17, 2024
ff27cf3
Merge pull request #79 from SegmentLinking/CMSSW_14_1_0_pre3_LST_X_LS…
slava77 Aug 17, 2024
9544a58
Revise some includes
VourMa Aug 19, 2024
fcb5e32
Work on pixelType and removal of deprecated functions in standalone
VourMa Aug 20, 2024
3864e82
bugfixes to incomplete alpaka::wait cleanup: need to wait to get coun…
slava77devel Aug 21, 2024
03da845
Make a data member private
VourMa Aug 21, 2024
c4d12fc
Simplify consumes(), esConsumes(), produces() and code checks/format
VourMa Aug 21, 2024
9713499
Merge pull request #87 from slava77/CMSSW_14_1_0_pre5/LSTb6-alpaka-wa…
VourMa Aug 21, 2024
1b6a0e1
Apply review comments
VourMa Aug 22, 2024
bb8402d
Addressing review comments on PixelType
VourMa Aug 25, 2024
b5a1383
Harmonize pixelType determination in CMSSW with the standalone
VourMa Aug 25, 2024
24f587e
Invert DeltaPhi arguments in CMSSW to harmonize with standalone
VourMa Aug 28, 2024
f245be0
Merge pull request #85 from SegmentLinking/CMSSW_14_1_0_pre3_LST_X_LS…
slava77 Aug 28, 2024
1bff72d
Started moving to smart pointers
ariostas Aug 27, 2024
0340221
Cleaned up namespaces
ariostas Aug 30, 2024
3eb7a56
Addressed review comments
ariostas Aug 30, 2024
f0e560b
Renamed private data members
ariostas Aug 30, 2024
d2b9e89
Merge pull request #89 from SegmentLinking/more_review_fixes
slava77 Aug 30, 2024
46f7f22
Finished cleaning namespaces
ariostas Sep 3, 2024
2bc333b
Merge pull request #88 from SegmentLinking/CMSSW_14_1_0_pre3_LST_X_LS…
slava77 Sep 13, 2024
5f9c2f6
new style code-checks from cms-bot https://cmssdt.cern.ch/SDT/code-ch…
slava77devel Sep 13, 2024
d764312
Merge tag 'CMSSW_14_2_0_pre1' into CMSSW_14_1_0_pre3_LST_X_LSTCore_re…
ariostas Sep 16, 2024
f68981e
Updated setup script to CMSSW_14_2_0_pre1
ariostas Sep 16, 2024
135e18b
Merge tag 'CMSSW_14_2_0_pre1' into CMSSW_14_1_0_pre3_LST_X_LSTCore_re…
ariostas Sep 16, 2024
83897c8
Updated setup script to CMSSW_14_2_0_pre1
ariostas Sep 16, 2024
d5da756
Moved segments to SoA+PortableCollection
ariostas Sep 18, 2024
a7e3ec3
Fixed standalone compilation
ariostas Sep 18, 2024
acff43f
Switched to only using views
ariostas Sep 20, 2024
37fe122
Fixed indexing issues
ariostas Sep 23, 2024
77ff0e5
Fixed memset
ariostas Sep 23, 2024
9e2a402
Format code
ariostas Sep 23, 2024
3858cf3
Fixed cxxopts compilation
ariostas Sep 23, 2024
96be4f7
Initialize only required columns
ariostas Sep 25, 2024
94df11b
migrate TrackCandidate to SoA from DataFormats/SoATemplate: kernels i…
slava77devel Aug 29, 2024
18a1f6e
drop -Wshadow in standalone builds: DataFormats/SoATemplate and relat…
slava77devel Aug 29, 2024
3e98eb4
code checks
slava77devel Aug 29, 2024
a5822d0
add a check that device and host match for host=device
slava77devel Aug 29, 2024
8864fd1
sync DALPAKA flags in standalone builds with cmsdist scram-tools.file…
slava77devel Aug 29, 2024
af1f68f
code checks
slava77devel Aug 29, 2024
155fc82
switch to TrackCandidates = ::lst::TrackCandidatesSoA::View
slava77devel Aug 29, 2024
20f6f9c
Migrated MDs to SoA+PortableCollection
ariostas Sep 30, 2024
52377d1
Fixed makefile
ariostas Oct 1, 2024
a296da7
get rid of TrackCandidates* trackCandidatesD_ and simplify syntax
slava77devel Oct 1, 2024
efef777
Removed unnecessary CopyToHost
ariostas Oct 4, 2024
f430d1b
Formatted and removed unnecessary CopyToHost
ariostas Oct 4, 2024
69804f0
move TrackCandidatesDeviceCollection and related aliases to interface…
slava77devel Oct 4, 2024
8338254
Merge pull request #90 from slava77/CMSSW_14_1_0_pre5/LSTb6-SoA-TCs
ariostas Oct 8, 2024
8fba6cb
Merge branch 'CMSSW_14_1_0_pre3_LST_X_LSTCore_realfiles_batch7' into …
ariostas Oct 10, 2024
129a2d4
Adjusted naming convention
ariostas Oct 10, 2024
66612e8
Moved MD SoA definition to its own header
ariostas Oct 10, 2024
3b4fa9e
Made view sizes clearer
ariostas Oct 10, 2024
36a8c43
Moved MiniDoubletsDeviceCollection definition
ariostas Oct 14, 2024
d3156d1
Fixed formatting
ariostas Oct 16, 2024
fc3fc6a
Merge pull request #101 from SegmentLinking/mds_soa
slava77 Oct 16, 2024
6b37c07
Merge branch 'CMSSW_14_1_0_pre3_LST_X_LSTCore_realfiles_batch7' into …
ariostas Oct 16, 2024
0e0b5e1
Match conventions from previous PRs
ariostas Oct 16, 2024
cb84b9c
Merge pull request #93 from SegmentLinking/segments_soa
slava77 Oct 18, 2024
6f1ea3f
simplify a bit TC SoAs
slava77devel Oct 10, 2024
1bbe663
migrate triplets to SoATemplate
slava77devel Oct 22, 2024
fd99b50
Made view sizes clearer
ariostas Oct 22, 2024
9b8d26d
migrate quintuplets to SoATemplate
slava77devel Oct 22, 2024
534ac1b
migrate ranges to SoATemplate
ariostas Oct 24, 2024
018204d
migrate hits to SoATemplate
ariostas Oct 24, 2024
5e2bf7b
migrate EndcapGeometry to SoATemplate
ariostas Oct 24, 2024
00013dd
migrate pT3 and pT5 to SoATemplate
slava77devel Oct 24, 2024
ccc4bf4
Merge pull request #104 from slava77/CMSSW_14_2_0_pre1/LSTb7-SoA-TC-T5
ariostas Oct 25, 2024
043dfe0
migrate modules to SoATemplate
ariostas Oct 25, 2024
891a97d
Merge branch 'CMSSW_14_1_0_pre3_LST_X_LSTCore_realfiles_batch7' into …
ariostas Oct 25, 2024
d08032a
Consistency fixes
ariostas Oct 25, 2024
48d01f3
Review fixes
ariostas Oct 28, 2024
f8e7884
Merge pull request #106 from SegmentLinking/more_soa_migrations
slava77 Oct 28, 2024
cb1557e
Merge branch 'CMSSW_14_1_0_pre3_LST_X_LSTCore_realfiles_batch7' into …
slava77devel Oct 28, 2024
04d02b4
Merge pull request #109 from SegmentLinking/CMSSW_14_1_0_pre3_LST_X_L…
slava77 Oct 29, 2024
4d603ca
Merge tag 'CMSSW_14_2_0_pre3' into CMSSW_14_1_0_pre3_LST_X_LSTCore_re…
ariostas Oct 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Configuration/ProcessModifiers/python/trackingIters01_cff.py
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()
5 changes: 5 additions & 0 deletions Configuration/ProcessModifiers/python/trackingLST_cff.py
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()

2 changes: 2 additions & 0 deletions Configuration/PyReleaseValidation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Contributor

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.

Comment on lines +68 to +69
Copy link
Contributor

Choose a reason for hiding this comment

The 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) ?
Or change the implementation to be "on any GPU" ?
That is

-    '--accelerators' : 'gpu-nvidia'
+    '--accelerators' : 'gpu-*'

Comment on lines +68 to +69
Copy link
Contributor

Choose a reason for hiding this comment

The 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 xxx.403 ones for Run 3 ?

Copy link
Contributor

Choose a reason for hiding this comment

The 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?

Copy link
Contributor

Choose a reason for hiding this comment

The 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
Expand Down
3 changes: 3 additions & 0 deletions Configuration/PyReleaseValidation/python/relval_2026.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
numWFIB.extend([31234.0]) #2026D114
numWFIB.extend([32034.0]) #2026D115

# Temporary placement for LST workflow to workaround PR conflicts - to be formatted and placed in an upcoming PR
numWFIB.extend([24834.703,24834.704]) #2026D98 LST tracking (initialStep+HighPtTripletStep only): CPU, GPU

#Additional sample for short matrix and IB
#Default Phase-2 Det NoPU
numWFIB.extend([prefixDet+34.911]) #DD4hep XML
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Copy link
Contributor

Choose a reason for hiding this comment

The 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.
Can you discuss with @cms-sw/pdmv-l2 whether this (having a cpu-only .703 workflow and a gpu-only .704 workflow) is the best approach ?

If the decision is to keep the explicit workflow, could you address also the AMD GPU case ?
required Either create one more workflow (e.g. .705 with gpu-amd) or make this one more general by using gpu-*.

}

#DeepCore seeding for JetCore iteration workflow
class UpgradeWorkflow_seedingDeepCore(UpgradeWorkflow):
def setup_(self, step, stepName, stepDict, k, properties):
Expand Down
10 changes: 10 additions & 0 deletions RecoTracker/ConversionSeedGenerators/python/ConversionStep_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@
oldClusterRemovalInfo = 'detachedQuadStepClusters',
overrideTrkQuals = 'detachedQuadStepSelector:detachedQuadStepTrk'
))
from Configuration.ProcessModifiers.trackingIters01_cff import trackingIters01
trackingIters01.toModify(convClusters,
trajectories = "highPtTripletStepTracks",
oldClusterRemovalInfo = "highPtTripletStepClusters",
overrideTrkQuals = "highPtTripletStepSelector:highPtTripletStep"
)
from Configuration.ProcessModifiers.trackingLST_cff import trackingLST
(trackingIters01 & trackingPhase2PU140 & trackingLST).toModify(convClusters,
VourMa marked this conversation as resolved.
Show resolved Hide resolved
overrideTrkQuals = ""
)

_convLayerPairsStripOnlyLayers = ['TIB1+TID1_pos',
'TIB1+TID1_neg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
ttrhBuilderName = "WithAngleAndTemplate",
chi2EstimatorName = "duplicateTrackCandidatesChi2Est"
)
from Configuration.ProcessModifiers.trackingIters01_cff import trackingIters01
trackingIters01.toModify(duplicateTrackCandidates, source = "earlyGeneralTracks")

import RecoTracker.TrackProducer.TrackProducer_cfi
mergedDuplicateTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
Expand Down Expand Up @@ -44,6 +46,10 @@
candidateSource = "duplicateTrackCandidates:candidates",
candidateComponents = "duplicateTrackCandidates:candidateMap"
)
trackingIters01.toModify(generalTracks,
originalSource = "earlyGeneralTracks",
originalMVAVals = "earlyGeneralTracks:MVAValues"
)

generalTracksTask = cms.Task(
duplicateTrackCandidates,
Expand Down
20 changes: 20 additions & 0 deletions RecoTracker/FinalTrackSelectors/python/earlyGeneralTracks_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ def _extend_displacedGeneral(x):
makeReKeyedSeeds = cms.untracked.bool(False)
)
)
from Configuration.ProcessModifiers.trackingIters01_cff import trackingIters01
trackingIters01.toModify(earlyGeneralTracks,
TrackProducers = ['initialStepTracks', 'highPtTripletStepTracks'],
hasSelector = [1,1],
indivShareFrac = [1,0.16],
selectedTrackQuals = ['initialStepSelector:initialStep',
'highPtTripletStepSelector:highPtTripletStep'
],
setsToMerge = {0: dict(tLists = [0,1])}
)
from Configuration.ProcessModifiers.vectorHits_cff import vectorHits
def _extend_pixelLess(x):
x.TrackProducers += ['pixelLessStepTracks']
Expand All @@ -118,3 +128,13 @@ def _extend_pixelLess(x):
x.setsToMerge[0].tLists += [6]
(trackingPhase2PU140 & vectorHits).toModify(earlyGeneralTracks, _extend_pixelLess)

from Configuration.ProcessModifiers.trackingLST_cff import trackingLST
(trackingPhase2PU140 & trackingLST).toModify(earlyGeneralTracks,
TrackProducers = ['highPtTripletStepLSTpTracks', 'highPtTripletStepLSTT5Tracks'],
hasSelector = [1,0],
indivShareFrac = [0.1,0.1],
VourMa marked this conversation as resolved.
Show resolved Hide resolved
selectedTrackQuals = ['highPtTripletStepSelector:highPtTripletStep',
'highPtTripletStepSelectorLSTT5:highPtTripletStepLSTT5'
],
setsToMerge = {0: dict(tLists = [0,1])}
)
56 changes: 56 additions & 0 deletions RecoTracker/IterativeTracking/python/HighPtTripletStep_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@
phase2clustersToSkip = 'highPtTripletStepClusters'
)

from Configuration.ProcessModifiers.trackingLST_cff import trackingLST
from RecoTracker.LST.lstOutputConverter_cfi import lstOutputConverter as _lstOutputConverter
(trackingPhase2PU140 & trackingLST).toReplaceWith(highPtTripletStepTrackCandidates, _lstOutputConverter.clone())

#For FastSim phase1 tracking
import FastSimulation.Tracking.TrackCandidateProducer_cfi
_fastSim_highPtTripletStepTrackCandidates = FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone(
Expand All @@ -280,6 +284,25 @@
from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer
phase2_timing_layer.toModify(highPtTripletStepTracks, TrajectoryInEvent = True)

highPtTripletStepLSTpTracks = highPtTripletStepTracks.clone(
src = 'highPtTripletStepTrackCandidates:pTCsLST'
)
highPtTripletStepLSTT5Tracks = highPtTripletStepTracks.clone(
src = 'highPtTripletStepTrackCandidates:t5TCsLST'
)
_highPtTripletStepTracks_LST = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
TrackProducers = ['highPtTripletStepLSTpTracks',
'highPtTripletStepLSTT5Tracks'],
hasSelector = [1,0],
indivShareFrac = [0.1,0.1],
selectedTrackQuals = ['highPtTripletStepSelector:highPtTripletStep',
'highPtTripletStepSelectorLSTT5:highPtTripletStepLSTT5'],
copyExtras = True,
copyMVA = False,
setsToMerge = [cms.PSet( tLists=cms.vint32(0,1), pQual=cms.bool(True) )]
)
(trackingPhase2PU140 & trackingLST).toReplaceWith(highPtTripletStepTracks, _highPtTripletStepTracks_LST)

# Final selection
from RecoTracker.FinalTrackSelectors.TrackMVAClassifierPrompt_cfi import *
highPtTripletStep = TrackMVAClassifierPrompt.clone(
Expand Down Expand Up @@ -357,6 +380,28 @@
from Configuration.ProcessModifiers.vectorHits_cff import vectorHits
vectorHits.toModify(highPtTripletStepSelector.trackSelectors[2], minNumberLayers = 3, minNumber3DLayers = 3, d0_par1 = ( 0.5, 4.0 ), dz_par1 = ( 0.6, 4.0 ))

(trackingPhase2PU140 & trackingLST).toModify(highPtTripletStepSelector, src = 'highPtTripletStepLSTpTracks')
# Passthrough selector to satisfy the TrackListMerger requirement for selector values
highPtTripletStepSelectorLSTT5 = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
src = 'highPtTripletStepLSTT5Tracks',
trackSelectors = [
RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
name = 'highPtTripletStepLSTT5Loose',
minHitsToBypassChecks = 0
), #end of pset
RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
name = 'highPtTripletStepLSTT5Tight',
preFilterName = 'highPtTripletStepLSTT5Loose',
minHitsToBypassChecks = 0
),
RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
name = 'highPtTripletStepLSTT5',
preFilterName = 'highPtTripletStepLSTT5Tight',
minHitsToBypassChecks = 0
),
] #end of vpset
) #end of clone

# Final sequence
HighPtTripletStepTask = cms.Task(highPtTripletStepClusters,
highPtTripletStepSeedLayers,
Expand All @@ -378,6 +423,17 @@
_HighPtTripletStep_Phase2PU140 = cms.Sequence(_HighPtTripletStepTask_Phase2PU140)
trackingPhase2PU140.toReplaceWith(HighPtTripletStepTask, _HighPtTripletStepTask_Phase2PU140)

_HighPtTripletStepTask_LST = HighPtTripletStepTask.copy()
from RecoLocalTracker.Phase2TrackerRecHits.Phase2TrackerRecHits_cfi import siPhase2RecHits
from RecoTracker.LST.lstSeedTracks_cff import lstInitialStepSeedTracks,lstHighPtTripletStepSeedTracks
from RecoTracker.LST.lstPixelSeedInputProducer_cfi import lstPixelSeedInputProducer
from RecoTracker.LST.lstPhase2OTHitsInputProducer_cfi import lstPhase2OTHitsInputProducer
from RecoTracker.LST.lstProducer_cff import *

_HighPtTripletStepTask_LST.add(siPhase2RecHits, lstInitialStepSeedTracks, lstHighPtTripletStepSeedTracks, lstPixelSeedInputProducer, lstPhase2OTHitsInputProducer,
lstProducer, lstModulesDevESProducer, highPtTripletStepLSTpTracks, highPtTripletStepLSTT5Tracks, highPtTripletStepSelectorLSTT5)
(trackingPhase2PU140 & trackingLST).toReplaceWith(HighPtTripletStepTask, _HighPtTripletStepTask_LST)

# fast tracking mask producer
from FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi import maskProducerFromClusterRemover
highPtTripletStepMasks = maskProducerFromClusterRemover(highPtTripletStepClusters)
Expand Down
3 changes: 3 additions & 0 deletions RecoTracker/IterativeTracking/python/LowPtQuadStep_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
for _eraName, _postfix, _era in _cfg.nonDefaultEras():
_era.toReplaceWith(lowPtQuadStepClusters, _cfg.clusterRemoverForIter('LowPtQuadStep', _eraName, _postfix))

from Configuration.ProcessModifiers.trackingLST_cff import trackingLST
# with LST, this is the first iteration with proper cluster masking
trackingLST.toModify(lowPtQuadStepClusters, oldClusterRemovalInfo = "")

# SEEDING LAYERS
import RecoTracker.TkSeedingLayers.PixelLayerQuadruplets_cfi
Expand Down
17 changes: 12 additions & 5 deletions RecoTracker/IterativeTracking/python/iterativeTkConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,20 @@

_iterations_trackingPhase1.append('JetCoreRegionalStep')

_iterations_trackingPhase2PU140 = [
_iterations_trackingPhase2PU140_VS = cms.PSet(names = cms.vstring(
"InitialStep",
"HighPtTripletStep",
"LowPtQuadStep",
"LowPtTripletStep",
"DetachedQuadStep",
"PixelPairStep",
]
))
from Configuration.ProcessModifiers.vectorHits_cff import vectorHits
vectorHits.toModify(_iterations_trackingPhase2PU140, func=lambda x: x.append('PixelLessStep'))
vectorHits.toModify(_iterations_trackingPhase2PU140_VS.names, func=lambda x: x.append('PixelLessStep'))
from Configuration.ProcessModifiers.trackingIters01_cff import trackingIters01
trackingIters01.toModify(_iterations_trackingPhase2PU140_VS, names = ["InitialStep", "HighPtTripletStep"])
# apply all procModifiers before this
_iterations_trackingPhase2PU140 = _iterations_trackingPhase2PU140_VS.names.value()

from Configuration.ProcessModifiers.jetCoreInPhase2_cff import jetCoreInPhase2
jetCoreInPhase2.toModify(_iterations_trackingPhase2PU140, func=lambda x: x.append('JetCoreRegionalStep'))
Expand All @@ -76,10 +80,13 @@
"MuonSeededStepOutIn",
]
#Phase2
_iterations_muonSeeded_trackingPhase2PU140 = [
_iterations_muonSeeded_trackingPhase2PU140_VS = cms.PSet(names = cms.vstring(
"MuonSeededStepInOut",
"MuonSeededStepOutIn",
]
))
trackingIters01.toModify(_iterations_muonSeeded_trackingPhase2PU140_VS, names = [])
_iterations_muonSeeded_trackingPhase2PU140 = _iterations_muonSeeded_trackingPhase2PU140_VS.names.value()

_multipleSeedProducers = {
"MixedTripletStep": ["A", "B"],
"TobTecStep": ["Pair", "Tripl"],
Expand Down
9 changes: 9 additions & 0 deletions RecoTracker/LST/BuildFile.xml
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>
38 changes: 38 additions & 0 deletions RecoTracker/LST/interface/LSTOutput.h
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
33 changes: 33 additions & 0 deletions RecoTracker/LST/interface/LSTPhase2OTHitsInput.h
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
Loading