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

Reorganise alpaka kernel loop functions [14.0.x] #44714

Merged
merged 3 commits into from
Apr 22, 2024

Conversation

fwyzard
Copy link
Contributor

@fwyzard fwyzard commented Apr 11, 2024

PR description:

Reorganise the implementation of the Alpaka-based kernel loop functions.

Rename the implementation classes to CamelCase and move them to the detail namespace:

  • rename uniform_elements_along to detail::UniformElementsAlong
  • rename uniform_groups_along to detail::UniformGroupsAlong
  • rename uniform_group_elements_along to detail::UniformGroupElementsAlong
  • rename uniform_elements_nd to detail::UniformElementsND
  • rename independent_groups_along to detail::IndependentGroupsAlong
  • rename independent_group_elements_along to detail::IndependentGroupElementsAlong

Replace legacy loop names with the more explicit ones, in the cms::alpakatools namespace:

  • replace elements_with_stride(...) with uniform_elements(...)
  • replace blocks_with_stride(...) with uniform_groups(...)
  • replace elements_in_block(...) with uniform_group_elements(...)

Rename legacy function with the new names.

PR validation:

None.

Backport status:

Backport of #44712 to CMSSW 14.0.x.

fwyzard added 2 commits April 3, 2024 23:14
In the cms::alpakatools namespace
  - replace elements_with_stride(...) with uniform_elements(...)
  - replace blocks_with_stride(...) with uniform_groups(...)
  - replace elements_in_block(...) with uniform_group_elements(...)
@fwyzard
Copy link
Contributor Author

fwyzard commented Apr 11, 2024

backport #44712

@fwyzard
Copy link
Contributor Author

fwyzard commented Apr 11, 2024

enable gpu

@fwyzard
Copy link
Contributor Author

fwyzard commented Apr 11, 2024

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 11, 2024

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

It involves the following packages:

  • HeterogeneousCore/AlpakaInterface (heterogeneous)
  • HeterogeneousCore/AlpakaTest (heterogeneous)
  • RecoLocalCalo/EcalRecProducers (reconstruction)
  • RecoParticleFlow/PFClusterProducer (reconstruction)
  • RecoParticleFlow/PFRecHitProducer (reconstruction)

@jfernan2, @fwyzard, @mandrenguyen, @makortel can you please review it and eventually sign? Thanks.
@mmarionncern, @rovere, @wang0jin, @felicepantaleo, @hatakeyamak, @apsallid, @makortel, @missirol, @lgray, @sameasy, @ReyerBand, @argiro, @seemasharmafnal, @rchatter, @thomreis, @youyingli this is something you requested to watch as well.
@sextonkennedy, @antoniovilela, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 11, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

-1

Failed Tests: Build ClangBuild
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-02ae8c/38786/summary.html
COMMIT: 9e26825
CMSSW: CMSSW_14_0_X_2024-04-11-1100/el8_amd64_gcc12
Additional Tests: GPU
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/44714/38786/install.sh to create a dev area with all the needed externals and cmssw changes.

Build

I found compilation error when building:

Copying tmp/el8_amd64_gcc12/src/HeterogeneousCore/AlpakaInterface/test/alpakaTestAtomicPairCounterROCmAsync/libalpakaTestAtomicPairCounterROCmAsync_rocm.a to productstore area:
Copying tmp/el8_amd64_gcc12/src/HeterogeneousCore/AlpakaInterface/test/alpakaTestHistoContainerROCmAsync/libalpakaTestHistoContainerROCmAsync_rocm.a to productstore area:
cp: cannot stat 'tmp/el8_amd64_gcc12/src/HeterogeneousCore/AlpakaInterface/test/alpakaTestAtomicPairCounterROCmAsync/libalpakaTestAtomicPairCounterROCmAsync_rocm.a': No such file or directory
cp: cannot stat 'tmp/el8_amd64_gcc12/src/HeterogeneousCore/AlpakaInterface/test/alpakaTestHistoContainerROCmAsync/libalpakaTestHistoContainerROCmAsync_rocm.a': No such file or directory
>> Deleted: tmp/el8_amd64_gcc12/src/HeterogeneousCore/AlpakaInterface/test/alpakaTestAtomicPairCounterROCmAsync/libalpakaTestAtomicPairCounterROCmAsync_rocm.a
gmake: *** [config/SCRAM/GMake/Makefile.rules:1838: tmp/el8_amd64_gcc12/src/HeterogeneousCore/AlpakaInterface/test/alpakaTestAtomicPairCounterROCmAsync/libalpakaTestAtomicPairCounterROCmAsync_rocm.a] Error 1
>> Deleted: tmp/el8_amd64_gcc12/src/HeterogeneousCore/AlpakaInterface/test/alpakaTestHistoContainerROCmAsync/libalpakaTestHistoContainerROCmAsync_rocm.a
gmake: *** [config/SCRAM/GMake/Makefile.rules:1838: tmp/el8_amd64_gcc12/src/HeterogeneousCore/AlpakaInterface/test/alpakaTestHistoContainerROCmAsync/libalpakaTestHistoContainerROCmAsync_rocm.a] Error 1
Copying tmp/el8_amd64_gcc12/src/HeterogeneousCore/AlpakaInterface/test/alpakaTestIndependentKernelROCmAsync/libalpakaTestIndependentKernelROCmAsync_rocm.a to productstore area:
Copying tmp/el8_amd64_gcc12/src/HeterogeneousCore/AlpakaInterface/test/alpakaTestKernelROCmAsync/libalpakaTestKernelROCmAsync_rocm.a to productstore area:
cp: cannot stat 'tmp/el8_amd64_gcc12/src/HeterogeneousCore/AlpakaInterface/test/alpakaTestIndependentKernelROCmAsync/libalpakaTestIndependentKernelROCmAsync_rocm.a': No such file or directory


