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 #44712

Merged
merged 4 commits into from
Apr 19, 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.

Remove unnecessary #includes.

PR validation:

None.

@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

cms-bot internal usage

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-44712/39916

@cmsbuild
Copy link
Contributor

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

It involves the following packages:

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

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

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

-1

Failed Tests: Build HeaderConsistency ClangBuild
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-e3f210/38787/summary.html
COMMIT: ecf9609
CMSSW: CMSSW_14_1_X_2024-04-10-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/44712/38787/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:
cp: cannot stat 'tmp/el8_amd64_gcc12/src/HeterogeneousCore/AlpakaInterface/test/alpakaTestIndependentKernelROCmAsync/libalpakaTestIndependentKernelROCmAsync_rocm.a': No such file or directory
Copying tmp/el8_amd64_gcc12/src/HeterogeneousCore/AlpakaInterface/test/alpakaTestKernelROCmAsync/libalpakaTestKernelROCmAsync_rocm.a to productstore area:


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_1_X_2024-04-10-2300
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_1_X_2024-04-10-2300/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


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 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
Copy link
Contributor Author

fwyzard commented Apr 11, 2024

please test

@fwyzard
Copy link
Contributor Author

fwyzard commented Apr 12, 2024

please test

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-44712/39926

@cmsbuild
Copy link
Contributor

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

@fwyzard
Copy link
Contributor Author

fwyzard commented Apr 19, 2024

+heterogeneous

@fwyzard
Copy link
Contributor Author

fwyzard commented Apr 19, 2024

please test

@fwyzard
Copy link
Contributor Author

fwyzard commented Apr 19, 2024

@jfernan2 , since you signed the backport, can you sign this PR too ?

@jfernan2
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs after it passes the integration tests. 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)

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-e3f210/38959/summary.html
COMMIT: 96e176e
CMSSW: CMSSW_14_1_X_2024-04-18-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/44712/38959/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

GPU Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 8 differences found in the comparisons
  • DQMHistoTests: Total files compared: 3
  • DQMHistoTests: Total histograms compared: 39740
  • DQMHistoTests: Total failures: 325
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 39415
  • 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

@rappoccio
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit a216ddf into cms-sw:master Apr 19, 2024
14 checks passed
@fwyzard fwyzard deleted the alpaka_explicit_loop_names_141x branch April 22, 2024 17:43
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

4 participants