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 - common data formats (5/N) #31703

Conversation

fwyzard
Copy link
Contributor

@fwyzard fwyzard commented Oct 7, 2020

PR description:

Common data formats and dictionaries for CUDA modules.

PR validation:

Changes in use in the Patatrack releases.

if this PR is a backport please specify the original PR and why you need to backport that PR:

Includes changes from:

VinInn and others added 10 commits October 7, 2020 18:57
  - 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
…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
…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
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.
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
Move common ROOT dictionaries to a dedicated new package,
CUDADataFormats/StdDictionaries .

Remove unnecessary dictionary declarations.

Determine the default module label automatically for templated and
non-templated EDProducers and ESProducer, and remove the "name()"
static method previously used to distinguish their template arguments.

Use Event::emplace instead of Event:put where relevant.

Protect the use of CUDA API calls in module constructors and
destructors, checking that the CUDAService is available and enabled.

Move the definition of EventSetup records to a package/library that does
not define plugins.
@fwyzard
Copy link
Contributor Author

fwyzard commented Oct 7, 2020

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 7, 2020

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 7, 2020

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31703/18864

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 7, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 7, 2020

A new Pull Request was created by @fwyzard (Andrea Bocci) for master.

It involves the following packages:

CUDADataFormats/Common
CUDADataFormats/StdDictionaries

The following packages do not have a category, yet:

CUDADataFormats/StdDictionaries
Please create a PR for https://github.com/cms-sw/cms-bot/blob/master/categories_map.py to assign category

@makortel, @cmsbuild, @fwyzard can you please review it and eventually sign? Thanks.
@rovere this is something you requested to watch as well.
@silviodonato, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 7, 2020

The tests are being triggered in jenkins.
Tested with other pull request(s) #31704

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 8, 2020

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-aa7054/9793/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 8 differences found in the comparisons
  • DQMHistoTests: Total files compared: 35
  • DQMHistoTests: Total histograms compared: 2542225
  • DQMHistoTests: Total failures: 13
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2542190
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 34 files compared)
  • Checked 149 log files, 22 edm output root files, 35 DQM output files

@makortel
Copy link
Contributor

makortel commented Oct 8, 2020

Looks the HeaderConsistency check does not understand CUDA ?

Indeed. On the other hand the problem has already slipped into master, so I would not hold this PR because of that. But we should figure out how deal with that (e.g. should all headers with CUDA code be protected with #ifdefs? if yes, how would that play together with cudaCompat?)

@makortel
Copy link
Contributor

makortel commented Oct 8, 2020

The following packages do not have a category, yet:

CUDADataFormats/StdDictionaries
Please create a PR for https://github.com/cms-sw/cms-bot/blob/master/categories_map.py to assign category

Done in cms-sw/cms-bot#1393

@@ -0,0 +1,14 @@
<lcgdict>
<class name="std::vector<std::byte, cms::cuda::HostAllocator<std::byte, 0>>" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remind me, the plan ẁas to eventually get rid of these, right?

(well, eventually likely HostProduct and HeterogneeousSoA will evolve)

@makortel
Copy link
Contributor

makortel commented Oct 8, 2020

+heterogeneous

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 9, 2020

This pull request is fully signed and it will be integrated in one of the next master IBs (but tests are reportedly failing). This pull request will now be reviewed by the release team before it's merged. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@silviodonato
Copy link
Contributor

+1

@silviodonato
Copy link
Contributor

merge

@cmsbuild cmsbuild merged commit 9d0c9c5 into cms-sw:master Oct 9, 2020
fwyzard added a commit to fwyzard/cms-bot that referenced this pull request Oct 10, 2020
See
[#31703](cms-sw/cmssw#31703) Patatrack integration - common data formats (5/N)
[#31704](cms-sw/cmssw#31704) Patatrack integration - calorimeters shared code (6/N)
[#31719](cms-sw/cmssw#31719) Patatrack integration - ECAL local reconstruction (7/N)
[#31720](cms-sw/cmssw#31720) Patatrack integration - HCAL local reconstruction (8/N)
[#31721](cms-sw/cmssw#31721) Patatrack integration - Pixel local reconstruction (9/N)
[#31722](cms-sw/cmssw#31722) Patatrack integration - Pixel track reconstruction (10/N)
[#31723](cms-sw/cmssw#31723) Patatrack integration - Pixel vertex reconstruction (11/N)
fwyzard added a commit to fwyzard/cms-bot that referenced this pull request Oct 10, 2020
See
  - cms-sw/cmssw#31703: Patatrack integration - common data formats (5/N)
  - cms-sw/cmssw#31704: Patatrack integration - calorimeters shared code (6/N)
  - cms-sw/cmssw#31719: Patatrack integration - ECAL local reconstruction (7/N)
  - cms-sw/cmssw#31720: Patatrack integration - HCAL local reconstruction (8/N)
  - cms-sw/cmssw#31721: Patatrack integration - Pixel local reconstruction (9/N)
  - cms-sw/cmssw#31722: Patatrack integration - Pixel track reconstruction (10/N)
  - cms-sw/cmssw#31723: Patatrack integration - Pixel vertex reconstruction (11/N)
@fwyzard fwyzard deleted the patatrack_integration_5_N_common_dataformats branch December 27, 2020 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants