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

Load Accelerators_cff unconditionally in customizeHLTforPatatrack.py, and clean up GPU/CPU forcing functions #37063

Merged
merged 2 commits into from Feb 27, 2022

Conversation

makortel
Copy link
Contributor

@makortel makortel commented Feb 24, 2022

PR description:

Follow-up to #36699 (comment). Also clean up forceGpuOffload() and resetGpuOffload() functions in favor of process.options.accelerators that was added in #36699.

PR validation:

None

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37063/28514

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @makortel (Matti Kortelainen) for master.

It involves the following packages:

  • HLTrigger/Configuration (hlt)

@cmsbuild, @missirol, @Martin-Grunewald can you please review it and eventually sign? Thanks.
@Martin-Grunewald, @missirol, @silviodonato this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@makortel
Copy link
Contributor Author

I believe with the functionality introduced in #36699 these functions would be unnecessary

# force the SwitchProducerCUDA choice to pick a specific backend: True for offloading to a gpu, False for running on cpu
def forceGpuOffload(status = True):
import HeterogeneousCore.CUDACore.SwitchProducerCUDA
HeterogeneousCore.CUDACore.SwitchProducerCUDA._cuda_enabled_cached = bool(status)
# reset the SwitchProducerCUDA choice to pick a backend depending on the availability of a supported gpu
def resetGpuOffload():
import HeterogeneousCore.CUDACore.SwitchProducerCUDA
HeterogeneousCore.CUDACore.SwitchProducerCUDA._cuda_enabled_cached = None
HeterogeneousCore.CUDACore.SwitchProducerCUDA._switch_cuda()

If you want, I can clean them up in this PR (or leave them up to you).

@fwyzard

@makortel
Copy link
Contributor Author

@cmsbuild, please test

@makortel
Copy link
Contributor Author

enable gpu

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-28b847/22665/summary.html
COMMIT: 4e650d8
CMSSW: CMSSW_12_3_X_2022-02-24-1100/slc7_amd64_gcc10
Additional Tests: GPU
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/37063/22665/install.sh to create a dev area with all the needed externals and cmssw changes.

GPU Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 11 differences found in the comparisons
  • DQMHistoTests: Total files compared: 4
  • DQMHistoTests: Total histograms compared: 19811
  • DQMHistoTests: Total failures: 1627
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 18184
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 3 files compared)
  • Checked 12 log files, 9 edm output root files, 4 DQM output files
  • TriggerResults: found differences in 1 / 3 workflows

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 4001143
  • DQMHistoTests: Total failures: 2
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 4001119
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 204 log files, 45 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@missirol
Copy link
Contributor

@makortel , in #36699 (comment) I see the suggestion was about using Accelerators_cff, while this PR still uses ProcessAcceleratorCUDA_cfi. Right now the two are equivalent, but could you explain a bit please?

@fwyzard
Copy link
Contributor

fwyzard commented Feb 25, 2022

I believe with the functionality introduced in #36699 these functions would be unnecessary

# force the SwitchProducerCUDA choice to pick a specific backend: True for offloading to a gpu, False for running on cpu
def forceGpuOffload(status = True):
import HeterogeneousCore.CUDACore.SwitchProducerCUDA
HeterogeneousCore.CUDACore.SwitchProducerCUDA._cuda_enabled_cached = bool(status)
# reset the SwitchProducerCUDA choice to pick a backend depending on the availability of a supported gpu
def resetGpuOffload():
import HeterogeneousCore.CUDACore.SwitchProducerCUDA
HeterogeneousCore.CUDACore.SwitchProducerCUDA._cuda_enabled_cached = None
HeterogeneousCore.CUDACore.SwitchProducerCUDA._switch_cuda()

Yes, the should be replaced by the use of the new functionality.

If you want, I can clean them up in this PR (or leave them up to you).

Sure, please remove them :-)

@makortel makortel changed the title Load ProcessAcceleratorCUDA_cfi unconditionally in customizeHLTforPatatrack.py Load Accelerators_cff unconditionally in customizeHLTforPatatrack.py, and clean up GPU/CPU forcing functions Feb 25, 2022
@makortel
Copy link
Contributor Author

in #36699 (comment) I see the suggestion was about using Accelerators_cff, while this PR still uses ProcessAcceleratorCUDA_cfi. Right now the two are equivalent, but could you explain a bit please?

Thanks @missirol for catching! I was being sloppy, I changed the load() now to Accelerators_cff.

If you want, I can clean them up in this PR (or leave them up to you).

Sure, please remove them :-)

Done.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37063/28525

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

Pull request #37063 was updated. @cmsbuild, @missirol, @Martin-Grunewald can you please check and sign again.

@missirol
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-28b847/22675/summary.html
COMMIT: d12cf09
CMSSW: CMSSW_12_3_X_2022-02-25-1100/slc7_amd64_gcc10
Additional Tests: GPU
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/37063/22675/install.sh to create a dev area with all the needed externals and cmssw changes.

GPU Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 24 differences found in the comparisons
  • DQMHistoTests: Total files compared: 4
  • DQMHistoTests: Total histograms compared: 19811
  • DQMHistoTests: Total failures: 2106
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 17705
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 3 files compared)
  • Checked 12 log files, 9 edm output root files, 4 DQM output files
  • TriggerResults: no differences found

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 4001143
  • DQMHistoTests: Total failures: 7
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 4001113
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: -0.004 KiB( 48 files compared)
  • DQMHistoSizes: changed ( 312.0 ): -0.004 KiB MessageLogger/Warnings
  • Checked 204 log files, 45 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@missirol
Copy link
Contributor

+hlt

(the many tiny differences in the outputs of wf 11634.506 are a known feature, not related to this PR)

@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. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@qliphy
Copy link
Contributor

qliphy commented Feb 27, 2022

+1

@cmsbuild cmsbuild merged commit bfcbd08 into cms-sw:master Feb 27, 2022
@makortel makortel deleted the hltProcessAccelatorCUDA branch February 28, 2022 14:56
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.

None yet

5 participants