From 29e9eaefc3dcdb1baf7bf9857f725ba2fa3a9fb2 Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Tue, 28 May 2024 10:26:45 -0500 Subject: [PATCH] Revert "[14_0_X] Workaround to produce exactly same data products in Serial and CUDA backends in Alpaka modules possibly used at HLT" --- .../plugins/alpaka/EcalRawToDigiPortable.cc | 8 -------- .../AlpakaCore/interface/alpaka/ProducerBase.h | 6 ------ .../plugins/alpaka/EcalUncalibRecHitProducerPortable.cc | 8 -------- .../plugins/alpaka/SiPixelRawToCluster.cc | 7 ------- .../SiPixelRecHits/plugins/alpaka/SiPixelRecHitAlpaka.cc | 9 +-------- .../plugins/alpaka/PFClusterSoAProducer.cc | 8 +------- .../plugins/alpaka/CaloRecHitSoAProducer.cc | 7 +------ .../plugins/alpaka/PFRecHitSoAProducer.cc | 5 ----- RecoTracker/PixelSeeding/plugins/alpaka/CAHitNtuplet.cc | 9 +-------- .../plugins/alpaka/PixelVertexProducerAlpaka.cc | 7 +------ .../plugins/alpaka/BeamSpotDeviceProducer.cc | 7 +------ 11 files changed, 6 insertions(+), 75 deletions(-) diff --git a/EventFilter/EcalRawToDigi/plugins/alpaka/EcalRawToDigiPortable.cc b/EventFilter/EcalRawToDigi/plugins/alpaka/EcalRawToDigiPortable.cc index 2722942f25b97..7739cf15c0ab3 100644 --- a/EventFilter/EcalRawToDigi/plugins/alpaka/EcalRawToDigiPortable.cc +++ b/EventFilter/EcalRawToDigi/plugins/alpaka/EcalRawToDigiPortable.cc @@ -64,14 +64,6 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { fedsToUnpack_{ps.getParameter>("FEDs")} { config_.maxChannelsEB = ps.getParameter("maxChannelsEB"); config_.maxChannelsEE = ps.getParameter("maxChannelsEE"); - - // Workaround until the ProductID problem in issue https://github.com/cms-sw/cmssw/issues/44643 is fixed -#ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED - producesTemporarily("edm::DeviceProduct", - ps.getParameter("digisLabelEB")); - producesTemporarily("edm::DeviceProduct", - ps.getParameter("digisLabelEE")); -#endif } void EcalRawToDigiPortable::produce(device::Event& event, device::EventSetup const& setup) { diff --git a/HeterogeneousCore/AlpakaCore/interface/alpaka/ProducerBase.h b/HeterogeneousCore/AlpakaCore/interface/alpaka/ProducerBase.h index 34b8be4967057..7f1d350605f92 100644 --- a/HeterogeneousCore/AlpakaCore/interface/alpaka/ProducerBase.h +++ b/HeterogeneousCore/AlpakaCore/interface/alpaka/ProducerBase.h @@ -58,12 +58,6 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { return ProducerBaseAdaptor(*this, std::move(instanceName)); } - // For a workaround until the ProductID problem in issue https://github.com/cms-sw/cmssw/issues/44643 is fixed - void producesTemporarily(std::string const& iTypeName, std::string instanceName = std::string()) { - auto td = edm::TypeWithDict::byName(iTypeName); - Base::template produces(edm::TypeID(td.typeInfo()), std::move(instanceName)); - } - static void prevalidate(edm::ConfigurationDescriptions& descriptions) { Base::prevalidate(descriptions); cms::alpakatools::module_backend_config(descriptions); diff --git a/RecoLocalCalo/EcalRecProducers/plugins/alpaka/EcalUncalibRecHitProducerPortable.cc b/RecoLocalCalo/EcalRecProducers/plugins/alpaka/EcalUncalibRecHitProducerPortable.cc index be36fad7b190f..d0f06f3caf186 100644 --- a/RecoLocalCalo/EcalRecProducers/plugins/alpaka/EcalUncalibRecHitProducerPortable.cc +++ b/RecoLocalCalo/EcalRecProducers/plugins/alpaka/EcalUncalibRecHitProducerPortable.cc @@ -87,14 +87,6 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { multifitParametersToken_{esConsumes()}, ebDigisSizeHostBuf_{cms::alpakatools::make_host_buffer()}, eeDigisSizeHostBuf_{cms::alpakatools::make_host_buffer()} { - // Workaround until the ProductID problem in issue https://github.com/cms-sw/cmssw/issues/44643 is fixed -#ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED - producesTemporarily("edm::DeviceProduct", - ps.getParameter("recHitsLabelEB")); - producesTemporarily("edm::DeviceProduct", - ps.getParameter("recHitsLabelEE")); -#endif - std::pair EBtimeFitLimits, EEtimeFitLimits; EBtimeFitLimits.first = ps.getParameter("EBtimeFitLimits_Lower"); EBtimeFitLimits.second = ps.getParameter("EBtimeFitLimits_Upper"); diff --git a/RecoLocalTracker/SiPixelClusterizer/plugins/alpaka/SiPixelRawToCluster.cc b/RecoLocalTracker/SiPixelClusterizer/plugins/alpaka/SiPixelRawToCluster.cc index 8a74cc67767d3..8f14c50f09263 100644 --- a/RecoLocalTracker/SiPixelClusterizer/plugins/alpaka/SiPixelRawToCluster.cc +++ b/RecoLocalTracker/SiPixelClusterizer/plugins/alpaka/SiPixelRawToCluster.cc @@ -94,13 +94,6 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { static_cast(iConfig.getParameter("VCaltoElectronGain_L1")), static_cast(iConfig.getParameter("VCaltoElectronOffset")), static_cast(iConfig.getParameter("VCaltoElectronOffset_L1"))} { - // Workaround until the ProductID problem in issue https://github.com/cms-sw/cmssw/issues/44643 is fixed -#ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED - producesTemporarily("edm::DeviceProduct"); - producesTemporarily("edm::DeviceProduct"); - producesTemporarily("edm::DeviceProduct"); -#endif - if (includeErrors_) { digiErrorPutToken_ = produces(); fmtErrorToken_ = produces(); diff --git a/RecoLocalTracker/SiPixelRecHits/plugins/alpaka/SiPixelRecHitAlpaka.cc b/RecoLocalTracker/SiPixelRecHits/plugins/alpaka/SiPixelRecHitAlpaka.cc index ad23762f3bca2..46fd8a6b8c2ca 100644 --- a/RecoLocalTracker/SiPixelRecHits/plugins/alpaka/SiPixelRecHitAlpaka.cc +++ b/RecoLocalTracker/SiPixelRecHits/plugins/alpaka/SiPixelRecHitAlpaka.cc @@ -60,14 +60,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { tBeamSpot(consumes(iConfig.getParameter("beamSpot"))), tokenClusters_(consumes(iConfig.getParameter("src"))), tokenDigi_(consumes(iConfig.getParameter("src"))), - tokenHit_(produces()) { - // Workaround until the ProductID problem in issue https://github.com/cms-sw/cmssw/issues/44643 is fixed -#ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED - if constexpr (std::is_same_v) { - producesTemporarily("edm::DeviceProduct"); - } -#endif - } + tokenHit_(produces()) {} template void SiPixelRecHitAlpaka::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { diff --git a/RecoParticleFlow/PFClusterProducer/plugins/alpaka/PFClusterSoAProducer.cc b/RecoParticleFlow/PFClusterProducer/plugins/alpaka/PFClusterSoAProducer.cc index 6af4c9f17496d..6017f539364ec 100644 --- a/RecoParticleFlow/PFClusterProducer/plugins/alpaka/PFClusterSoAProducer.cc +++ b/RecoParticleFlow/PFClusterProducer/plugins/alpaka/PFClusterSoAProducer.cc @@ -25,13 +25,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { outputPFClusterSoA_Token_{produces()}, outputPFRHFractionSoA_Token_{produces()}, synchronise_(config.getParameter("synchronise")), - pfRecHitFractionAllocation_(config.getParameter("pfRecHitFractionAllocation")) { - // Workaround until the ProductID problem in issue https://github.com/cms-sw/cmssw/issues/44643 is fixed -#ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED - producesTemporarily("edm::DeviceProduct"); - producesTemporarily("edm::DeviceProduct"); -#endif - } + pfRecHitFractionAllocation_(config.getParameter("pfRecHitFractionAllocation")) {} void produce(device::Event& event, device::EventSetup const& setup) override { const reco::PFClusterParamsDeviceCollection& params = setup.getData(pfClusParamsToken); diff --git a/RecoParticleFlow/PFRecHitProducer/plugins/alpaka/CaloRecHitSoAProducer.cc b/RecoParticleFlow/PFRecHitProducer/plugins/alpaka/CaloRecHitSoAProducer.cc index c9e7646f519b9..4b483b0c6a987 100644 --- a/RecoParticleFlow/PFRecHitProducer/plugins/alpaka/CaloRecHitSoAProducer.cc +++ b/RecoParticleFlow/PFRecHitProducer/plugins/alpaka/CaloRecHitSoAProducer.cc @@ -25,12 +25,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { CaloRecHitSoAProducer(edm::ParameterSet const& config) : recHitsToken_(consumes(config.getParameter("src"))), deviceToken_(produces()), - synchronise_(config.getUntrackedParameter("synchronise")) { - // Workaround until the ProductID problem in issue https://github.com/cms-sw/cmssw/issues/44643 is fixed -#ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED - producesTemporarily("edm::DeviceProduct"); -#endif - } + synchronise_(config.getUntrackedParameter("synchronise")) {} void produce(edm::StreamID sid, device::Event& event, device::EventSetup const&) const override { const edm::SortedCollection& recHits = event.get(recHitsToken_); diff --git a/RecoParticleFlow/PFRecHitProducer/plugins/alpaka/PFRecHitSoAProducer.cc b/RecoParticleFlow/PFRecHitProducer/plugins/alpaka/PFRecHitSoAProducer.cc index 31257659062f8..18c160f3cc0c1 100644 --- a/RecoParticleFlow/PFRecHitProducer/plugins/alpaka/PFRecHitSoAProducer.cc +++ b/RecoParticleFlow/PFRecHitProducer/plugins/alpaka/PFRecHitSoAProducer.cc @@ -24,11 +24,6 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { : topologyToken_(esConsumes(config.getParameter("topology"))), pfRecHitsToken_(produces()), synchronise_(config.getUntrackedParameter("synchronise")) { - // Workaround until the ProductID problem in issue https://github.com/cms-sw/cmssw/issues/44643 is fixed -#ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED - producesTemporarily("edm::DeviceProduct"); -#endif - const std::vector producers = config.getParameter>("producers"); recHitsToken_.reserve(producers.size()); for (const edm::ParameterSet& producer : producers) { diff --git a/RecoTracker/PixelSeeding/plugins/alpaka/CAHitNtuplet.cc b/RecoTracker/PixelSeeding/plugins/alpaka/CAHitNtuplet.cc index 6d402f29a24da..c16aed2e0b1e8 100644 --- a/RecoTracker/PixelSeeding/plugins/alpaka/CAHitNtuplet.cc +++ b/RecoTracker/PixelSeeding/plugins/alpaka/CAHitNtuplet.cc @@ -58,14 +58,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { cpeToken_(esConsumes(edm::ESInputTag("", iConfig.getParameter("CPE")))), tokenHit_(consumes(iConfig.getParameter("pixelRecHitSrc"))), tokenTrack_(produces()), - deviceAlgo_(iConfig) { - // Workaround until the ProductID problem in issue https://github.com/cms-sw/cmssw/issues/44643 is fixed -#ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED - if constexpr (std::is_same_v) { - producesTemporarily("edm::DeviceProduct"); - } -#endif - } + deviceAlgo_(iConfig) {} template void CAHitNtupletAlpaka::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { diff --git a/RecoTracker/PixelVertexFinding/plugins/alpaka/PixelVertexProducerAlpaka.cc b/RecoTracker/PixelVertexFinding/plugins/alpaka/PixelVertexProducerAlpaka.cc index 0da09be7ca235..d572a181ccf85 100644 --- a/RecoTracker/PixelVertexFinding/plugins/alpaka/PixelVertexProducerAlpaka.cc +++ b/RecoTracker/PixelVertexFinding/plugins/alpaka/PixelVertexProducerAlpaka.cc @@ -64,12 +64,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { ptMin_(conf.getParameter("PtMin")), // 0.5 GeV ptMax_(conf.getParameter("PtMax")), // 75. Onsumes tokenDeviceTrack_(consumes(conf.getParameter("pixelTrackSrc"))), - tokenDeviceVertex_(produces()) { - // Workaround until the ProductID problem in issue https://github.com/cms-sw/cmssw/issues/44643 is fixed -#ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED - producesTemporarily("edm::DeviceProduct"); -#endif - } + tokenDeviceVertex_(produces()) {} template void PixelVertexProducerAlpaka::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { diff --git a/RecoVertex/BeamSpotProducer/plugins/alpaka/BeamSpotDeviceProducer.cc b/RecoVertex/BeamSpotProducer/plugins/alpaka/BeamSpotDeviceProducer.cc index 03c15013632d8..bd597164827fa 100644 --- a/RecoVertex/BeamSpotProducer/plugins/alpaka/BeamSpotDeviceProducer.cc +++ b/RecoVertex/BeamSpotProducer/plugins/alpaka/BeamSpotDeviceProducer.cc @@ -15,12 +15,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { class BeamSpotDeviceProducer : public global::EDProducer<> { public: BeamSpotDeviceProducer(edm::ParameterSet const& config) - : legacyToken_{consumes(config.getParameter("src"))}, deviceToken_{produces()} { - // Workaround until the ProductID problem in issue https://github.com/cms-sw/cmssw/issues/44643 is fixed -#ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED - producesTemporarily("edm::DeviceProduct"); -#endif - } + : legacyToken_{consumes(config.getParameter("src"))}, deviceToken_{produces()} {} void produce(edm::StreamID, device::Event& event, device::EventSetup const& setup) const override { reco::BeamSpot const& beamspot = event.get(legacyToken_);