Skip to content

Commit

Permalink
Move LogWarning into the EDProducer (#422)
Browse files Browse the repository at this point in the history
In CMSSW 11.0.0 the MessageLogger is no longer usable in CUDA code due
to the use of c++17 featutres.
  • Loading branch information
VinInn authored and fwyzard committed Nov 6, 2020
1 parent 3af2fac commit a46353c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 0 additions & 6 deletions RecoLocalTracker/SiPixelRecHits/plugins/PixelRecHits.cu
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <cuda_runtime.h>

// CMSSW headers
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "HeterogeneousCore/CUDAUtilities/interface/cudaCheck.h"
#include "HeterogeneousCore/CUDAUtilities/interface/device_unique_ptr.h"
#include "RecoLocalTracker/SiPixelClusterizer/plugins/SiPixelRawToClusterGPUKernel.h"
Expand Down Expand Up @@ -63,11 +62,6 @@ namespace pixelgpudetails {
cudaCheck(cudaGetLastError());
}

if (nHits >= TrackingRecHit2DSOAView::maxHits()) {
edm::LogWarning("PixelRecHitGPUKernel")
<< "Hits Overflow " << nHits << " > " << TrackingRecHit2DSOAView::maxHits();
}

if (nHits) {
auto hws = cudautils::make_device_unique<uint8_t[]>(TrackingRecHit2DSOAView::Hist::wsSize(), stream);
cudautils::fillManyFromVector(
Expand Down
6 changes: 6 additions & 0 deletions RecoLocalTracker/SiPixelRecHits/plugins/SiPixelRecHitCUDA.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ void SiPixelRecHitCUDA::produce(edm::StreamID streamID, edm::Event& iEvent, cons
iEvent.getByToken(tBeamSpot, hbs);
auto const& bs = ctx.get(*hbs);

auto nHits = clusters.nClusters();
if (nHits >= TrackingRecHit2DSOAView::maxHits()) {
edm::LogWarning("PixelRecHitGPUKernel")
<< "Clusters/Hits Overflow " << nHits << " >= " << TrackingRecHit2DSOAView::maxHits();
}

ctx.emplace(iEvent,
tokenHit_,
gpuAlgo_.makeHitsAsync(digis, clusters, bs, fcpe->getGPUProductAsync(ctx.stream()), ctx.stream()));
Expand Down

0 comments on commit a46353c

Please sign in to comment.