Clang Build

I found compilation error while trying to compile with clang. Command used:

USER_CUDA_FLAGS='--expt-relaxed-constexpr' USER_CXXFLAGS='-Wno-register -fsyntax-only' scram build -k -j 32 COMPILER='llvm compile'

>> Entering Package HeterogeneousCore/AlpakaTest
>> Entering Package RecoLocalCalo/EcalRecProducers
>> Entering Package RecoParticleFlow/PFClusterProducer
>> Entering Package RecoParticleFlow/PFRecHitProducer
>> Compile sequence completed for CMSSW CMSSW_14_0_X_2024-04-11-1100
gmake: *** [There are compilation/build errors. Please see the detail log above.] Error 1
+ eval scram build outputlog '&&' '(python3' /data/cmsbld/jenkins/workspace/ib-run-pr-tests/cms-bot/buildLogAnalyzer.py --logDir /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_14_0_X_2024-04-11-1100/tmp/el8_amd64_gcc12/cache/log/src '||' 'true)'
++ scram build outputlog
>> Entering Package HeterogeneousCore/AlpakaInterface
Entering library rule at HeterogeneousCore/AlpakaInterface
>> Compiling  src/HeterogeneousCore/AlpakaInterface/src/Backend.cc


Rename classes to CamelCase and move them to the detail namespace:
  - uniform_elements_along to detail::UniformElementsAlong
  - uniform_groups_along to detail::UniformGroupsAlong
  - uniform_group_elements_along to detail::UniformGroupElementsAlong
  - uniform_elements_nd to detail::UniformElementsND
  - independent_groups_along to detail::IndependentGroupsAlong
  - independent_group_elements_along to detail::IndependentGroupElementsAlong

Introduce helper functions with the old names.
@fwyzard fwyzard force-pushed the alpaka_explicit_loop_names_140x branch from 9e26825 to 4442472 Compare April 11, 2024 22:25
@cmsbuild
Copy link
Contributor

Pull request #44714 was updated. @mandrenguyen, @makortel, @cmsbuild, @jfernan2, @fwyzard can you please check and sign again.

@fwyzard
Copy link
Contributor Author

fwyzard commented Apr 11, 2024

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-02ae8c/38799/summary.html
COMMIT: 4442472
CMSSW: CMSSW_14_0_X_2024-04-11-2300/el8_amd64_gcc12
Additional Tests: GPU
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/44714/38799/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 86 lines to the logs
  • Reco comparison results: 40 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3308451
  • DQMHistoTests: Total failures: 3
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3308428
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 47 files compared)
  • Checked 202 log files, 165 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

GPU Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 3
  • DQMHistoTests: Total histograms compared: 39740
  • DQMHistoTests: Total failures: 20
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 39720
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 2 files compared)
  • Checked 8 log files, 10 edm output root files, 3 DQM output files
  • TriggerResults: no differences found

@jfernan2
Copy link
Contributor

+1

@fwyzard
Copy link
Contributor Author

fwyzard commented Apr 19, 2024

+heterogeneous

@cmsbuild
Copy link
Contributor

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

@fwyzard
Copy link
Contributor Author

fwyzard commented Apr 22, 2024

@cms-sw/orp-l2 could you merge this for the next CMSSW 14.0.x release ?

@rappoccio
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit c176f86 into cms-sw:CMSSW_14_0_X Apr 22, 2024
13 checks passed
@fwyzard fwyzard deleted the alpaka_explicit_loop_names_140x branch June 13, 2024 18:59
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