Skip to content

Enable compatibility with projects using HIP language #443

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

Closed
wants to merge 2 commits into from

Conversation

lawruble13
Copy link
Collaborator

Previously if a project tried to include rocRAND via add_subdirectory, but was using the HIP language provided by CMake, this would fail (see rocThrust issue #238). This PR should enable rocRAND to be used in this fashion.

if( CMAKE_CXX_COMPILER MATCHES ".*/hipcc$" )
execute_process(COMMAND ${CMAKE_CXX_COMPILER} "--help"
OUTPUT_VARIABLE CXX_OUTPUT
if( CMAKE_${ROCRAND_LANG}_COMPILER MATCHES ".*/hipcc$" )
Copy link
Contributor

Choose a reason for hiding this comment

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

hipcc cannot be used as the HIP language compiler.

Comment on lines +61 to +62
get_property(ENABLED_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
if(HIP IN_LIST ENABLED_LANGUAGES)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we maybe just finish up #266 and suggest that users to set -DROCRAND_CMAKE_HIP_LANGUAGE=ON?

@haampie
Copy link

haampie commented Mar 27, 2025

It would be good to fix this or #266.

In the Spack package manager we're improving hip support by modeling it as a language, but I'm somewhat surprised that 4 years after CMake started support hip as a language, AMD's own packages do not use it 🤔

@jayhawk-commits
Copy link
Contributor

This pull request has merge conflicts that need to be resolved before I can automatically import this to the monorepo.

@lawruble13
Copy link
Collaborator Author

Ditto Cory's comments on #266, this is still a desirable feature but this PR is very out of date and should probably be redone in its entirety.

@lawruble13 lawruble13 closed this May 28, 2025
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.

5 participants