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

feat(roctxconnector): link rocprofiler-sdk-roctx as of ROCm 6.2 #278

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

maartenarnst
Copy link
Contributor

@maartenarnst maartenarnst commented Dec 16, 2024

This PR updates the CMake logic for roctxconnector so as to follow AMD's recommendation to link with rocprofiler-sdk-roctx as of ROCm 6.2.

For reference, the recommendation is in the "note" on this webpage:

Note that with this PR, we'll use the "new" rocprofiler-sdk-roctx instead of the "old" one when it is available. Another possibility would be to have an option de determine which one is linked.

# instead of the "old" one provided by roctracer.
#
# See also: https://rocm.docs.amd.com/projects/rocprofiler-sdk/en/amd-mainline/how-to/using-rocprofv3.html
find_package(rocprofiler-sdk-roctx CONFIG PATHS $ENV{ROCM_PATH} PATH_SUFFIXES "lib/cmake/rocprofiler-sdk-roctx")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we specifying PATH_SUFFIXES? I expect that path will be constructed by CMake regardless.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, why do you think we should add ROCM_PATH to the search paths?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. The PATH_SUFFIXES shouldn't be needed indeed. I still have to check for the ROCM_PATH.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just tested the need for the ROCM_PATH. If we don't specify it as a search path, then the package isn't found.

@@ -14,7 +14,11 @@
//
//@HEADER

#include <roctx.h>
#ifdef KP_ROCTXCONNECTOR_HAVE_ROCPROFILER_SDK_ROCTX
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to define our own macro?
Does ROCprofiler-SDK not define anything we could leverage?
Could't we just use an __has_include expression?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. The CMake config provided by rocprofiler-sdk-roctx doesn't seem to set a compiler definition. I've followed your suggestion of using __has_include.

@@ -19,10 +19,10 @@ jobs:
- image: nvidia/cuda:12.2.0-devel-ubuntu22.04
preset: Cuda
compiler: {cpp: g++-12, c: gcc-12}
- image: rocm/dev-ubuntu-22.04:5.4
- image: rocm/dev-ubuntu-22.04:5.7
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we want to bump that version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a habit of removing the oldest version in such a case :) We can keep the 5.4 release too. Just noting that on LUMI (the European supercomputer ~ Frontier), the ROCm 5.4 stack is no longer available.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is available on Frontier, so we should keep it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. No problem. Let's keep 5.4.

@dalg24
Copy link
Member

dalg24 commented Dec 16, 2024

@Rombur plz review

@maartenarnst maartenarnst force-pushed the rocprofiler-sdk-roctx branch 2 times, most recently from e66c4b6 to b588f60 Compare December 16, 2024 15:55
@dalg24 dalg24 merged commit dd08b98 into kokkos:develop Dec 16, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants