From 8ced0f1ba0b4c03a8da3074d029a3104b9836b15 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Wed, 29 May 2024 07:34:04 -0700 Subject: [PATCH] Adjusted LST to use LSTCore --- RecoTracker/LST/BuildFile.xml | 5 +++-- RecoTracker/LST/plugins/BuildFile.xml | 21 +++++------------- .../plugins/alpaka/LSTModulesDevESProducer.cc | 22 ++++++++++--------- RecoTracker/LST/plugins/alpaka/LSTProducer.cc | 2 +- RecoTracker/LST/src/alpaka/ES_ModulesDev.cc | 4 ++-- 5 files changed, 23 insertions(+), 31 deletions(-) diff --git a/RecoTracker/LST/BuildFile.xml b/RecoTracker/LST/BuildFile.xml index 5495e48778569..09ddabd9727ba 100644 --- a/RecoTracker/LST/BuildFile.xml +++ b/RecoTracker/LST/BuildFile.xml @@ -1,9 +1,10 @@ - - + + + diff --git a/RecoTracker/LST/plugins/BuildFile.xml b/RecoTracker/LST/plugins/BuildFile.xml index da6bc17a3e5df..1b6e79b68e8b4 100644 --- a/RecoTracker/LST/plugins/BuildFile.xml +++ b/RecoTracker/LST/plugins/BuildFile.xml @@ -12,6 +12,7 @@ + @@ -24,30 +25,18 @@ - + - + - + + - - - - - - - - - - - - - diff --git a/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc b/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc index bc1f764313569..e6b3c42b7ed10 100644 --- a/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc +++ b/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc @@ -8,41 +8,43 @@ #include "RecoTracker/Record/interface/TrackerRecoGeometryRecord.h" // LST includes -#include -#include -#include +#include "RecoTracker/LSTCore/interface/alpaka/Module.h" +#include "RecoTracker/LSTCore/interface/alpaka/LST.h" namespace ALPAKA_ACCELERATOR_NAMESPACE { class LSTModulesDevESProducer : public ESProducer { public: - LSTModulesDevESProducer(const edm::ParameterSet &iConfig); + LSTModulesDevESProducer(const edm::ParameterSet& iConfig); - static void fillDescriptions(edm::ConfigurationDescriptions &descriptions); + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); std::unique_ptr> produceHost(TrackerRecoGeometryRecord const& iRecord); - std::unique_ptr> produceDevice(device::Record const& iRecord); + std::unique_ptr> produceDevice( + device::Record const& iRecord); private: edm::ESGetToken, TrackerRecoGeometryRecord> lstESHostToken_; }; - LSTModulesDevESProducer::LSTModulesDevESProducer(const edm::ParameterSet &iConfig) : ESProducer(iConfig) { + LSTModulesDevESProducer::LSTModulesDevESProducer(const edm::ParameterSet& iConfig) : ESProducer(iConfig) { setWhatProduced(this, &LSTModulesDevESProducer::produceHost); auto cc = setWhatProduced(this, &LSTModulesDevESProducer::produceDevice); lstESHostToken_ = cc.consumes(); } - void LSTModulesDevESProducer::fillDescriptions(edm::ConfigurationDescriptions &descriptions) { + void LSTModulesDevESProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { edm::ParameterSetDescription desc; descriptions.addWithDefaultLabel(desc); } - std::unique_ptr> LSTModulesDevESProducer::produceHost(TrackerRecoGeometryRecord const& iRecord) { + std::unique_ptr> LSTModulesDevESProducer::produceHost( + TrackerRecoGeometryRecord const& iRecord) { return SDL::loadAndFillESHost(); } - std::unique_ptr> LSTModulesDevESProducer::produceDevice(device::Record const& iRecord) { + std::unique_ptr> LSTModulesDevESProducer::produceDevice( + device::Record const& iRecord) { auto const& lstESHostData = iRecord.get(lstESHostToken_); SDL::QueueAcc& queue = iRecord.queue(); return SDL::loadAndFillESDevice(queue, &lstESHostData); diff --git a/RecoTracker/LST/plugins/alpaka/LSTProducer.cc b/RecoTracker/LST/plugins/alpaka/LSTProducer.cc index 811a78cbb3431..4aca0528539ef 100644 --- a/RecoTracker/LST/plugins/alpaka/LSTProducer.cc +++ b/RecoTracker/LST/plugins/alpaka/LSTProducer.cc @@ -19,7 +19,7 @@ #include "RecoTracker/Record/interface/TrackerRecoGeometryRecord.h" -#include +#include "RecoTracker/LSTCore/interface/alpaka/LST.h" namespace ALPAKA_ACCELERATOR_NAMESPACE { diff --git a/RecoTracker/LST/src/alpaka/ES_ModulesDev.cc b/RecoTracker/LST/src/alpaka/ES_ModulesDev.cc index 981c3f45346b0..9c66dda420db0 100644 --- a/RecoTracker/LST/src/alpaka/ES_ModulesDev.cc +++ b/RecoTracker/LST/src/alpaka/ES_ModulesDev.cc @@ -1,4 +1,4 @@ -#include +#include "RecoTracker/LSTCore/interface/alpaka/LST.h" #include "HeterogeneousCore/AlpakaCore/interface/alpaka/typelookup.h" // Temporary hack: The DevHost instantiation is needed in both CPU and GPU plugins, @@ -7,4 +7,4 @@ TYPELOOKUP_DATA_REG(SDL::LSTESHostData); TYPELOOKUP_DATA_REG(SDL::LSTESDeviceData); TYPELOOKUP_DATA_REG(ALPAKA_ACCELERATOR_NAMESPACE::ESDeviceProduct>>); TYPELOOKUP_ALPAKA_TEMPLATED_DATA_REG(SDL::LSTESHostData); -TYPELOOKUP_ALPAKA_TEMPLATED_DATA_REG(SDL::LSTESDeviceData); \ No newline at end of file +TYPELOOKUP_ALPAKA_TEMPLATED_DATA_REG(SDL::LSTESDeviceData);