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

HIP build failing with hiprtc related error. #23

Open
jdgh000 opened this issue Nov 5, 2023 · 9 comments
Open

HIP build failing with hiprtc related error. #23

jdgh000 opened this issue Nov 5, 2023 · 9 comments

Comments

@jdgh000
Copy link

jdgh000 commented Nov 5, 2023

Seeing following error during clr build (ROCm5.6.1):
Build command is typical with cmake + cmake params followed by make.

    HIP_CLANG_PATH=$CONFIG_INSTALL_PREFIX/llvm/bin CXX=$CONFIG_INSTALL_PREFIX/llvm/bin/clang++ cmake .. \
        -DCMAKE_CXX_COMPILER=$CONFIG_INSTALL_PREFIX/llvm/bin/clang++ \
        -DCMAKE_PREFIX_PATH=$CONFIG_INSTALL_PREFIX \
        -DClang_DIR=$CONFIG_INSTALL_PREFIX/llvm/lib/cmake/clang/ \
        -DCLR_BUILD_HIP=ON \
        -DHIP_COMMON_DIR=$ROCM_SRC_FOLDER/HIP \
        -DROCCLR_PATH=$ROCM_SRC_FOLDER/clr/rocclr \
        -DHIPCC_BIN_DIR=$ROCM_SRC_FOLDER/HIPCC/bin 
    make -j32

Partial logs:

[100%] Building CXX object hipamd/src/CMakeFiles/amdhip64.dir/hip_vm.cpp.o
[100%] Building CXX object hipamd/src/CMakeFiles/amdhip64.dir/hiprtc/hiprtcComgrHelper.cpp.o
In file included from /home/jd538/ROCm-5.6/clr/hipamd/src/hip_peer.cpp:23:
In file included from /home/jd538/ROCm-5.6/clr/hipamd/src/hip_internal.hpp:28:
/home/jd538/ROCm-5.6/clr/hipamd/src/hip_formatting.hpp:416:10: error: comparison of different enumerati>
    case HIPRTC_JIT_NUM_OPTIONS:
         ^~~~~~~~~~~~~~~~~~~~~~
/home/jd538/ROCm-5.6/clr/hipamd/src/hip_formatting.hpp:413:10: error: comparison of different enumerati>
    case HIPRTC_JIT_FMA:
         ^~~~~~~~~~~~~~
/home/jd538/ROCm-5.6/clr/hipamd/src/hip_formatting.hpp:410:10: error: comparison of different enumerati>
    case HIPRTC_JIT_PREC_SQRT:

@cjatin
Copy link
Contributor

cjatin commented Nov 5, 2023

Can you share commit ids of clr and hip header repo

@jdgh000
Copy link
Author

jdgh000 commented Nov 6, 2023

it does not seem related to particular commit, as I am seeing both 5.6 and 5.7, however I am seeing following commit IDs:
5.6: 73ed8ad
5.7: 1949b16

@cjatin
Copy link
Contributor

cjatin commented Nov 6, 2023

I think this might be the issue.
5.7 headers might have some entries that clr 5.6 might not have.
Ideally the versions (of header and clr) should be the same.

@jdgh000
Copy link
Author

jdgh000 commented Nov 6, 2023

ok, is there a quick fix available? or any build options to circumvent?

@cjatin
Copy link
Contributor

cjatin commented Nov 7, 2023

can you match the versions, so both clr and hip at 5.6 or both at 5.7
and rebuild again

@jdgh000
Copy link
Author

jdgh000 commented Nov 17, 2023

how do i match the version? i dont quite get it. It is all under https://github.com/ROCm-Developer-Tools/clr

@jdgh000
Copy link
Author

jdgh000 commented Dec 5, 2023

any update here???the last instruction/update makes no sense. Whether it is checkout from 5.6 and 5.7, should be able to build right?

@cjatin
Copy link
Contributor

cjatin commented Dec 5, 2023

the idea here is, there are two repo you need to build HIP on AMD platforms (there are several but for our purpose we can ignore them).

It starts with which version of ROCm you have installed.
you can figure it out by doing a cat /opt/rocm/.info/version-dev

You will get a number 5.6 or 5.7

After that you need to checkout the repo
https://github.com/ROCm-Developer-Tools/clr
https://github.com/ROCm-Developer-Tools/hip
to rocm-5.n whatever your ROCm version was installed and then try to build it.

Here clr and hip version needs to match

@cjatin
Copy link
Contributor

cjatin commented Dec 14, 2023

Can you share the output of hipcc --version

Also can you share the output of rocminfo as well

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

No branches or pull requests

2 participants