From 5aa622375e6e49c8feb0cab21b099737674b591e Mon Sep 17 00:00:00 2001 From: Slava Krutelyov Date: Fri, 20 Oct 2023 01:48:53 -0700 Subject: [PATCH 01/11] skeleton implementation for SDL::modulesBuffer ES product and producer in the device space with Alpaka --- RecoTracker/LST/BuildFile.xml | 6 ++- RecoTracker/LST/interface/LSTModulesDev.h | 19 ++++++++ RecoTracker/LST/plugins/BuildFile.xml | 5 ++ .../plugins/alpaka/LSTModulesDevESProducer.cc | 47 +++++++++++++++++++ RecoTracker/LST/src/ES_ModulesDev.cc | 3 ++ RecoTracker/LST/src/alpaka/ES_ModulesDev.cc | 3 ++ 6 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 RecoTracker/LST/interface/LSTModulesDev.h create mode 100644 RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc create mode 100644 RecoTracker/LST/src/ES_ModulesDev.cc create mode 100644 RecoTracker/LST/src/alpaka/ES_ModulesDev.cc diff --git a/RecoTracker/LST/BuildFile.xml b/RecoTracker/LST/BuildFile.xml index be3ea4bb8a366..e66f83a6e31ab 100644 --- a/RecoTracker/LST/BuildFile.xml +++ b/RecoTracker/LST/BuildFile.xml @@ -1,5 +1,9 @@ + + + + - + diff --git a/RecoTracker/LST/interface/LSTModulesDev.h b/RecoTracker/LST/interface/LSTModulesDev.h new file mode 100644 index 0000000000000..9ca104a6d2e79 --- /dev/null +++ b/RecoTracker/LST/interface/LSTModulesDev.h @@ -0,0 +1,19 @@ +#ifndef RecoTracker_LST_LSTModulesDev_h +#define RecoTracker_LST_LSTModulesDev_h + +#include "HeterogeneousCore/AlpakaInterface/interface/CopyToDevice.h" +#include "HeterogeneousCore/AlpakaInterface/interface/config.h" +#include "HeterogeneousCore/AlpakaInterface/interface/memory.h" + +#include + +namespace cms::alpakatools { + template <> + struct CopyToDevice> { + template + static auto copyAsync(TQueue& queue, SDL::modulesBuffer const& srcData) { + return SDL::modulesBuffer>(queue, srcData); + } + }; +} //namespace cms::alpakatools +#endif //RecoTracker_LST_LSTModulesDev_h diff --git a/RecoTracker/LST/plugins/BuildFile.xml b/RecoTracker/LST/plugins/BuildFile.xml index 3ed7d76eb7fba..d77f168159bc5 100644 --- a/RecoTracker/LST/plugins/BuildFile.xml +++ b/RecoTracker/LST/plugins/BuildFile.xml @@ -1,10 +1,12 @@ + + @@ -13,6 +15,7 @@ + @@ -31,6 +34,7 @@ + @@ -44,6 +48,7 @@ + diff --git a/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc b/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc new file mode 100644 index 0000000000000..bbc8c607823bd --- /dev/null +++ b/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc @@ -0,0 +1,47 @@ +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "HeterogeneousCore/AlpakaCore/interface/alpaka/ESProducer.h" +#include "HeterogeneousCore/AlpakaCore/interface/alpaka/ModuleFactory.h" +#include "HeterogeneousCore/AlpakaInterface/interface/config.h" +#include "HeterogeneousCore/AlpakaInterface/interface/memory.h" + +#include "RecoTracker/LST/interface/LSTModulesDev.h" +#include "RecoTracker/Record/interface/TrackerRecoGeometryRecord.h" + +// LST includes + +namespace ALPAKA_ACCELERATOR_NAMESPACE { + +class LSTModulesDevESProducer : public ESProducer { +public: + LSTModulesDevESProducer(const edm::ParameterSet &iConfig); + + static void fillDescriptions(edm::ConfigurationDescriptions &descriptions); + + std::optional> produce(const TrackerRecoGeometryRecord &iRecord); + +private: + const std::string txtFile_; +}; + +LSTModulesDevESProducer::LSTModulesDevESProducer(const edm::ParameterSet &iConfig) + : ESProducer(iConfig), txtFile_{iConfig.getParameter("txt").fullPath()} +{ + setWhatProduced(this, iConfig.getParameter("ComponentName")); +} + +void LSTModulesDevESProducer::fillDescriptions(edm::ConfigurationDescriptions &descriptions) { + edm::ParameterSetDescription desc; + desc.add("ComponentName", "")->setComment("Product label"); + desc.add("txt", edm::FileInPath()) + ->setComment("Path to the txt file for the module map parameters"); + descriptions.addWithDefaultLabel(desc); +} + + std::optional> LSTModulesDevESProducer::produce(const TrackerRecoGeometryRecord &iRecord) { + return SDL::modulesBuffer(cms::alpakatools::host()); +} + +} // namespace ALPAKA_ACCELERATOR_NAMESPACE + +DEFINE_FWK_EVENTSETUP_ALPAKA_MODULE(LSTModulesDevESProducer); diff --git a/RecoTracker/LST/src/ES_ModulesDev.cc b/RecoTracker/LST/src/ES_ModulesDev.cc new file mode 100644 index 0000000000000..bf3f47fcd84eb --- /dev/null +++ b/RecoTracker/LST/src/ES_ModulesDev.cc @@ -0,0 +1,3 @@ +#include "RecoTracker/LST/interface/LSTModulesDev.h" +#include "FWCore/Utilities/interface/typelookup.h" +TYPELOOKUP_DATA_REG(SDL::modulesBuffer); diff --git a/RecoTracker/LST/src/alpaka/ES_ModulesDev.cc b/RecoTracker/LST/src/alpaka/ES_ModulesDev.cc new file mode 100644 index 0000000000000..e3bfb3de8c909 --- /dev/null +++ b/RecoTracker/LST/src/alpaka/ES_ModulesDev.cc @@ -0,0 +1,3 @@ +#include "RecoTracker/LST/interface/LSTModulesDev.h" +#include "HeterogeneousCore/AlpakaCore/interface/alpaka/typelookup.h" +TYPELOOKUP_ALPAKA_TEMPLATED_DATA_REG(SDL::modulesBuffer); From efec09fde5f2c926ea0e2d0ddfbe917cd149729c Mon Sep 17 00:00:00 2001 From: Slava Krutelyov Date: Fri, 20 Oct 2023 01:50:36 -0700 Subject: [PATCH 02/11] an example hook to use SDL::modulesBuffer as ES product in the LSTProducer --- RecoTracker/LST/plugins/alpaka/LSTProducer.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/RecoTracker/LST/plugins/alpaka/LSTProducer.cc b/RecoTracker/LST/plugins/alpaka/LSTProducer.cc index 3705e780db0ee..5080ca6fb3b80 100644 --- a/RecoTracker/LST/plugins/alpaka/LSTProducer.cc +++ b/RecoTracker/LST/plugins/alpaka/LSTProducer.cc @@ -1,5 +1,6 @@ #include +#include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" @@ -16,6 +17,8 @@ #include "RecoTracker/LST/interface/LSTPhase2OTHitsInput.h" #include "RecoTracker/LST/interface/LSTPixelSeedInput.h" +#include "RecoTracker/Record/interface/TrackerRecoGeometryRecord.h" + #include "SDL/LST.h" namespace ALPAKA_ACCELERATOR_NAMESPACE { @@ -26,6 +29,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { : lstPixelSeedInputToken_{consumes(config.getParameter("pixelSeedInput"))}, lstPhase2OTHitsInputToken_{ consumes(config.getParameter("phase2OTHitsInput"))}, + modulesESToken_{esConsumes()}, verbose_(config.getParameter("verbose")), lstOutputToken_{produces()} {} @@ -35,6 +39,8 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { auto const& pixelSeeds = event.get(lstPixelSeedInputToken_); auto const& phase2OTHits = event.get(lstPhase2OTHitsInputToken_); + auto const& modulesData = setup.getData(modulesESToken_); + edm::LogWarning("MYDEBUG")<<*modulesData.nLowerModules<<" "<<*modulesData.nModules; lst_.eventSetup(); lst_.run(event.queue(), verbose_, @@ -79,6 +85,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { private: edm::EDGetTokenT lstPixelSeedInputToken_; edm::EDGetTokenT lstPhase2OTHitsInputToken_; + device::ESGetToken, TrackerRecoGeometryRecord> modulesESToken_; const int verbose_; edm::EDPutTokenT lstOutputToken_; From 7942f3306f4a0fc29e9df413439bad4c62976ba4 Mon Sep 17 00:00:00 2001 From: Slava Krutelyov Date: Tue, 14 Nov 2023 14:46:07 -0800 Subject: [PATCH 03/11] fill modules data in the buffer as an ES product --- .../LST/plugins/alpaka/LSTModulesDevESProducer.cc | 9 ++++++++- RecoTracker/LST/plugins/alpaka/LSTProducer.cc | 3 +-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc b/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc index bbc8c607823bd..3e393a74bfbea 100644 --- a/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc +++ b/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc @@ -9,6 +9,8 @@ #include "RecoTracker/Record/interface/TrackerRecoGeometryRecord.h" // LST includes +#include +#include namespace ALPAKA_ACCELERATOR_NAMESPACE { @@ -39,7 +41,12 @@ void LSTModulesDevESProducer::fillDescriptions(edm::ConfigurationDescriptions &d } std::optional> LSTModulesDevESProducer::produce(const TrackerRecoGeometryRecord &iRecord) { - return SDL::modulesBuffer(cms::alpakatools::host()); + // write directly to SDL : FIXME : SHOULD NOT HAPPEN HERE + SDL::modulesBuffer modules(cms::alpakatools::host()); + alpaka::QueueCpuBlocking queue(cms::alpakatools::host()); + SDL::LST::loadMaps(); + SDL::loadModulesFromFile(&modules, SDL::nModules, SDL::nLowerModules, *SDL::pixelMapping, queue, txtFile_.c_str()); + return modules; } } // namespace ALPAKA_ACCELERATOR_NAMESPACE diff --git a/RecoTracker/LST/plugins/alpaka/LSTProducer.cc b/RecoTracker/LST/plugins/alpaka/LSTProducer.cc index 5080ca6fb3b80..ff7c72f593c7b 100644 --- a/RecoTracker/LST/plugins/alpaka/LSTProducer.cc +++ b/RecoTracker/LST/plugins/alpaka/LSTProducer.cc @@ -40,8 +40,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { auto const& phase2OTHits = event.get(lstPhase2OTHitsInputToken_); auto const& modulesData = setup.getData(modulesESToken_); - edm::LogWarning("MYDEBUG")<<*modulesData.nLowerModules<<" "<<*modulesData.nModules; - lst_.eventSetup(); + SDL::modulesInGPU->setData(modulesData); lst_.run(event.queue(), verbose_, pixelSeeds.px(), From cbfc1aa6351dbecafb830ffd5bddcec0362dad53 Mon Sep 17 00:00:00 2001 From: Slava Krutelyov Date: Thu, 16 Nov 2023 19:41:05 -0800 Subject: [PATCH 04/11] fixup to dual lst setup: add lst_headers --- RecoTracker/LST/BuildFile.xml | 2 +- RecoTracker/LST/plugins/BuildFile.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RecoTracker/LST/BuildFile.xml b/RecoTracker/LST/BuildFile.xml index e66f83a6e31ab..5495e48778569 100644 --- a/RecoTracker/LST/BuildFile.xml +++ b/RecoTracker/LST/BuildFile.xml @@ -1,6 +1,6 @@ - + diff --git a/RecoTracker/LST/plugins/BuildFile.xml b/RecoTracker/LST/plugins/BuildFile.xml index d77f168159bc5..80cd06328e50f 100644 --- a/RecoTracker/LST/plugins/BuildFile.xml +++ b/RecoTracker/LST/plugins/BuildFile.xml @@ -1,6 +1,6 @@ - + From 7b50c1b7fc5e483b63916418e7be296c394086ca Mon Sep 17 00:00:00 2001 From: Slava Krutelyov Date: Thu, 28 Dec 2023 15:01:28 -0800 Subject: [PATCH 05/11] decouple SDL dependencies on CPU and GPU by moving more to /alpaka --- RecoTracker/LST/interface/LSTModulesDev.h | 19 ------------------- RecoTracker/LST/plugins/BuildFile.xml | 1 - .../plugins/alpaka/LSTModulesDevESProducer.cc | 13 +++++++++++-- RecoTracker/LST/src/ES_ModulesDev.cc | 3 --- RecoTracker/LST/src/alpaka/ES_ModulesDev.cc | 6 +++++- 5 files changed, 16 insertions(+), 26 deletions(-) delete mode 100644 RecoTracker/LST/interface/LSTModulesDev.h delete mode 100644 RecoTracker/LST/src/ES_ModulesDev.cc diff --git a/RecoTracker/LST/interface/LSTModulesDev.h b/RecoTracker/LST/interface/LSTModulesDev.h deleted file mode 100644 index 9ca104a6d2e79..0000000000000 --- a/RecoTracker/LST/interface/LSTModulesDev.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef RecoTracker_LST_LSTModulesDev_h -#define RecoTracker_LST_LSTModulesDev_h - -#include "HeterogeneousCore/AlpakaInterface/interface/CopyToDevice.h" -#include "HeterogeneousCore/AlpakaInterface/interface/config.h" -#include "HeterogeneousCore/AlpakaInterface/interface/memory.h" - -#include - -namespace cms::alpakatools { - template <> - struct CopyToDevice> { - template - static auto copyAsync(TQueue& queue, SDL::modulesBuffer const& srcData) { - return SDL::modulesBuffer>(queue, srcData); - } - }; -} //namespace cms::alpakatools -#endif //RecoTracker_LST_LSTModulesDev_h diff --git a/RecoTracker/LST/plugins/BuildFile.xml b/RecoTracker/LST/plugins/BuildFile.xml index 80cd06328e50f..da6bc17a3e5df 100644 --- a/RecoTracker/LST/plugins/BuildFile.xml +++ b/RecoTracker/LST/plugins/BuildFile.xml @@ -1,6 +1,5 @@ - diff --git a/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc b/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc index 3e393a74bfbea..f08edf2cc335b 100644 --- a/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc +++ b/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc @@ -5,15 +5,24 @@ #include "HeterogeneousCore/AlpakaInterface/interface/config.h" #include "HeterogeneousCore/AlpakaInterface/interface/memory.h" -#include "RecoTracker/LST/interface/LSTModulesDev.h" #include "RecoTracker/Record/interface/TrackerRecoGeometryRecord.h" // LST includes +#include #include #include +namespace cms::alpakatools { + template <> + struct CopyToDevice> { + template + static auto copyAsync(TQueue& queue, SDL::modulesBuffer const& srcData) { + return SDL::modulesBuffer>(queue, srcData); + } + }; +} //namespace cms::alpakatools namespace ALPAKA_ACCELERATOR_NAMESPACE { - + class LSTModulesDevESProducer : public ESProducer { public: LSTModulesDevESProducer(const edm::ParameterSet &iConfig); diff --git a/RecoTracker/LST/src/ES_ModulesDev.cc b/RecoTracker/LST/src/ES_ModulesDev.cc deleted file mode 100644 index bf3f47fcd84eb..0000000000000 --- a/RecoTracker/LST/src/ES_ModulesDev.cc +++ /dev/null @@ -1,3 +0,0 @@ -#include "RecoTracker/LST/interface/LSTModulesDev.h" -#include "FWCore/Utilities/interface/typelookup.h" -TYPELOOKUP_DATA_REG(SDL::modulesBuffer); diff --git a/RecoTracker/LST/src/alpaka/ES_ModulesDev.cc b/RecoTracker/LST/src/alpaka/ES_ModulesDev.cc index e3bfb3de8c909..be4eb17effb3e 100644 --- a/RecoTracker/LST/src/alpaka/ES_ModulesDev.cc +++ b/RecoTracker/LST/src/alpaka/ES_ModulesDev.cc @@ -1,3 +1,7 @@ -#include "RecoTracker/LST/interface/LSTModulesDev.h" +#include #include "HeterogeneousCore/AlpakaCore/interface/alpaka/typelookup.h" + +// Temporary hack: The DevHost instantiation is needed in both CPU and GPU plugins, +// whereas the (non-host-)Device instantiation only in the GPU plugin +TYPELOOKUP_DATA_REG(SDL::modulesBuffer); TYPELOOKUP_ALPAKA_TEMPLATED_DATA_REG(SDL::modulesBuffer); From dd468e39c24a42951dd0ec1ac553d898f0c2a17a Mon Sep 17 00:00:00 2001 From: Slava Krutelyov Date: Wed, 3 Jan 2024 15:07:17 -0800 Subject: [PATCH 06/11] set SDL::modulesBuffersES --- RecoTracker/LST/plugins/alpaka/LSTProducer.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/RecoTracker/LST/plugins/alpaka/LSTProducer.cc b/RecoTracker/LST/plugins/alpaka/LSTProducer.cc index ff7c72f593c7b..1ed4d11de975f 100644 --- a/RecoTracker/LST/plugins/alpaka/LSTProducer.cc +++ b/RecoTracker/LST/plugins/alpaka/LSTProducer.cc @@ -40,6 +40,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { auto const& phase2OTHits = event.get(lstPhase2OTHitsInputToken_); auto const& modulesData = setup.getData(modulesESToken_); + SDL::modulesBuffersES = &modulesData; SDL::modulesInGPU->setData(modulesData); lst_.run(event.queue(), verbose_, From f3bbe8412f784b6afe99d263dbb360343187cbae Mon Sep 17 00:00:00 2001 From: Slava Krutelyov Date: Fri, 19 Jan 2024 07:55:16 -0800 Subject: [PATCH 07/11] add lstProducer_cff to include era modifiers and also the related ES setup --- .../IterativeTracking/python/HighPtTripletStep_cff.py | 11 +++-------- RecoTracker/LST/python/lstProducer_cff.py | 9 +++++++++ RecoTracker/LST/test/LSTAlpakaTester.py | 3 +-- 3 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 RecoTracker/LST/python/lstProducer_cff.py diff --git a/RecoTracker/IterativeTracking/python/HighPtTripletStep_cff.py b/RecoTracker/IterativeTracking/python/HighPtTripletStep_cff.py index dd2050f33e099..e37c10dd2bc89 100644 --- a/RecoTracker/IterativeTracking/python/HighPtTripletStep_cff.py +++ b/RecoTracker/IterativeTracking/python/HighPtTripletStep_cff.py @@ -387,14 +387,9 @@ from RecoTracker.LST.lstSeedTracks_cfi import lstInitialStepSeedTracks,lstHighPtTripletStepSeedTracks from RecoTracker.LST.lstPixelSeedInputProducer_cfi import lstPixelSeedInputProducer from RecoTracker.LST.lstPhase2OTHitsInputProducer_cfi import lstPhase2OTHitsInputProducer -from RecoTracker.LST.lstProducer_cfi import lstProducer as _lstProducer -# Define lstProducer like this to be able to run the serial version explicitly -lstProducer = _lstProducer.clone( - alpaka = cms.untracked.PSet(backend = cms.untracked.string('serial_sync')) -) -from Configuration.ProcessModifiers.gpu_cff import gpu -gpu.toReplaceWith(lstProducer,_lstProducer.clone()) -_HighPtTripletStepTask_LST.add(siPhase2RecHits, lstInitialStepSeedTracks, lstHighPtTripletStepSeedTracks, lstPixelSeedInputProducer, lstPhase2OTHitsInputProducer, lstProducer) +from RecoTracker.LST.lstProducer_cff import * +_HighPtTripletStepTask_LST.add(siPhase2RecHits, lstInitialStepSeedTracks, lstHighPtTripletStepSeedTracks, lstPixelSeedInputProducer, lstPhase2OTHitsInputProducer, + lstProducer, lstModulesDevESProducer) (trackingPhase2PU140 & trackingLST).toReplaceWith(HighPtTripletStepTask, _HighPtTripletStepTask_LST) # fast tracking mask producer diff --git a/RecoTracker/LST/python/lstProducer_cff.py b/RecoTracker/LST/python/lstProducer_cff.py new file mode 100644 index 0000000000000..61280c6b3ad04 --- /dev/null +++ b/RecoTracker/LST/python/lstProducer_cff.py @@ -0,0 +1,9 @@ +import FWCore.ParameterSet.Config as cms + +from RecoTracker.LST.lstProducer_cfi import lstProducer + +from Configuration.ProcessModifiers.gpu_cff import gpu +(~gpu).toModify(lstProducer.alpaka, backend = 'serial_sync') + +from RecoTracker.LST.lstModulesDevESProducer_cfi import lstModulesDevESProducer +(~gpu).toModify(lstModulesDevESProducer.alpaka, backend = 'serial_sync') diff --git a/RecoTracker/LST/test/LSTAlpakaTester.py b/RecoTracker/LST/test/LSTAlpakaTester.py index 1893e0c62a26e..ae2b89aef0071 100644 --- a/RecoTracker/LST/test/LSTAlpakaTester.py +++ b/RecoTracker/LST/test/LSTAlpakaTester.py @@ -91,8 +91,7 @@ # Main LST Producer process.load('Configuration.StandardSequences.Accelerators_cff') process.load("HeterogeneousCore.AlpakaCore.ProcessAcceleratorAlpaka_cfi") -from RecoTracker.LST.lstProducer_cfi import lstProducer as _lstProducer -process.lstProducer = _lstProducer.clone() +process.load("RecoTracker.LST.lstProducer_cff") # Track Fitting import RecoTracker.TrackProducer.TrackProducer_cfi From 473d09e837d313dabf9b586adf41e33d0c00ae45 Mon Sep 17 00:00:00 2001 From: Slava Krutelyov Date: Fri, 19 Jan 2024 15:59:17 -0800 Subject: [PATCH 08/11] specify the centroid file in fillDescriptions --- RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc b/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc index f08edf2cc335b..b141b68161337 100644 --- a/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc +++ b/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc @@ -44,7 +44,7 @@ LSTModulesDevESProducer::LSTModulesDevESProducer(const edm::ParameterSet &iConfi void LSTModulesDevESProducer::fillDescriptions(edm::ConfigurationDescriptions &descriptions) { edm::ParameterSetDescription desc; desc.add("ComponentName", "")->setComment("Product label"); - desc.add("txt", edm::FileInPath()) + desc.add("txt", edm::FileInPath("RecoTracker/LST/data/centroid_CMSSW_12_2_0_pre2.txt")) ->setComment("Path to the txt file for the module map parameters"); descriptions.addWithDefaultLabel(desc); } From 55c3a806aaec7a41216d54e3da004b33dd28fbef Mon Sep 17 00:00:00 2001 From: Slava Krutelyov Date: Fri, 19 Jan 2024 16:02:17 -0800 Subject: [PATCH 09/11] drop outdated/invalid parameters --- RecoTracker/LST/test/LSTAlpakaTester.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/RecoTracker/LST/test/LSTAlpakaTester.py b/RecoTracker/LST/test/LSTAlpakaTester.py index ae2b89aef0071..44013a0690b5b 100644 --- a/RecoTracker/LST/test/LSTAlpakaTester.py +++ b/RecoTracker/LST/test/LSTAlpakaTester.py @@ -34,10 +34,8 @@ ) process.options = cms.untracked.PSet( - FailPath = cms.untracked.vstring(), IgnoreCompletely = cms.untracked.vstring(), Rethrow = cms.untracked.vstring(), - SkipEvent = cms.untracked.vstring(), accelerators = cms.untracked.vstring('*'), allowUnscheduled = cms.obsolete.untracked.bool, canDeleteEarly = cms.untracked.vstring(), From c4e0dacd76fc08ea662791951b91181bb56c49f2 Mon Sep 17 00:00:00 2001 From: Slava Krutelyov Date: Wed, 24 Jan 2024 18:22:43 -0800 Subject: [PATCH 10/11] update to new LST call interface to fill ES data --- .../LST/plugins/alpaka/LSTModulesDevESProducer.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc b/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc index b141b68161337..e53b44b02dfb9 100644 --- a/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc +++ b/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc @@ -31,12 +31,10 @@ class LSTModulesDevESProducer : public ESProducer { std::optional> produce(const TrackerRecoGeometryRecord &iRecord); -private: - const std::string txtFile_; }; LSTModulesDevESProducer::LSTModulesDevESProducer(const edm::ParameterSet &iConfig) - : ESProducer(iConfig), txtFile_{iConfig.getParameter("txt").fullPath()} + : ESProducer(iConfig) { setWhatProduced(this, iConfig.getParameter("ComponentName")); } @@ -44,8 +42,6 @@ LSTModulesDevESProducer::LSTModulesDevESProducer(const edm::ParameterSet &iConfi void LSTModulesDevESProducer::fillDescriptions(edm::ConfigurationDescriptions &descriptions) { edm::ParameterSetDescription desc; desc.add("ComponentName", "")->setComment("Product label"); - desc.add("txt", edm::FileInPath("RecoTracker/LST/data/centroid_CMSSW_12_2_0_pre2.txt")) - ->setComment("Path to the txt file for the module map parameters"); descriptions.addWithDefaultLabel(desc); } @@ -53,8 +49,7 @@ void LSTModulesDevESProducer::fillDescriptions(edm::ConfigurationDescriptions &d // write directly to SDL : FIXME : SHOULD NOT HAPPEN HERE SDL::modulesBuffer modules(cms::alpakatools::host()); alpaka::QueueCpuBlocking queue(cms::alpakatools::host()); - SDL::LST::loadMaps(); - SDL::loadModulesFromFile(&modules, SDL::nModules, SDL::nLowerModules, *SDL::pixelMapping, queue, txtFile_.c_str()); + SDL::LST::loadAndFillES(queue, &modules); return modules; } From ebb30018bf949c929691271bbccc187d46b29e60 Mon Sep 17 00:00:00 2001 From: Slava Krutelyov Date: Wed, 24 Jan 2024 18:25:31 -0800 Subject: [PATCH 11/11] comment cleanup --- RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc b/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc index e53b44b02dfb9..6913976072120 100644 --- a/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc +++ b/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc @@ -46,7 +46,6 @@ void LSTModulesDevESProducer::fillDescriptions(edm::ConfigurationDescriptions &d } std::optional> LSTModulesDevESProducer::produce(const TrackerRecoGeometryRecord &iRecord) { - // write directly to SDL : FIXME : SHOULD NOT HAPPEN HERE SDL::modulesBuffer modules(cms::alpakatools::host()); alpaka::QueueCpuBlocking queue(cms::alpakatools::host()); SDL::LST::loadAndFillES(queue, &modules);