ROCm/hipBLASLt

[Issue]: build failed with ./install.sh -cd

Closed this issue · 1 comments

Problem Description

Invoked install.sh with -cd (dependency + client):

itch]
125 | switch(type)
| ^~~~
1 warning generated when compiling for gfx942.
In file included from /home/noroot/hipBLASLt/clients/gtest/matmul_gtest.cpp:26:
In file included from /home/noroot/hipBLASLt/clients/gtest/../include/hipblaslt_data.hpp:29:
In file included from /home/noroot/hipBLASLt/clients/gtest/../include/hipblaslt_arguments.hpp:29:
In file included from /home/noroot/hipBLASLt/clients/gtest/../include/hipblaslt_datatype2string.hpp:29:
/home/noroot/hipBLASLt/clients/gtest/../../library/src/include/auxiliary.hpp:125:12: warning: 6 enumeration values not handled in switch: 'HIPBLAS_COMPUTE_16F', 'HIPBLAS_COMPUTE_16F_PEDANTIC', 'HIPBLAS_COMPUTE_32F_PEDANTIC'... [-Wswitch]
125 | switch(type)
| ^~~~
1 warning generated when compiling for host.
[ 98%] Linking CXX executable ../staging/hipblaslt-bench
cd /home/noroot/hipBLASLt/build/release/clients/benchmarks && /usr/bin/cmake -E cmake_link_script CMakeFiles/hipblaslt-bench.dir/link.txt --verbose=1
/opt/rocm/bin/hipcc -D__HIP_HCC_COMPAT_MODE__=1 -O3 -DNDEBUG "CMakeFiles/hipblaslt-bench.dir/client.cpp.o" "CMakeFiles/hipblaslt-bench.dir//common/singletons.cpp.o" "CMakeFiles/hipblaslt-bench.dir//common/utility.cpp.o" "CMakeFiles/hipblaslt-bench.dir//common/cblas_interface.cpp.o" "CMakeFiles/hipblaslt-bench.dir//common/argument_model.cpp.o" "CMakeFiles/hipblaslt-bench.dir//common/hipblaslt_parse_data.cpp.o" "CMakeFiles/hipblaslt-bench.dir//common/hipblaslt_arguments.cpp.o" "CMakeFiles/hipblaslt-bench.dir//common/hipblaslt_random.cpp.o" -o ../staging/hipblaslt-bench -Wl,-rpath,/home/noroot/hipBLASLt/build/release/library:/opt/rocm-6.1.0/lib/llvm/lib: /usr/local/lib64/libblas.a ../../library/libhipblaslt.so.0.6 /usr/local/lib64/liblapack.a /usr/local/lib64/libcblas.a -L/opt/rocm/llvm/lib -Wl,-rpath=/opt/rocm/llvm/lib -lm -lstdc++fs -lgfortran -lflang -lflangrti /opt/rocm/lib/libamdhip64.so.6.1.60100 /opt/rocm-6.1.0/lib/llvm/lib/clang/17/lib/linux/libclang_rt.builtins-x86_64.a --hip-link --offload-arch=gfx90a:xnack+ --offload-arch=gfx90a:xnack- --offload-arch=gfx940 --offload-arch=gfx941 --offload-arch=gfx942 /usr/local/lib64/libblas.a /opt/rocm-6.1.0/lib/llvm/lib/libomp.so /usr/lib64/libpthread.a -lgcc -lgcc
/usr/bin/ld: /usr/local/lib64/liblapack.a(dlange.f.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: /usr/local/lib64/libcblas.a(cblas_sgemm.c.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/local/lib64/libcblas.a(cblas_xerbla.c.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: /usr/local/lib64/libcblas.a(cblas_dgemm.c.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/local/lib64/libblas.a(sgemm.f.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: /usr/local/lib64/libblas.a(dgemm.f.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/local/lib64/libblas.a(xerbla.f.o): relocation R_X86_64_32S against .rodata.str1.8' can not be used when making a PIE object; recompile with -fPIE clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [clients/benchmarks/CMakeFiles/hipblaslt-bench.dir/build.make:218: clients/staging/hipblaslt-bench] Error 1 make[2]: Leaving directory '/home/noroot/hipBLASLt/build/release' make[1]: *** [CMakeFiles/Makefile2:595: clients/benchmarks/CMakeFiles/hipblaslt-bench.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... 1 warning generated when compiling for host. [100%] Linking CXX executable ../staging/hipblaslt-test cd /home/noroot/hipBLASLt/build/release/clients/gtest && /usr/bin/cmake -E cmake_link_script CMakeFiles/hipblaslt-test.dir/link.txt --verbose=1 /opt/rocm/bin/hipcc -D__HIP_HCC_COMPAT_MODE
=1 -O3 -DNDEBUG "CMakeFiles/hipblaslt-test.dir/hipblaslt_gtest_main.cpp.o" "CMakeFiles/hipblaslt-test.dir/hipblaslt_test.cpp.o" "CMakeFiles/hipblaslt-test.dir/matmul_gtest.cpp.o" "CMakeFiles/hipblaslt-test.dir/auxiliary_gtest.cpp.o" "CMakeFiles/hipblaslt-test.dir/matrix_transform_gtest.cpp.o" "CMakeFiles/hipblaslt-test.dir/hipblaslt_gtest_ext_op.cpp.o" "CMakeFiles/hipblaslt-test.dir//common/singletons.cpp.o" "CMakeFiles/hipblaslt-test.dir//common/utility.cpp.o" "CMakeFiles/hipblaslt-test.dir//common/cblas_interface.cpp.o" "CMakeFiles/hipblaslt-test.dir//common/argument_model.cpp.o" "CMakeFiles/hipblaslt-test.dir//common/hipblaslt_parse_data.cpp.o" "CMakeFiles/hipblaslt-test.dir//common/hipblaslt_arguments.cpp.o" "CMakeFiles/hipblaslt-test.dir/__/common/hipblaslt_random.cpp.o" -o ../staging/hipblaslt-test -Wl,-rpath,/home/noroot/hipBLASLt/build/release/library:/opt/rocm-6.1.0/lib/llvm/lib: /usr/local/lib64/libblas.a /usr/local/lib64/libgtest.a /usr/local/lib64/libgtest_main.a ../../library/libhipblaslt.so.0.6 /usr/local/lib64/liblapack.a /usr/local/lib64/libcblas.a -L/opt/rocm/llvm/lib -Wl,-rpath=/opt/rocm/llvm/lib -lm -lstdc++fs -lgfortran -lflang -lflangrti /usr/local/lib64/libgtest.a /opt/rocm/lib/libamdhip64.so.6.1.60100 /opt/rocm-6.1.0/lib/llvm/lib/clang/17/lib/linux/libclang_rt.builtins-x86_64.a --hip-link --offload-arch=gfx90a:xnack+ --offload-arch=gfx90a:xnack- --offload-arch=gfx940 --offload-arch=gfx941 --offload-arch=gfx942 /usr/local/lib64/libblas.a /opt/rocm-6.1.0/lib/llvm/lib/libomp.so /usr/lib64/libpthread.a -lgcc -lgcc /usr/bin/ld: /usr/local/lib64/libgtest.a(gtest-all.cc.o): relocation R_X86_64_32 against .rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/local/lib64/liblapack.a(dlange.f.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: /usr/local/lib64/libcblas.a(cblas_sgemm.c.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/local/lib64/libcblas.a(cblas_xerbla.c.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: /usr/local/lib64/libcblas.a(cblas_dgemm.c.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/local/lib64/libblas.a(sgemm.f.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: /usr/local/lib64/libblas.a(dgemm.f.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/local/lib64/libblas.a(xerbla.f.o): relocation R_X86_64_32S against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIE
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [clients/gtest/CMakeFiles/hipblaslt-test.dir/build.make:301: clients/staging/hipblaslt-test] Error 1
make[2]: Leaving directory '/home/noroot/hipBLASLt/build/release'
make[1]: *** [CMakeFiles/Makefile2:727: clients/gtest/CMakeFiles/hipblaslt-test.dir/all] Error 2
make[1]: Leaving directory '/home/noroot/hipBLASLt/build/release'
make: *** [Makefile:166: all] Error 2
[root@localhost hipBLASLt]# cat log/install.cd.6.0.log | grep -i error
-- Installing: /usr/local/include/msgpack/preprocessor/debug/error.hpp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [clients/benchmarks/CMakeFiles/hipblaslt-bench.dir/build.make:218: clients/staging/hipblaslt-bench] Error 1
make[1]: *** [CMakeFiles/Makefile2:595: clients/benchmarks/CMakeFiles/hipblaslt-bench.dir/all] Error 2
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [clients/gtest/CMakeFiles/hipblaslt-test.dir/build.make:301: clients/staging/hipblaslt-test] Error 1
make[1]: *** [CMakeFiles/Makefile2:727: clients/gtest/CMakeFiles/hipblaslt-test.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
[root@localhost hipBLASLt]# cat log/install.cd.6.0.log | grep -i error | less

Operating System

ubuntu 22.04

CPU

Intel

GPU

AMD Instinct MI100

Other

No response

ROCm Version

ROCm 5.7.1

ROCm Component

hipBLASLt

Steps to Reproduce

./install.sh -cd.
checked out both rocm-rel-6.0 and rocm-rel-6.1 under both branches it fails.

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

@jdgh000 you should use rocm6.1 environment. Btw, hipblaslt doesn't support MI100 yet.