Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes for pixel clustering on GPU [12.4.x] #38921

Merged
merged 3 commits into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -597,8 +597,7 @@ namespace pixelgpudetails {
debug);
cudaCheck(cudaGetLastError());
#ifdef GPU_DEBUG
cudaDeviceSynchronize();
cudaCheck(cudaGetLastError());
cudaCheck(cudaStreamSynchronize(stream));
#endif

if (includeErrors) {
Expand Down Expand Up @@ -637,8 +636,7 @@ namespace pixelgpudetails {

cudaCheck(cudaGetLastError());
#ifdef GPU_DEBUG
cudaDeviceSynchronize();
cudaCheck(cudaGetLastError());
cudaCheck(cudaStreamSynchronize(stream));
#endif

#ifdef GPU_DEBUG
Expand All @@ -651,7 +649,7 @@ namespace pixelgpudetails {
cudaCheck(cudaGetLastError());

threadsPerBlock = 256 + 128; /// should be larger than 6000/16 aka (maxPixInModule/maxiter in the kernel)
blocks = phase2PixelTopology::numberOfModules;
blocks = phase1PixelTopology::numberOfModules;
#ifdef GPU_DEBUG
std::cout << "CUDA findClus kernel launch with " << blocks << " blocks of " << threadsPerBlock << " threads\n";
#endif
Expand All @@ -666,8 +664,7 @@ namespace pixelgpudetails {
wordCounter);
cudaCheck(cudaGetLastError());
#ifdef GPU_DEBUG
cudaDeviceSynchronize();
cudaCheck(cudaGetLastError());
cudaCheck(cudaStreamSynchronize(stream));
#endif

// apply charge cut
Expand Down Expand Up @@ -697,8 +694,7 @@ namespace pixelgpudetails {
nModules_Clusters_h.get(), nModules_Clusters_d.get(), 3 * sizeof(uint32_t), cudaMemcpyDefault, stream));

#ifdef GPU_DEBUG
cudaDeviceSynchronize();
cudaCheck(cudaGetLastError());
cudaCheck(cudaStreamSynchronize(stream));
#endif

} // end clusterizer scope
Expand Down Expand Up @@ -744,8 +740,7 @@ namespace pixelgpudetails {
cudaCheck(cudaGetLastError());

#ifdef GPU_DEBUG
cudaDeviceSynchronize();
cudaCheck(cudaGetLastError());
cudaCheck(cudaStreamSynchronize(stream));
#endif

#ifdef GPU_DEBUG
Expand Down Expand Up @@ -774,8 +769,7 @@ namespace pixelgpudetails {

cudaCheck(cudaGetLastError());
#ifdef GPU_DEBUG
cudaDeviceSynchronize();
cudaCheck(cudaGetLastError());
cudaCheck(cudaStreamSynchronize(stream));
#endif

// apply charge cut
Expand All @@ -799,8 +793,7 @@ namespace pixelgpudetails {
nModules_Clusters_h.get(), nModules_Clusters_d.get(), 3 * sizeof(uint32_t), cudaMemcpyDefault, stream));

#ifdef GPU_DEBUG
cudaDeviceSynchronize();
cudaCheck(cudaGetLastError());
cudaCheck(cudaStreamSynchronize(stream));
#endif
} //
} // namespace pixelgpudetails
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,6 @@ __global__ void kernel_fastDuplicateRemover(GPUCACell const *__restrict__ cells,
auto qj = tracks->quality(jt);
if (qj <= reject)
continue;
#ifdef GPU_DEBUG
if (foundNtuplets->size(it) != foundNtuplets->size(jt))
printf(" a mess\n");
#endif
auto opj = tracks->stateAtBS.state(jt)(2);
auto ctj = tracks->stateAtBS.state(jt)(3);
auto dct = nSigma2 * (tracks->stateAtBS.covariance(jt)(12) + e2cti);
Expand Down