forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Full workflow from raw data to pixel tracks and vertices on GPUs (#216)
Port and optimise the full workflow from pixel raw data to pixel tracks and vertices to GPUs. Clean the pixel n-tuplets with the "fishbone" algorithm (only on GPUs). Other changes: - recover the Riemann fit updates lost during the merge with CMSSW 10.4.x; - speed up clustering and track fitting; - minor bug fix to avoid trivial regression with the optimized fit.
- Loading branch information
Showing
76 changed files
with
4,622 additions
and
2,461 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
HeterogeneousCore/CUDAUtilities/interface/AtomicPairCounter.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#ifndef HeterogeneousCoreCUDAUtilitiesAtomicPairCounter_H | ||
#define HeterogeneousCoreCUDAUtilitiesAtomicPairCounter_H | ||
|
||
#include <cuda_runtime.h> | ||
#include <cstdint> | ||
|
||
class AtomicPairCounter { | ||
public: | ||
|
||
using c_type = unsigned long long int; | ||
|
||
AtomicPairCounter(){} | ||
AtomicPairCounter(c_type i) { counter.ac=i;} | ||
|
||
__device__ __host__ | ||
AtomicPairCounter & operator=(c_type i) { counter.ac=i; return *this;} | ||
|
||
struct Counters { | ||
uint32_t n; // in a "One to Many" association is the number of "One" | ||
uint32_t m; // in a "One to Many" association is the total number of associations | ||
}; | ||
|
||
union Atomic2 { | ||
Counters counters; | ||
c_type ac; | ||
}; | ||
|
||
#ifdef __CUDACC__ | ||
|
||
static constexpr c_type incr = 1UL<<32; | ||
|
||
__device__ __host__ | ||
Counters get() const { return counter.counters;} | ||
|
||
// increment n by 1 and m by i. return previous value | ||
__device__ | ||
Counters add(uint32_t i) { | ||
c_type c = i; | ||
c+=incr; | ||
Atomic2 ret; | ||
ret.ac = atomicAdd(&counter.ac,c); | ||
return ret.counters; | ||
} | ||
|
||
#endif | ||
|
||
private: | ||
|
||
Atomic2 counter; | ||
|
||
}; | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.