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 a zeroInitialise() method to portable objects and collections #45861

Merged
merged 2 commits into from
Sep 8, 2024

Conversation

fwyzard
Copy link
Contributor

@fwyzard fwyzard commented Sep 2, 2024

PR description:

Add a zeroInitialise() method to the PortableObject and PortableCollection templates that erases the data in the Buffer by writing zeros (bytes containing '\0') to it:

  • on the host, zeroInitialise() can be called without arguments to execute immediately, or with a queue to be run asynchronously;

  • on the device, zeroInitialise() requires a queue and can only be run asynchronously.

Extend the tests in DataFormats/PortableTestObjects and HeterogeneousCore/AlpakaTest to validate the new functionality.

PR validation:

The update unit tests pass on CPU and NVIDIA GPUs.

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 2, 2024

cms-bot internal usage

@fwyzard fwyzard changed the title git log -n2Portable collection zero memory Add an erase() method to the Portable objects and collections Sep 2, 2024
@fwyzard fwyzard force-pushed the PortableCollection_zero_memory branch from 5904f72 to 2c4f848 Compare September 2, 2024 15:26
@fwyzard
Copy link
Contributor Author

fwyzard commented Sep 2, 2024

enable gpu

@fwyzard
Copy link
Contributor Author

fwyzard commented Sep 2, 2024

please test

@fwyzard
Copy link
Contributor Author

fwyzard commented Sep 2, 2024

@makortel could you review this ?

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 2, 2024

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45861/41602

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 2, 2024

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

It involves the following packages:

  • DataFormats/Portable (heterogeneous)
  • DataFormats/PortableTestObjects (heterogeneous)
  • HeterogeneousCore/AlpakaTest (heterogeneous)

@fwyzard, @makortel can you please review it and eventually sign? Thanks.
@makortel, @missirol, @mmusich, @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

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 2, 2024

+1

Size: This PR adds an extra 32KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-32f48a/41229/summary.html
COMMIT: 2c4f848
CMSSW: CMSSW_14_2_X_2024-09-02-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/45861/41229/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially removed 3 lines from the logs
  • Reco comparison results: 6 differences found in the comparisons
  • DQMHistoTests: Total files compared: 44
  • DQMHistoTests: Total histograms compared: 3328315
  • DQMHistoTests: Total failures: 3
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3328292
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 43 files compared)
  • Checked 193 log files, 163 edm output root files, 44 DQM output files
  • TriggerResults: no differences found

GPU Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 1 differences found in the comparisons
  • DQMHistoTests: Total files compared: 6
  • DQMHistoTests: Total histograms compared: 37044
  • DQMHistoTests: Total failures: 665
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 36379
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 5 files compared)
  • Checked 20 log files, 25 edm output root files, 6 DQM output files
  • TriggerResults: no differences found

@fwyzard fwyzard force-pushed the PortableCollection_zero_memory branch from 2c4f848 to 4f051dd Compare September 4, 2024 05:56
@fwyzard fwyzard changed the title Add an erase() method to the Portable objects and collections Add a method to zeroInitialise() Portable objects and collections Sep 4, 2024
@fwyzard fwyzard changed the title Add a method to zeroInitialise() Portable objects and collections Add a zeroInitialise() method to portable objects and collections Sep 4, 2024
@fwyzard
Copy link
Contributor Author

fwyzard commented Sep 4, 2024

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 4, 2024

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45861/41623

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@fwyzard
Copy link
Contributor Author

fwyzard commented Sep 4, 2024

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 4, 2024

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45861/41624

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 4, 2024

Pull request #45861 was updated. @fwyzard, @makortel can you please check and sign again.

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 4, 2024

+1

Size: This PR adds an extra 28KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-32f48a/41268/summary.html
COMMIT: 146b187
CMSSW: CMSSW_14_2_X_2024-09-03-2300/el8_amd64_gcc12
Additional Tests: GPU
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/45861/41268/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 15 differences found in the comparisons
  • DQMHistoTests: Total files compared: 44
  • DQMHistoTests: Total histograms compared: 3328501
  • DQMHistoTests: Total failures: 17
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3328464
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 43 files compared)
  • Checked 193 log files, 163 edm output root files, 44 DQM output files
  • TriggerResults: no differences found

GPU Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 1 differences found in the comparisons
  • DQMHistoTests: Total files compared: 6
  • DQMHistoTests: Total histograms compared: 37044
  • DQMHistoTests: Total failures: 665
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 36379
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 5 files compared)
  • Checked 20 log files, 25 edm output root files, 6 DQM output files
  • TriggerResults: no differences found

Copy link
Contributor

@makortel makortel left a comment

Choose a reason for hiding this comment

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

Looks good to me

@@ -70,6 +70,12 @@ class PortableDeviceCollection {
ConstBuffer buffer() const { return *buffer_; }
ConstBuffer const_buffer() const { return *buffer_; }

// erases the data in the Buffer by writing zeros (bytes containing '\0') to it
template <typename TQueue, typename = std::enable_if_t<alpaka::isQueue<TQueue>>>
void zeroInitialise(TQueue&& queue) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not for this PR, but should the constructor overload(s) be updated to use forwarding reference for the TDev and TQueue?

@fwyzard
Copy link
Contributor Author

fwyzard commented Sep 7, 2024

+heterogeneous

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 7, 2024

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. @rappoccio, @mandrenguyen, @sextonkennedy, @antoniovilela (and backports should be raised in the release meeting by the corresponding L2)

@mandrenguyen
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 82dc60c into cms-sw:master Sep 8, 2024
14 checks passed
@fwyzard fwyzard mentioned this pull request Sep 9, 2024
3 tasks
@fwyzard fwyzard deleted the PortableCollection_zero_memory branch September 13, 2024 16:07
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.

4 participants