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

Add tracer annotations to HIP code in ReSolve #134

Merged
merged 6 commits into from
Jan 23, 2024
Merged

Conversation

pelesh
Copy link
Collaborator

@pelesh pelesh commented Jan 22, 2024

Add some generic support for building ReSolve with profiling annotations and implement ROC Tracer annotations for HIP-based code in ReSolve. This is based on no-splitlu-exp-roctx branch by @PaulMullowney.

This will allow us to add in a straightforward manner annotations for CUDA (and other) profilers in the future.

Note that ROC Tracer does not provide CMake targets (see roctracer issue 56), so the CMake configuration for it looks like a hack.

Closes #68.

# The assumption is roctracer lib and headers are installed at the same
# place as the rest of ROCm.
target_link_libraries(ReSolve PUBLIC "-lroctracer64 -lroctx64")
elseif(RESOLVE_USE_CUDA)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd suggest throwing a warning or error here to notify the user that profiling is currently only support with roctx.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I believe 918a794 addresses this comment.

Copy link
Collaborator

Choose a reason for hiding this comment

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

cc #63

# The assumption is roctracer lib and headers are installed at the same
# place as the rest of ROCm.
target_link_libraries(ReSolve PUBLIC "-lroctracer64 -lroctx64")
elseif(RESOLVE_USE_CUDA)
Copy link
Collaborator

Choose a reason for hiding this comment

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

cc #63

Comment on lines +153 to +154
message(NOTICE "Profiling support enabled, but Re::Solve does not create tracer annotations for host code.")
message(NOTICE "This profiling support option will have no effect.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could support this with a different profiling tool like caliper/tau... At the same time, I don't see why we couldn't use ROCm/CUDA profilers to view host code performance as well, albeit that would require a hack + messy CMake

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You are right, we can, it is just that I didn't do it in this PR. Probably the message should say "tracer annotation not implemented for ...".

@pelesh pelesh merged commit 90f5ff8 into develop Jan 23, 2024
6 checks passed
@pelesh pelesh deleted the roctracer-dev branch February 21, 2024 15:35
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.

Add roctx support
5 participants