Skip to content

Commit

Permalink
Work around atomicAdd synchronisation problem on Volta (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
fwyzard authored Sep 30, 2018
1 parent b5135e6 commit e269bdd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions RecoLocalTracker/SiPixelClusterizer/plugins/gpuClustering.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ namespace gpuClustering {
printf("# loops %d\n",nloops);
#endif

__shared__ int foundClusters;
__shared__ unsigned int foundClusters;
foundClusters = 0;
__syncthreads();

Expand All @@ -208,7 +208,7 @@ namespace gpuClustering {
if (id[i] == InvId) // skip invalid pixels
continue;
if (clusterId[i] == i) {
auto old = atomicAdd(&foundClusters, 1);
auto old = atomicInc(&foundClusters, 0xffffffff);
clusterId[i] = -(old + 1);
}
}
Expand Down
4 changes: 2 additions & 2 deletions RecoPixelVertexing/PixelVertexFinding/src/gpuClusterTracks.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ namespace gpuVertexFinder {
}


__shared__ int foundClusters;
__shared__ unsigned int foundClusters;
foundClusters = 0;
__syncthreads();

Expand All @@ -193,7 +193,7 @@ namespace gpuVertexFinder {
for (int i = threadIdx.x; i < nt; i += blockDim.x) {
if (iv[i] == i) {
if (nn[i]>=minT) {
auto old = atomicAdd(&foundClusters, 1);
auto old = atomicInc(&foundClusters, 0xffffffff);
iv[i] = -(old + 1);
zv[old]=0;
wv[old]=0;
Expand Down

0 comments on commit e269bdd

Please sign in to comment.