LLNL / variorum

Vendor-neutral library for exposing power and performance features across diverse architectures
https://variorum.readthedocs.io
MIT License
67 stars 26 forks source link

Fix compatibility with ROCm < 6.0.0 #555

Closed masterleinad closed 3 months ago

masterleinad commented 3 months ago

Description

Frontier currently only has rocm/6.0.0 which is unusable because of https://github.com/ROCm/ROCm/issues/2752. https://github.com/LLNL/variorum/commit/192a58d4a47dc87354acdb0dc629a9e316822429 switched to the interface for ROCm 6.0.0 and higher while commenting the necessary code for earlier versions. This pull request restores the compatibility by checking for ROCM_VERSION_MAJOR.

Fixes #513.

Type of change

How Has This Been Tested?

Running the tests on Frontier with rocm-5.7.1.

Test before merge:

Checklist:

tpatki commented 3 months ago

@masterleinad Can you check the build at your end again?

We're setting ROCM_DIR and all include paths are with respect to that. I had to prefix a rocm-core/ to the rocm_version.h for it to get picked up correctly as it is under the include/rocm-core folder.

Are you creating host-configs are your end similar to this one from Tioga, for example? If so, could you commit the Frontier host config as well, so other Frontier users can reproduce your build?