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

SWDEV-345870 - Correct HIP path for new directory layout and removed the usage of HSA_PATH in hipcc #3065

Merged
merged 1 commit into from
Nov 24, 2022

Conversation

rocm-ci
Copy link
Collaborator

@rocm-ci rocm-ci commented Nov 9, 2022

With file reorganization, HIP installed in /opt/rocm-ver
Use the install path rather than using backward compatible path.
HSA_PATH is not at all required in hipcc and removed the same

Change-Id: Ia461cb4da2c0e0967703033f5c2c79b67732f5b5

…the usage of HSA_PATH in hipcc

With file reorganization, HIP installed in /opt/rocm-ver
Use the install path rather than using backward compatible path.
HSA_PATH is not at all required in hipcc and removed the same

Change-Id: Ia461cb4da2c0e0967703033f5c2c79b67732f5b5
@mangupta mangupta merged commit 3884323 into ROCm:develop Nov 24, 2022
Copy link

@ye-luo ye-luo left a comment

Choose a reason for hiding this comment

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

This PR causes regression.
Please look at #2776
and apply a proper fix.

# RealPath: /opt/rocm-ver/lib/cmake/hip-lang/hip-lang-config.cmake
# Go 4 level up to get IMPORT PREFIX
get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" REALPATH)
get_filename_component(_IMPORT_PREFIX "${_DIR}/../../../../" ABSOLUTE)
Copy link

@ye-luo ye-luo Nov 28, 2022

Choose a reason for hiding this comment

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

This is what I found.

CMAKE_CURRENT_LIST_FILE: /opt/rocm-ver/lib/cmake/hip-lang/hip-lang-config.cmake
_DIR: /opt/rocm-ver/lib/cmake/hip-lang/hip-lang-config.cmake
_IMPORT_PREFIX: /opt/rocm-ver

It seems giving the desired _IMPORT_PREFIX value.
_DIR is no more a directory and "${_DIR}/../../../../" seems very strange to me.
Not clear to me why this is better than the old working lines.

Copy link
Contributor

@raramakr raramakr Dec 16, 2022

Choose a reason for hiding this comment

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

In the hip-runtime-amd package , the hip-lang-config.cmake is there in

/opt/rocm-ver/lib/cmake/hip-lang/hip-lang-config.cmake # actual file
/opt/rocm-ver/hip/lib/cmake/hip-lang/hip-lang-config.cmake # Soft link file for backward compatibility

The directory /opt/rocm-ver/hip/lib/cmake/hip-lang is not a soft link, but file is soft link
With the previous code, the _IMPORT_PREFIX may become /opt/rocm-ver/hip if run from backward compatibility path.

Agree that _DIR is now no more a directory. Will update the variable name

#need _IMPORT_PREFIX to be set #FILE_REORG_BACKWARD_COMPATIBILITY
file(GLOB HIP_CLANG_INCLUDE_SEARCH_PATHS "${_IMPORT_PREFIX}/../llvm/lib/clang/*/include")
file(GLOB HIP_CLANG_INCLUDE_SEARCH_PATHS_REORG "${_IMPORT_PREFIX}/llvm/lib/clang/*/include")
file(GLOB HIP_CLANG_INCLUDE_SEARCH_PATHS "${_IMPORT_PREFIX}/llvm/lib/clang/*/include")
Copy link

Choose a reason for hiding this comment

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

@gregrodgers This is what I mentioned about hip-lang never done properly. The hard coded llvm on the path clearly choked aomp. The correct way should locate the clang header files inlcude path based on the compiler not the full rocm root. This is actually done correctly below using HIP_COMPILER_INSTALL_PATH for CLANG_RT.

I gave the fix as https://github.com/ROCm-Developer-Tools/HIP/pull/2776/files
But the upstream keeps doing wrong and even worse.

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.

None yet

4 participants