Skip to content

Commit

Permalink
Rename CUDAHostAllocator to cms::cuda::HostAllocator (#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
fwyzard committed Nov 12, 2020
1 parent 6570ab8 commit 232bd0d
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 22 deletions.
6 changes: 3 additions & 3 deletions CUDADataFormats/EcalRecHitSoA/src/classes_def.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<lcgdict>
<class name="std::vector<float, CUDAHostAllocator<float, 0>>" />
<class name="std::vector<double, CUDAHostAllocator<double, 0>>" />
<class name="std::vector<uint32_t, CUDAHostAllocator<uint32_t, 0>>" />
<class name="std::vector<float, cms::cuda::HostAllocator<float, 0>>" />
<class name="std::vector<double, cms::cuda::HostAllocator<double, 0>>" />
<class name="std::vector<uint32_t, cms::cuda::HostAllocator<uint32_t, 0>>" />
<class name="ecal::Tag::soa"/>
<class name="ecal::Detail::Base<ecal::Tag::soa>" />

Expand Down
4 changes: 2 additions & 2 deletions EventFilter/EcalRawToDigi/interface/ElectronicsMappingGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "CondFormats/EcalObjects/interface/EcalMappingElectronics.h"

#ifndef __CUDACC__
#include "HeterogeneousCore/CUDAUtilities/interface/CUDAHostAllocator.h"
#include "HeterogeneousCore/CUDAUtilities/interface/HostAllocator.h"
#include "HeterogeneousCore/CUDACore/interface/ESProduct.h"
#endif

Expand Down Expand Up @@ -35,7 +35,7 @@ namespace ecal {
private:
// in the future, we need to arrange so to avoid this copy on the host
// store eb first then ee
std::vector<uint32_t, CUDAHostAllocator<uint32_t>> eid2did_;
std::vector<uint32_t, cms::cuda::HostAllocator<uint32_t>> eid2did_;

cms::cuda::ESProduct<Product> product_;
#endif
Expand Down
5 changes: 3 additions & 2 deletions EventFilter/EcalRawToDigi/plugins/EcalCPUDigisProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "FWCore/Framework/interface/stream/EDProducer.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "HeterogeneousCore/CUDACore/interface/ScopedContext.h"
#include "HeterogeneousCore/CUDAUtilities/interface/HostAllocator.h"
#include "HeterogeneousCore/CUDAUtilities/interface/cudaCheck.h"

class EcalCPUDigisProducer : public edm::stream::EDProducer<edm::ExternalWork> {
Expand Down Expand Up @@ -58,8 +59,8 @@ class EcalCPUDigisProducer : public edm::stream::EDProducer<edm::ExternalWork> {
edm::EDPutTokenT<EcalElectronicsIdCollection> integrityBlockSizeErrorsToken_;

// FIXME better way to pass pointers from acquire to produce?
std::vector<uint32_t, CUDAHostAllocator<uint32_t>> idsebtmp, idseetmp;
std::vector<uint16_t, CUDAHostAllocator<uint16_t>> dataebtmp, dataeetmp;
std::vector<uint32_t, cms::cuda::HostAllocator<uint32_t>> idsebtmp, idseetmp;
std::vector<uint16_t, cms::cuda::HostAllocator<uint16_t>> dataebtmp, dataeetmp;
};

void EcalCPUDigisProducer::fillDescriptions(edm::ConfigurationDescriptions& confDesc) {
Expand Down
6 changes: 3 additions & 3 deletions RecoLocalCalo/EcalRecAlgos/interface/EcalGainRatiosGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "CondFormats/EcalObjects/interface/EcalGainRatios.h"

#ifndef __CUDACC__
#include "HeterogeneousCore/CUDAUtilities/interface/CUDAHostAllocator.h"
#include "HeterogeneousCore/CUDAUtilities/interface/HostAllocator.h"
#include "HeterogeneousCore/CUDACore/interface/ESProduct.h"
#endif

Expand Down Expand Up @@ -32,8 +32,8 @@ class EcalGainRatiosGPU {
private:
// in the future, we need to arrange so to avoid this copy on the host
// store eb first then ee
std::vector<float, CUDAHostAllocator<float>> gain12Over6_;
std::vector<float, CUDAHostAllocator<float>> gain6Over1_;
std::vector<float, cms::cuda::HostAllocator<float>> gain12Over6_;
std::vector<float, cms::cuda::HostAllocator<float>> gain6Over1_;

cms::cuda::ESProduct<Product> product_;

Expand Down
14 changes: 7 additions & 7 deletions RecoLocalCalo/EcalRecAlgos/interface/EcalPedestalsGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "CondFormats/EcalObjects/interface/EcalPedestals.h"

#ifndef __CUDACC__
#include "HeterogeneousCore/CUDAUtilities/interface/CUDAHostAllocator.h"
#include "HeterogeneousCore/CUDAUtilities/interface/HostAllocator.h"
#include "HeterogeneousCore/CUDACore/interface/ESProduct.h"
#endif

Expand Down Expand Up @@ -33,12 +33,12 @@ class EcalPedestalsGPU {
private:
// in the future, we need to arrange so to avoid this copy on the host
// store eb first then ee
std::vector<float, CUDAHostAllocator<float>> mean_x12_;
std::vector<float, CUDAHostAllocator<float>> rms_x12_;
std::vector<float, CUDAHostAllocator<float>> mean_x6_;
std::vector<float, CUDAHostAllocator<float>> rms_x6_;
std::vector<float, CUDAHostAllocator<float>> mean_x1_;
std::vector<float, CUDAHostAllocator<float>> rms_x1_;
std::vector<float, cms::cuda::HostAllocator<float>> mean_x12_;
std::vector<float, cms::cuda::HostAllocator<float>> rms_x12_;
std::vector<float, cms::cuda::HostAllocator<float>> mean_x6_;
std::vector<float, cms::cuda::HostAllocator<float>> rms_x6_;
std::vector<float, cms::cuda::HostAllocator<float>> mean_x1_;
std::vector<float, cms::cuda::HostAllocator<float>> rms_x1_;

cms::cuda::ESProduct<Product> product_;
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "CondFormats/EcalObjects/interface/EcalPulseCovariances.h"

#ifndef __CUDACC__
#include "HeterogeneousCore/CUDAUtilities/interface/CUDAHostAllocator.h"
#include "HeterogeneousCore/CUDAUtilities/interface/HostAllocator.h"
#include "HeterogeneousCore/CUDACore/interface/ESProduct.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion RecoLocalCalo/EcalRecAlgos/interface/EcalPulseShapesGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "CondFormats/EcalObjects/interface/EcalPulseShapes.h"

#ifndef __CUDACC__
#include "HeterogeneousCore/CUDAUtilities/interface/CUDAHostAllocator.h"
#include "HeterogeneousCore/CUDAUtilities/interface/HostAllocator.h"
#include "HeterogeneousCore/CUDACore/interface/ESProduct.h"
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "CondFormats/EcalObjects/interface/EcalSamplesCorrelation.h"

#ifndef __CUDACC__
#include "HeterogeneousCore/CUDAUtilities/interface/CUDAHostAllocator.h"
#include "HeterogeneousCore/CUDAUtilities/interface/HostAllocator.h"
#include "HeterogeneousCore/CUDACore/interface/ESProduct.h"
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "CondFormats/EcalObjects/interface/EcalTimeBiasCorrections.h"

#ifndef __CUDACC__
#include "HeterogeneousCore/CUDAUtilities/interface/CUDAHostAllocator.h"
#include "HeterogeneousCore/CUDAUtilities/interface/HostAllocator.h"
#include "HeterogeneousCore/CUDACore/interface/ESProduct.h"
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "CondFormats/EcalObjects/interface/EcalTimeCalibConstants.h"

#ifndef __CUDACC__
#include "HeterogeneousCore/CUDAUtilities/interface/CUDAHostAllocator.h"
#include "HeterogeneousCore/CUDAUtilities/interface/HostAllocator.h"
#include "HeterogeneousCore/CUDACore/interface/ESProduct.h"
#endif

Expand Down

0 comments on commit 232bd0d

Please sign in to comment.