Skip to content

Commit

Permalink
Replace cub prefix scan with home-brewed one (#447)
Browse files Browse the repository at this point in the history
Replace the use of the prefix scan from CUB with a home-brewed implementation,
using dynamic instead of static shared memory.

No changes to physics or timing performance.
  • Loading branch information
VinInn authored and fwyzard committed Oct 20, 2020
1 parent a848af7 commit 8b365ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions RecoLocalTracker/SiPixelRecHits/plugins/PixelRecHits.cu
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ namespace pixelgpudetails {
}

if (nHits) {
auto hws = cms::cuda::make_device_unique<uint8_t[]>(TrackingRecHit2DSOAView::Hist::wsSize(), stream);
cms::cuda::fillManyFromVector(
hits_d.phiBinner(), hws.get(), 10, hits_d.iphi(), hits_d.hitsLayerStart(), nHits, 256, stream);
cms::cuda::fillManyFromVector(hits_d.phiBinner(), 10, hits_d.iphi(), hits_d.hitsLayerStart(), nHits, 256, stream);
cudaCheck(cudaGetLastError());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ void SiPixelRecHitSoAFromLegacy::produce(edm::StreamID streamID, edm::Event& iEv
output->hitsLayerStart()[i] = hitsModuleStart[cpeView.layerGeometry().layerStart[i]];
}
cms::cuda::fillManyFromVector(
output->phiBinner(), nullptr, 10, output->iphi(), output->hitsLayerStart(), numberOfHits, 256, nullptr);
output->phiBinner(), 10, output->iphi(), output->hitsLayerStart(), numberOfHits, 256, nullptr);

// std::cout << "created HitSoa for " << numberOfClusters << " clusters in " << numberOfDetUnits << " Dets" << std::endl;
iEvent.put(std::move(output));
Expand Down

0 comments on commit 8b365ad

Please sign in to comment.