-
Notifications
You must be signed in to change notification settings - Fork 527
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
SWDEV-345870 - Correct HIP path for new directory layout and removed the usage of HSA_PATH in hipcc #3065
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,17 +65,15 @@ find_dependency(amd_comgr) | |
|
||
include( "${CMAKE_CURRENT_LIST_DIR}/hip-lang-targets.cmake" ) | ||
|
||
# From hip-lang config directory, do three level up | ||
get_filename_component(_DIR "${CMAKE_CURRENT_LIST_DIR}" REALPATH) | ||
get_filename_component(_IMPORT_PREFIX "${_DIR}/../../../" REALPATH) | ||
# Find the hip-lang config file path with symlinks resolved | ||
# 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) | ||
|
||
|
||
#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") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 I gave the fix as https://github.com/ROCm-Developer-Tools/HIP/pull/2776/files |
||
find_path(HIP_CLANG_INCLUDE_PATH __clang_cuda_math.h | ||
HINTS ${HIP_CLANG_INCLUDE_SEARCH_PATHS} | ||
${HIP_CLANG_INCLUDE_SEARCH_PATHS_REORG} | ||
NO_DEFAULT_PATH) | ||
get_filename_component(HIP_CLANG_INCLUDE_PATH "${HIP_CLANG_INCLUDE_PATH}" DIRECTORY) | ||
|
||
|
@@ -87,7 +85,6 @@ endif() | |
#if HSA is not under ROCm then provide CMAKE_PREFIX_PATH=<HSA_PATH> | ||
find_path(HSA_HEADER hsa/hsa.h | ||
PATHS | ||
"${_IMPORT_PREFIX}/../include" #FILE_REORG_BACKWARD_COMPATIBILITY | ||
"${_IMPORT_PREFIX}/include" | ||
"${ROCM_PATH}/include" | ||
) | ||
|
There was a problem hiding this comment.
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.
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.
There was a problem hiding this comment.
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