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

Patatrack integration - Pixel vertex reconstruction (11/N) #31723

Merged

Commits on Jan 15, 2021

  1. Add new concurrent vertex algo (#158)

    Add a new concurrent vertex algorithm based on DBSCAN (that reuses parts of the pixel cluster algorithm).
    It still needs to be tuned to reach at least the performance of current DivisiveClustering algorithm used at HLT.
    VinInn authored and fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    ebe462b View commit details
    Browse the repository at this point in the history
  2. Disable vertex reconstruction on GPU (#177)

    On K40c and P100 we get a segmentation violation in
    PixelVertexHeterogeneousProducer::produceGPUCuda(...).
    fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    2ac2da9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c0d30e4 View commit details
    Browse the repository at this point in the history
  4. Migrate tracker local reconstruction and pixel tracking to Tasks (bac…

    …kport cms-sw#25163) (#202)
    
    Backport "Migrate tracker local reconstruction and pixel tracking to Tasks" (cms-sw#25163) to the Patatrack branch:
      - migrate RecoLocalTracker_cff to Tasks;
      - migrate RecoPixelVertexing_cff to Tasks;
      - keeping sequences to avoid massive migration (for now).
    fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    7fb964f View commit details
    Browse the repository at this point in the history
  5. 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.
    VinInn authored and fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    b9029aa View commit details
    Browse the repository at this point in the history
  6. Skip CUDA-related tests if no GPU is present (#252)

    Make unit tests that require a CUDA device skip the test and exit
    succesfully if the CUDA runtime is not available, or no CUDA devices
    are available.
    fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    bc77390 View commit details
    Browse the repository at this point in the history
  7. Various updates to pixel track/vertex DQM and MTV (#285)

    * Add DQM for pixel vertices
    
    * Add pT>0.9GeV pixel track collections to MTV
    
    * Add dzPV0p1, Pt0to1, Pt1 variants of pixel track DQM
    makortel authored and fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    2e22e5d View commit details
    Browse the repository at this point in the history
  8. Rework the GPU pixel track clusterizer and vertex finder (#338)

    Add two alternative (faster) track clusterizers: one based on DBSCAN,
    and one "by density"; use the latter by default.
    
    Allow all pixel triplets, but protect the vertex from triplets.
    
    Use a larger-then-needed nearest neightbours array to allow for possible
    duplicate pixels, as a pixel can appear more than once in the same event.
    
    Use a separate workspace for temporary data.
    VinInn authored and fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    93ebb23 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    efab2db View commit details
    Browse the repository at this point in the history
  10. Synchronise with CMSSW_10_6_0

    fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    5a55ac5 View commit details
    Browse the repository at this point in the history
  11. Port the whole pixel workflow to new heterogeneous framework (#384)

      - port the whole pixel workflow to new heterogeneous framework
      - implement a legacy cluster to SoA converter for the pixel RecHits
      - update the vertex producer to run on CPU as well as GPU
    VinInn authored and fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    a56cd9a View commit details
    Browse the repository at this point in the history
  12. Move event and stream caches, and caching allocators out from CUDASer…

    …vice (#364)
    
    To reduce dependencies on edm::Service, and to make CUDAService less
    of a collection of everything, split off from it:
      - the CUDAEventCache
      - the CUDAStreamCache
      - the caching allocators
    
    Other changes:
      - clean up unnecessary use of CUDAService
      - fix maxCachedFraction, add debug printouts
      - add make_*_unique_uninitialized that avoid the static_assert
    makortel authored and fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    9dc2a21 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    9c4e8fb View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    a6a7eaa View commit details
    Browse the repository at this point in the history
  15. Implement library-only wrappers for launching CUDA kernels (#390)

    Implement a wrapper to launch a CUDA kernel without using the
    non-standard CUDA <<<...>>> syntax, based on the cudaLaunchKernel
    library function.
    
    Implement a similar wrapper for cudaLaunchCooperativeKernel.
    
    Migrate code base from cuda::launch to cudautils::launch.
    fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    87bf94d View commit details
    Browse the repository at this point in the history
  16. Replace use of API wrapper stream and event with plain CUDA, part 1 (#…

    …389)
    
    Replace cuda::stream_t<> with cudaStream_t in client code
    Replace cuda::event_t with cudaEvent_t in the client code
    Clean up BuildFiles
    makortel authored and fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    06c607a View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    7ef38e5 View commit details
    Browse the repository at this point in the history
  18. Synchronize event in the CUDAProductBase destructor (#391)

    Otherwise there are possibilities for weird races, e.g. combination of
    non-ExternalWork producers, consumed-but-not-read CUDAProducts, CUDA
    streams executing work later than expected (= on the next event).
    makortel authored and fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    4550410 View commit details
    Browse the repository at this point in the history
  19. Replace use of CUDA API wrapper unique_ptrs with CUDAUtilities unique…

    …_ptrs (#396)
    
    Replace cuda::memory::device::make_unique() calls with cudautils::make_device_unique()
    Replace cuda::memory::host::make_unique() with cudautils::make_host_unique()
    waredjeb authored and fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    f51ed63 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    f47b689 View commit details
    Browse the repository at this point in the history
  21. Replace cuda::device operations with native CUDA calls (#408)

    Replaces the usage of cuda::device::count(), cuda::device::get(), cuda::device::set() and cuda::device::current::get() with native CUDA calls.
    waredjeb authored and fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    1ab5beb View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    4c02d33 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    62b58ad View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    ebace29 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    27ac879 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    012df14 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    e459d8c View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    749793a View commit details
    Browse the repository at this point in the history
  29. Implement changes from the CUDA framework review (#429)

    Rename the cudautils namespace to cms::cuda or cms::cudatest, and drop the CUDA prefix from the symbols defined there.
    
    Always record and query the CUDA event, to minimize need for error checking in CUDAScopedContextProduce destructor.
    
    Add comments to highlight the pieces in CachingDeviceAllocator that have been changed wrt. cub.
    
    Various other updates and clean up:
      - enable CUDA for compute capability 3.5.
      - clean up CUDAService, CUDA tests and plugins.
      - add CUDA existence protections to BuildFiles.
      - mark thread-safe static variables with CMS_THREAD_SAFE.
    makortel authored and fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    08cdb55 View commit details
    Browse the repository at this point in the history
  30. Synchronise with CMSSW_11_1_0_pre2

    Major changes:
      - restructure the RecoPixelVertexing/PixelVertexFinding package;
      - update the interface of PixelCPEFast.
    fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    94e9ef8 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    5cdde61 View commit details
    Browse the repository at this point in the history
  32. Integrate the comments from the upstream PRs (#442)

    Clean up the Patatrack code base following the comments received during the integration into the upstream release.
    
    Currently tracks the changes introduced due to
       - cms-sw#29109: Patatrack integration - trivial changes (1/N)
       - cms-sw#29110: Patatrack integration - common tools (2/N)
    
    List of changes:
     * Remove unused files
     * Fix compilation warnings
     * Fix AtomicPairCounter unit test
     * Rename the cudaCompat namespace to cms::cudacompat
     * Remove extra semicolon
     * Move SimpleVector and VecArray to the cms::cuda namespace
     * Add missing dependency
     * Move HistoContainer, AtomicPairCounter, prefixScan and radixSort to the cms::cuda namespace
     * Remove rule exception for HeterogeneousCore
     * Fix code rule violations:
        - replace using namespace cms::cuda in test/OneToManyAssoc_t.h .
        - add an exception for cudaCompat.h:
          cudaCompat relies on defining equivalent symbols to the CUDA
          intrinsics in the cms::cudacompat namespace, and pulling them in the
          global namespace when compiling device code without CUDA.
    * Protect the headers to compile only with a CUDA compiler
    fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    f1c358e View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    3edbb17 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    b525042 View commit details
    Browse the repository at this point in the history
  35. Fix use of namespaces (#446)

    Clean up instances of using namespace ... from header files,
    following the comments from the upstream integration.
    fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    f203d0d View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    1b7463a View commit details
    Browse the repository at this point in the history
  37. Fix max track size in vertex SoA (#499)

    Make the size consistent with the buffer in track SoA.
    VinInn authored and fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    c6577b3 View commit details
    Browse the repository at this point in the history
  38. Backport: add ECAL-only and HCAL-only workflows for MC and data (cms-…

    …sw#30350)
    
    Backport cms-sw#30105: add ECAL-only workflows for data.
    Backport cms-sw#30136: add HCAL-only workflows for MC and data.
    mariadalfonso authored and fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    0863f52 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    8c29b60 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    0f5e3c8 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    5525ec1 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    d5649dd View commit details
    Browse the repository at this point in the history
  43. Remove spurious empty lines

    fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    c37f72d View commit details
    Browse the repository at this point in the history
  44. Simplify cudacompat layer to use a 1-dimensional grid (#586)

    Remove the possibility of changing the grid size used by the
    cms::cudacompat layer, and make it a constant equal to {1, 1, 1}.
    
    This avoids a thread-related problem caused by TBB using worker threads
    where the grid size had not been initialised.
    
    The kernel for pixel clustering need to be rewritten to support a
    one-dimensional grid to run on the CPU.
    Currently they are only used on the GPU in the Patatrack workflows, but
    they are exercised on the CPU by the gpuClustering_t tests; those tests
    have been commented out until the kernels can be updated.
    fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    bb28343 View commit details
    Browse the repository at this point in the history
  45. Clean up the pixel local reconstruction code (#593)

    Address the pixel local reconstruction review comments.
    
    General clean up of the pixel local reconstruction code:
      - remove commented out and obsolete code and data members
      - use named constants more consistently
      - update variable names to follow the coding rules and for better consistency
      - use member initializer lists in the constructors
      - allow `if constexpr` in CUDA code
      - use `std::size` instead of hardcoding the array size
      - convert iterator-based loops to range-based loops
      - replace `cout` and `printf` with `LogDebug` or `LogWarning`
      - use put tokens
      - reorganise the auto-generated cfi files and use them more consistently
      - adjust code after rearranging an `#ifdef GPU_DEBUG` block
      - apply code formatting
      - other minor changes
    
    Improve comments:
      - improve comments and remove obsolete ones
      - clarify comments and types regarding `HostProduct`
      - update comments about `GPU_SMALL_EVENTS` being kept for testing purposes
      - add notes about the original cpu code
    
    Reuse some more common code:
      - move common pixel cluster code to `PixelClusterizerBase`
      - extend the `SiPixelCluster` constructor
    
    Rename classes and modules for better consistency:
      - remove the `TrackingRecHit2DCUDA.h` and `gpuClusteringConstants.h` forwarding headers
      - rename `PixelRecHits` to `PixelRecHitGPUKernel`
      - rename SiPixelRecHitFromSOA to SiPixelRecHitFromCUDA
      - rename `siPixelClustersCUDAPreSplitting` to `siPixelClustersPreSplittingCUDA`
      - rename `siPixelRecHitsCUDAPreSplitting` to `siPixelRecHitsPreSplittingCUDA`
      - rename `siPixelRecHitsLegacyPreSplitting` to `siPixelRecHitsPreSplittingLegacy`
      - rename `siPixelRecHitHostSoA` to `siPixelRecHitSoAFromLegacy`
    
    Re-apply changes from cms-sw#29805 that were lost in the Patatrack branch.
    fwyzard committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    af73ec9 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2021

  1. Configuration menu
    Copy the full SHA
    8ffd775 View commit details
    Browse the repository at this point in the history
  2. Clean up the pixel track reconstruction code (#606)

    Updat EDM access:
      - switch to consumes() scheme for event setup;
      - simplify some event data access.
    
    Style fixes:
      - make class member private & fixed problematic cast;
      - format of comments for clang-tidy;
      - chang to enum class to avoid creating a namespace (usage becomes: pixelTrack::Quality::loose);
      - add article reference in comment (it was already further down in the file);
      - fix member functions and classes capitalization;
      - fix one letter or upper case variable names in formulas (trying to keep the naming from the reference article).
    
    Avoid some code repetitions.
    ericcano authored and fwyzard committed Mar 23, 2021
    Configuration menu
    Copy the full SHA
    55fe4b3 View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2021

  1. Clean up the pixel vertex reconstruction code (#609)

    Split PixelVertexProducerCUDA produce() method into two methods, for running on the CPU and on the GPU.
    
    Update access to EDM handles and event collections.
    
    General code clean up:
      - use named constants for kernel grid dimensions;
      - replace commented out code with #ifdef-based conditionals;
      - update data member names to follow the coding rules;
      - fix include guard names and replace relative with absolute includes.
    
    Apply code formatting.
    ericcano authored and fwyzard committed Mar 26, 2021
    Configuration menu
    Copy the full SHA
    0cd8f94 View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2021

  1. Configuration menu
    Copy the full SHA
    7fbcaa4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    545ddea View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2021

  1. Address more review comments to the vertex finding code (#612)

    Use std::clamp(...) in device code now that CUDA supports c++17.
    Name reused constants in the vertex fitting and splitting.
    fwyzard committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    a48c872 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0abda2e View commit details
    Browse the repository at this point in the history