Skip to content

Commit

Permalink
Fixes for ECAL rechits on GPU (#475)
Browse files Browse the repository at this point in the history
EcalLinearCorrectionsGPU:
  - add missing cudaFree()

EcalRecHitBuilderKernels:
  - fix warnings due to unused variables
  - fix incorrectly skipping some channels due to the use of "return" in the kernel loop
  - add default values for dead/invalid channels
  • Loading branch information
cmsbuild authored and fwyzard committed Dec 25, 2020
1 parent 38e0cb2 commit 24f4fb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 4 additions & 0 deletions RecoLocalCalo/EcalRecAlgos/src/EcalLinearCorrectionsGPU.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ EcalLinearCorrectionsGPU::Product::~Product() {
// deallocation
cudaCheck(cudaFree(p1));
cudaCheck(cudaFree(p2));
cudaCheck(cudaFree(p3));
cudaCheck(cudaFree(t1));
cudaCheck(cudaFree(t2));
cudaCheck(cudaFree(t3));
}

EcalLinearCorrectionsGPU::Product const& EcalLinearCorrectionsGPU::getProduct(cudaStream_t cudaStream) const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/MakerMacros.h"

//
//
//

// format
#include "CUDADataFormats/EcalRecHitSoA/interface/EcalUncalibratedRecHit_soa.h"
#include "CUDADataFormats/EcalRecHitSoA/interface/EcalRecHit_soa.h"
Expand Down Expand Up @@ -302,7 +298,7 @@ void EcalRecHitProducerGPU::acquire(edm::Event const& event,

neb_ = ebUncalibRecHits.size;
nee_ = eeUncalibRecHits.size;
// std::cout << " [EcalRecHitProducerGPU::acquire] neb_:nee_ = " << neb_ << " : " << nee_ << std::endl;
// std::cout << " [EcalRecHitProducerGPU::acquire] neb_:nee_ = " << neb_ << " : " << nee_ << std::endl;

int nchannelsEB = ebUncalibRecHits.size; // --> offsetForInput, first EB and then EE

Expand All @@ -321,8 +317,6 @@ void EcalRecHitProducerGPU::acquire(edm::Event const& event,
setup.get<EcalLaserAlphasRcd>().get(LaserAlphasHandle_);
setup.get<EcalLinearCorrectionsRcd>().get(LinearCorrectionsHandle_);

//

auto const& ADCToGeVConstantProduct = ADCToGeVConstantHandle_->getProduct(ctx.stream());
auto const& IntercalibConstantsProduct = IntercalibConstantsHandle_->getProduct(ctx.stream());
auto const& ChannelStatusProduct = ChannelStatusHandle_->getProduct(ctx.stream());
Expand Down

0 comments on commit 24f4fb1

Please sign in to comment.