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

Avoid Ctx API in HIP backend #840

Merged
merged 2 commits into from
Sep 19, 2024
Merged

Conversation

gsitaram
Copy link
Contributor

@gsitaram gsitaram commented Sep 5, 2024

Tested some unit tests and perf_test and they seem to run fine without these API calls on AMD GPUs. Context APIs are now deprecated in newer versions of ROCm, and functionality is satisfied by hipSetDevice() API call. Please review and merge.
cc: @alazzaro

@alazzaro
Copy link
Member

alazzaro commented Sep 6, 2024

@gsitaram thanks for this PR, however I would like to ask you 2 changes:

if (USE_ACCEL MATCHES "hip" AND hip_VERSION GREATER_EQUAL 6.0.0) # Remove deprecated function error with ROCm v6+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=deprecated-declarations")
endif ()

@gsitaram
Copy link
Contributor Author

@alazzaro, why do we need these ctx APIs for any version of ROCm? I would like to avoid those APIs completely. In that case, only unwinding your fixes in #792** would be sufficient, and I have done that now.

@alazzaro
Copy link
Member

@alazzaro, why do we need these ctx APIs for any version of ROCm? I would like to avoid those APIs completely. In that case, only unwinding your fixes in #792** would be sufficient, and I have done that now.

Personally, I have no idea what those functions do. There were there for the AMD backend since ages, so my assumption was that we need them for the Rocm 5.x... Now, if you tell me that we can drop them for all ROCM versions, then I'm fine with that ;)

@alazzaro alazzaro merged commit 12522db into cp2k:develop Sep 19, 2024
22 checks passed
@gsitaram
Copy link
Contributor Author

Thank you, @alazzaro . I think we should be fine. Let me know if you encounter issues that may be related to this.

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.

2 participants