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

Add central synchronize configuration parameter to Alpaka modules #47028

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

makortel
Copy link
Contributor

PR description:

Many developers of Alpaka modules add synchronize parameter to call alpaka::wait() at the end of acquire() / produce(). Having such parameter centrally would allow

  • repeating some lines of boilerplate code
  • have such a setting globally set in ProcessAcceleratorAlpaka (similarly to backend)
  • EDMetadata would know at the Event insertion time all async work has finished

This change requires the Alpaka EDModules to pass the edm::ParameterSet to their base classes (this pattern is already required for Alpaka ESProducers). I think the number of Alpaka EDModules is small enough for this change to be feasible, but large enough to not to be done in this PR. Instead this PR allows a migration path (EDModules implicitly calling the default constructor of the base class have their alpaka.synchronize parameter treated as False).

The alpaka.synchronize parameter applies to Alpaka ESProducers as well. I reminded myself that the Alpaka ESProducers are presently still synchronous, so as a follow-up step I'm going to make them asynchronous by default (after which the alpaka.synchronize parameter would have an effect).

The second commit adds an exception with a clear error message if alpaka PSet is tracked. The commit is not strictly related to this PR, but I made the mistake myself while extending the tests.

Resolves cms-sw/framework-team#1115

PR validation:

Unit tests pass.

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 27, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @makortel for master.

It involves the following packages:

  • HeterogeneousCore/AlpakaCore (heterogeneous)
  • HeterogeneousCore/AlpakaTest (heterogeneous)

@cmsbuild, @fwyzard, @makortel can you please review it and eventually sign? Thanks.
@missirol, @rovere this is something you requested to watch as well.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@makortel
Copy link
Contributor Author

enable gpu

@makortel
Copy link
Contributor Author

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 48KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-0e90f0/43603/summary.html
COMMIT: 5469807
CMSSW: CMSSW_15_0_X_2024-12-27-1100/el8_amd64_gcc12
Additional Tests: GPU
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/47028/43603/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 1 lines to the logs
  • Reco comparison results: 2 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3818730
  • DQMHistoTests: Total failures: 452
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3818258
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 214 log files, 184 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

GPU Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 24 differences found in the comparisons
  • DQMHistoTests: Total files compared: 7
  • DQMHistoTests: Total histograms compared: 53071
  • DQMHistoTests: Total failures: 862
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 52209
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 6 files compared)
  • Checked 24 log files, 30 edm output root files, 7 DQM output files
  • TriggerResults: no differences found

@fwyzard
Copy link
Contributor

fwyzard commented Dec 29, 2024

+heterogeneous

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @antoniovilela, @rappoccio, @sextonkennedy, @mandrenguyen (and backports should be raised in the release meeting by the corresponding L2)

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.

Add synchronize parameter to alpaka PSet of Alpaka modules
3 participants