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 HardwareResourcesDescription class #47175

Merged
merged 2 commits into from
Jan 30, 2025

Conversation

makortel
Copy link
Contributor

@makortel makortel commented Jan 24, 2025

PR description:

This PR adds a HardwareResourcesDescription class to hold the "hardware provenance" information (and thus is part of #30044). Given the plan to add the information to ProcessConfiguration by replacing the so-far-pratically-unused


with this information, and to avoid any backwards or forwards compatibility issues, the HardwareResourcesDescription will be serialized to a string. For that purpose this PR adds a "compact string serializer" that serializes a list of std::strings and containers of std::strings into one string. A compact representation is achieved by using non-printable ASCII characters as the delimiters.

A following PR will replace the PassID with the HardwareResourcesDescription in the ProcessConfiguration interface.

Resolves cms-sw/framework-team#1172

PR validation:

Added unit tests work.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 24, 2025

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:

  • DataFormats/Provenance (core)
  • FWCore/Utilities (core)

@Dr15Jones, @cmsbuild, @makortel, @smuzaffar can you please review it and eventually sign? Thanks.
@felicepantaleo, @missirol, @mmusich, @rovere, @wddgit 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

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 40KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ffcf65/43936/summary.html
COMMIT: 875fcb4
CMSSW: CMSSW_15_0_X_2025-01-23-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/47175/43936/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

Copy link
Contributor Author

@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.

From discussion with @Dr15Jones

  • Create a new package FWCore/AbstractServices and move ResourceInformation base class there
    • The new package would depend on DataFormats/Provenance
    • Eventually all other service base classes would be moved to the new package
  • Change ResourceInformation::acceleratorTypes() to hold the contents of process.options.accelerators as strings
    • Despite being "stringly typing", it avoids having to update the code in ResourceInformationService every time we add (or test) a new accelerator type
  • process.options.accelerators schema should be enforced
    • Best schema that can be enforced would be \w+-\w+ accompanied with documentation <type>-<vendor>, with the exception of cpu
    • Check the schema in both python and in ResourceInformationService
    • Python should guarantee the process.options.accelerators is sorted
      • Downstream could then use binary search
  • Add a function hasGpuNvidia() to ResourceInformation

DataFormats/Provenance/interface/ResourcesDescription.h Outdated Show resolved Hide resolved
FWCore/Utilities/interface/compactStringSerializer.h Outdated Show resolved Hide resolved
@cmsbuild
Copy link
Contributor

This class is inteded to deliver the resource information from
ResourceInformation service to ProcessConfiguration.
@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Pull request #47175 was updated. @Dr15Jones, @cmsbuild, @makortel, @smuzaffar can you please check and sign again.

@makortel
Copy link
Contributor Author

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 40KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ffcf65/44045/summary.html
COMMIT: 8cb6597
CMSSW: CMSSW_15_0_X_2025-01-29-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/47175/44045/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

@makortel
Copy link
Contributor Author

I noticed a comparison differences in workflow 17034.0 that must be spurious (as this PR only adds code that is not used outside unit tests). I opened an issue for that #47211 .

@makortel
Copy link
Contributor Author

+core

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

@mandrenguyen
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit e316985 into cms-sw:master Jan 30, 2025
11 checks passed
@makortel makortel deleted the resourceDescription branch January 30, 2025 17:06
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.

Develop HardwareResourcesDescription
4 participants