diff --git a/CUDADataFormats/TrackingRecHit/test/TrackingRecHit2DCUDA_t.cpp b/CUDADataFormats/TrackingRecHit/test/TrackingRecHit2DCUDA_t.cpp index 19c79e404167e..7cd6ac9e8626a 100644 --- a/CUDADataFormats/TrackingRecHit/test/TrackingRecHit2DCUDA_t.cpp +++ b/CUDADataFormats/TrackingRecHit/test/TrackingRecHit2DCUDA_t.cpp @@ -16,18 +16,25 @@ int main() { cudaCheck(cudaStreamCreateWithFlags(&stream, cudaStreamNonBlocking)); auto nHits = 200; - auto nModules = 2000; // inner scope to deallocate memory before destroying the stream { - TrackingRecHit2DGPU tkhit(nHits, nModules, 0, nullptr, nullptr, stream); - + TrackingRecHit2DGPU tkhit(nHits, false, 0, nullptr, nullptr, stream); testTrackingRecHit2D::runKernels(tkhit.view()); - TrackingRecHit2DHost tkhitH(nHits, nModules, 0, nullptr, nullptr, stream, &tkhit); + TrackingRecHit2DGPU tkhitPhase2(nHits, true, 0, nullptr, nullptr, stream); + testTrackingRecHit2D::runKernels(tkhitPhase2.view()); + + TrackingRecHit2DHost tkhitH(nHits, false, 0, nullptr, nullptr, stream, &tkhit); cudaStreamSynchronize(stream); assert(tkhitH.view()); assert(tkhitH.view()->nHits() == unsigned(nHits)); - assert(tkhitH.view()->nMaxModules() == unsigned(nModules)); + assert(tkhitH.view()->nMaxModules() == 1856); + + TrackingRecHit2DHost tkhitHPhase2(nHits, true, 0, nullptr, nullptr, stream, &tkhit); + cudaStreamSynchronize(stream); + assert(tkhitHPhase2.view()); + assert(tkhitHPhase2.view()->nHits() == unsigned(nHits)); + assert(tkhitHPhase2.view()->nMaxModules() == 3892); } cudaCheck(cudaStreamDestroy(stream)); diff --git a/RecoLocalTracker/SiPixelClusterizer/plugins/SiPixelPhase2DigiToClusterCUDA.cc b/RecoLocalTracker/SiPixelClusterizer/plugins/SiPixelPhase2DigiToClusterCUDA.cc index ecc7bab594766..6f83a8b414485 100644 --- a/RecoLocalTracker/SiPixelClusterizer/plugins/SiPixelPhase2DigiToClusterCUDA.cc +++ b/RecoLocalTracker/SiPixelClusterizer/plugins/SiPixelPhase2DigiToClusterCUDA.cc @@ -54,8 +54,8 @@ class SiPixelPhase2DigiToClusterCUDA : public edm::stream::EDProducer> pixelDigiToken_; const edm::ESGetToken geomToken_; + const edm::EDGetTokenT> pixelDigiToken_; edm::EDPutTokenT> digiPutToken_; edm::EDPutTokenT> digiErrorPutToken_; @@ -71,7 +71,8 @@ class SiPixelPhase2DigiToClusterCUDA : public edm::stream::EDProducer>(iConfig.getParameter("InputDigis"))), + : geomToken_(esConsumes()), + pixelDigiToken_(consumes>(iConfig.getParameter("InputDigis"))), digiPutToken_(produces>()), clusterPutToken_(produces>()), includeErrors_(iConfig.getParameter("IncludeErrors")), diff --git a/RecoLocalTracker/SiPixelClusterizer/plugins/gpuCalibPixel.h b/RecoLocalTracker/SiPixelClusterizer/plugins/gpuCalibPixel.h index 0ee57d6080a65..c94fcdfd94ccd 100644 --- a/RecoLocalTracker/SiPixelClusterizer/plugins/gpuCalibPixel.h +++ b/RecoLocalTracker/SiPixelClusterizer/plugins/gpuCalibPixel.h @@ -94,7 +94,6 @@ namespace gpuCalibPixel { if (invalidModuleId == id[i]) continue; - printf("%d %d %d \n", id[i], adc[i]); constexpr int mode = (Phase2ReadoutMode < -1 ? -1 : Phase2ReadoutMode); if constexpr (mode < 0)