CHIP-SPV / chipStar

chipStar is a tool for compiling and running HIP/CUDA on SPIR-V via OpenCL or Level Zero APIs.
Other
157 stars 27 forks source link

CMake Error for Chipstar Build #869

Closed srihari-karnam closed 3 weeks ago

srihari-karnam commented 3 weeks ago

I am able to build and install llvm_project successfully. But after that chipstar CMake failed.

Below are the instructions I followed: cmake .. \ -DLLVM_CONFIG_BIN=/path/to/llvm-config -DCMAKE_INSTALL_PREFIX=/path/to/install

git clone https://github.com/CHIP-SPV/chipStar.git cd chipStar git submodule update --init --recursive

/usr/bin/ld: /nfs/site/home/karnamsr/local/llvm-17/bin/../lib/LLVMgold.so: error loading plugin: /nfs/site/home/karnamsr/local/llvm-17/bin/../lib/LLVMgold.so: cannot open shared object file: No such file or directory clang++: error: linker command failed with exit code 1 (use -v to see invocation)

pvelesko commented 3 weeks ago

Yeah saw this recently. Does Cmake actually fail to configure? I've seen this error but cmake configure actually passed.

srihari-karnam commented 3 weeks ago

Error is during CMake: $cmake .. -DLLVM_CONFIG_BIN=$HOME/local/llvm-17/bin/llvm-config -DCMAKE_INSTALL_PREFIX=$HOME/local -- Using llvm-config: /nfs/site/home/karnamsr/local/llvm-17/bin/llvm-config -- Using CLANG_ROOT_PATH: /nfs/site/home/karnamsr/local/llvm-17 -- Using LLVM_VERSION: 17.0.0rc -- Using CMAKE_CXX_COMPILER_PATH: /nfs/site/home/karnamsr/local/llvm-17/bin/clang++ -- Using CMAKE_C_COMPILER_PATH: /nfs/site/home/karnamsr/local/llvm-17/bin/clang -- CMAKE_CXX_COMPILER is set to . Overriding with /nfs/site/home/karnamsr/local/llvm-17/bin/clang++ -- CMAKE_C_COMPILER is set to . Overriding with /nfs/site/home/karnamsr/local/llvm-17/bin/clang -- Using llvm-link: /nfs/site/home/karnamsr/local/llvm-17/bin/llvm-link -- Using llvm-spirv: /nfs/site/home/karnamsr/local/llvm-17/bin/llvm-spirv -- Using clang-offload-bundler: /nfs/site/home/karnamsr/local/llvm-17/bin/clang-offload-bundler -- llvm-spirv version: LLVM (http://llvm.org/): LLVM version 17.0.0rc Optimized build.

-- OpenCL_LIBRARY was not set. Searching for libOpenCL.so in LD_LIBRARY_PATH -- Setting OpenCL_DIR to /usr/lib/x86_64-linux-gnu -- LevelZero_LIBRARY was not set. Searching for ze_loader.so in LD_LIBRARY_PATH -- Setting LevelZeroInclude_DIR to /usr/include/level_zero -- Setting LevelZeroLib_DIR to /usr/lib/x86_64-linux-gnu -- OpenCL_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1 -- LevelZero_LIBRARY: /usr/lib/x86_64-linux-gnu/libze_loader.so -- Build type: Release -- Buiding chipStar as a shared library -- Interprocedural optimizations (IPO): NO. To enable IPO with clang you may need to re-configure LLVM/Clang with -DLLVM_BINUTILS_INCDIR for locating plugin-api.h from binutils-dev package. -- IPO error: Change Dir: /scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin

Run Build Command(s):/usr/bin/gmake -f Makefile && /usr/bin/cmake -S/scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/src -B/scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin --check-build-system CMakeFiles/Makefile.cmake 0 /usr/bin/cmake -E cmake_progress_start /scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin/CMakeFiles /scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin//CMakeFiles/progress.marks /usr/bin/gmake -f CMakeFiles/Makefile2 all gmake[1]: Entering directory '/scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin' /usr/bin/gmake -f CMakeFiles/foo.dir/build.make CMakeFiles/foo.dir/depend gmake[2]: Entering directory '/scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin' cd /scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/src /scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/src /scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin /scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin /scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin/CMakeFiles/foo.dir/DependInfo.cmake gmake[2]: Leaving directory '/scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin' /usr/bin/gmake -f CMakeFiles/foo.dir/build.make CMakeFiles/foo.dir/build gmake[2]: Entering directory '/scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin' [ 25%] Building CXX object CMakeFiles/foo.dir/foo.cpp.o /nfs/site/home/karnamsr/local/llvm-17/bin/clang++ -flto=thin -MD -MT CMakeFiles/foo.dir/foo.cpp.o -MF CMakeFiles/foo.dir/foo.cpp.o.d -o CMakeFiles/foo.dir/foo.cpp.o -c /scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/src/foo.cpp [ 50%] Linking CXX static library libfoo.a /usr/bin/cmake -P CMakeFiles/foo.dir/cmake_clean_target.cmake /usr/bin/cmake -E cmake_link_script CMakeFiles/foo.dir/link.txt --verbose=1 "/nfs/site/home/karnamsr/local/llvm-17/bin/llvm-ar" cr libfoo.a CMakeFiles/foo.dir/foo.cpp.o "/nfs/site/home/karnamsr/local/llvm-17/bin/llvm-ranlib" libfoo.a gmake[2]: Leaving directory '/scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin' [ 50%] Built target foo /usr/bin/gmake -f CMakeFiles/boo.dir/build.make CMakeFiles/boo.dir/depend gmake[2]: Entering directory '/scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin' cd /scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/src /scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/src /scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin /scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin /scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin/CMakeFiles/boo.dir/DependInfo.cmake gmake[2]: Leaving directory '/scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin' /usr/bin/gmake -f CMakeFiles/boo.dir/build.make CMakeFiles/boo.dir/build gmake[2]: Entering directory '/scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin' [ 75%] Building CXX object CMakeFiles/boo.dir/main.cpp.o /nfs/site/home/karnamsr/local/llvm-17/bin/clang++ -flto=thin -MD -MT CMakeFiles/boo.dir/main.cpp.o -MF CMakeFiles/boo.dir/main.cpp.o.d -o CMakeFiles/boo.dir/main.cpp.o -c /scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/src/main.cpp [100%] Linking CXX executable boo /usr/bin/cmake -E cmake_link_script CMakeFiles/boo.dir/link.txt --verbose=1 /nfs/site/home/karnamsr/local/llvm-17/bin/clang++ -flto=thin CMakeFiles/boo.dir/main.cpp.o -o boo libfoo.a /usr/bin/ld: /nfs/site/home/karnamsr/local/llvm-17/bin/../lib/LLVMgold.so: error loading plugin: /nfs/site/home/karnamsr/local/llvm-17/bin/../lib/LLVMgold.so: cannot open shared object file: No such file or directory clang++: error: linker command failed with exit code 1 (use -v to see invocation) gmake[2]: [CMakeFiles/boo.dir/build.make:101: boo] Error 1 gmake[2]: Leaving directory '/scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin' gmake[1]: [CMakeFiles/Makefile2:114: CMakeFiles/boo.dir/all] Error 2 gmake[1]: Leaving directory '/scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin' gmake: *** [Makefile:94: all] Error 2

pvelesko commented 3 weeks ago

And cmake aborts after this?

srihari-karnam commented 3 weeks ago

Incomplete configuration, with errors

CMake Error at tests/CMakeLists.txt:12 (add_dependencies): Cannot add target-level dependencies to non-existent target "build_tests".

The add_dependencies works for top-level logical targets created by the add_executable, add_library, or add_custom_target commands. If you want to add file-level dependencies see the DEPENDS option of the add_custom_target and add_custom_command commands. Call Stack (most recent call first): tests/devicelib/CMakeLists.txt:26 (add_hip_test)

CMake Error at tests/CMakeLists.txt:12 (add_dependencies): Cannot add target-level dependencies to non-existent target "build_tests".

The add_dependencies works for top-level logical targets created by the add_executable, add_library, or add_custom_target commands. If you want to add file-level dependencies see the DEPENDS option of the add_custom_target and add_custom_command commands. Call Stack (most recent call first): tests/devicelib/CMakeLists.txt:33 (add_hip_test)

CMake Error at tests/CMakeLists.txt:12 (add_dependencies): Cannot add target-level dependencies to non-existent target "build_tests".

The add_dependencies works for top-level logical targets created by the add_executable, add_library, or add_custom_target commands. If you want to add file-level dependencies see the DEPENDS option of the add_custom_target and add_custom_command commands. Call Stack (most recent call first): tests/fromLibCeed/CMakeLists.txt:26 (add_hip_test)

CMake Error at tests/CMakeLists.txt:12 (add_dependencies): Cannot add target-level dependencies to non-existent target "build_tests".

The add_dependencies works for top-level logical targets created by the add_executable, add_library, or add_custom_target commands. If you want to add file-level dependencies see the DEPENDS option of the add_custom_target and add_custom_command commands. Call Stack (most recent call first): tests/fromLibCeed/CMakeLists.txt:27 (add_hip_test)

CMake Error at tests/CMakeLists.txt:12 (add_dependencies): Cannot add target-level dependencies to non-existent target "build_tests".

The add_dependencies works for top-level logical targets created by the add_executable, add_library, or add_custom_target commands. If you want to add file-level dependencies see the DEPENDS option of the add_custom_target and add_custom_command commands. Call Stack (most recent call first): tests/hiprtc/CMakeLists.txt:26 (add_hip_test)

CMake Error at tests/CMakeLists.txt:12 (add_dependencies): Cannot add target-level dependencies to non-existent target "build_tests".

The add_dependencies works for top-level logical targets created by the add_executable, add_library, or add_custom_target commands. If you want to add file-level dependencies see the DEPENDS option of the add_custom_target and add_custom_command commands. Call Stack (most recent call first): tests/hiprtc/CMakeLists.txt:27 (add_hip_test)

-- MKL_VERSION: 2024.1.0 -- MKL_ROOT: /opt/intel/oneapi/mkl/2024.1 -- MKL_ARCH: intel64 -- MKL_LINK: dynamic -- MKL_INTERFACE_FULL: intel_ilp64 -- MKL_THREADING: sequential -- MKL_MPI: intelmpi -- Found /opt/intel/oneapi/mkl/2024.1/lib/libmkl_scalapack_ilp64.so -- Found /opt/intel/oneapi/mkl/2024.1/lib/libmkl_sycl_blas.so -- Found /opt/intel/oneapi/mkl/2024.1/lib/libmkl_sycl_lapack.so -- Found /opt/intel/oneapi/mkl/2024.1/lib/libmkl_sycl_dft.so -- Found /opt/intel/oneapi/mkl/2024.1/lib/libmkl_sycl_sparse.so -- Found /opt/intel/oneapi/mkl/2024.1/lib/libmkl_sycl_data_fitting.so -- Found /opt/intel/oneapi/mkl/2024.1/lib/libmkl_sycl_rng.so -- Found /opt/intel/oneapi/mkl/2024.1/lib/libmkl_sycl_stats.so -- Found /opt/intel/oneapi/mkl/2024.1/lib/libmkl_sycl_vm.so -- Found /opt/intel/oneapi/mkl/2024.1/lib/libmkl_cdft_core.so -- Found /opt/intel/oneapi/mkl/2024.1/lib/libmkl_intel_ilp64.so -- Found /opt/intel/oneapi/mkl/2024.1/lib/libmkl_sequential.so -- Found /opt/intel/oneapi/mkl/2024.1/lib/libmkl_core.so -- Found /opt/intel/oneapi/mkl/2024.1/lib/libmkl_blacs_intelmpi_ilp64.so -- icpx or MKL not found: Not building SYCL interop samples. -- chipStar Sample test: hipmath hipmath.cc -- chipStar Sample test: hiptest hiptest.cc -- chipStar Sample test: bit_extract bit_extract.cpp -- chipStar Sample test: vadd_hip vadd_hip.cpp -- chipStar Sample test: fp16 haxpy-base.cpp -- chipStar Sample test: fp16_math half_math.cpp -- chipStar Sample test: fp16_half2_math half2_math.cpp -- chipStar Sample test: MatrixTranspose MatrixTranspose.cpp -- chipStar Sample test: MatrixMultiply MatrixMultiply.cpp -- chipStar Sample test: hipEvent hipEvent.cpp -- chipStar Sample test: VecAdd VecAdd.cpp -- chipStar Sample test: sharedMemory sharedMemory.cpp -- chipStar Sample test: shfl shfl.cpp -- chipStar Sample test: broadcast broadcast.cpp -- chipStar Sample test: broadcast2 broadcast2.cpp -- chipStar Sample test: 2dshfl 2dshfl.cpp -- chipStar Sample test: dynamic_shared dynamic_shared.cpp -- chipStar Sample test: hipDynamicShared hipDynamicShared.cpp -- chipStar Sample test: hipDynamicShared2 hipDynamicShared2.cpp -- chipStar Sample test: stream stream.cpp -- chipStar Sample test: unroll unroll.cpp -- chipStar Sample test: memcpy3D main.cpp -- chipStar Sample test: deviceManagement deviceManagement.cpp -- chipStar Sample test: hipStreamSemantics hipStreamSemantics.cc -- chipStar Sample test: hipKernelLaunchIsNonBlocking hipKernelLaunchIsNonBlocking.cc -- chipStar Sample test: hipAddCallback hipAddCallback.cc -- chipStar Sample test: hipMultiThreadAddCallback hipMultiThreadAddCallback.cc -- chipStar Sample test: hipTestDeviceSymbol hipTestDeviceSymbol.cpp -- chipStar Sample test: hipTestConstantDeviceSymbol hipTestConstantDeviceSymbol.cpp -- chipStar Sample test: hipTestSymbolReset hipTestSymbolReset.cc -- chipStar Sample test: hipTestSymbolInit hipTestSymbolInit.cc -- chipStar Sample test: hipTestResetStaticVar hipTestResetStaticVar.cc -- chipStar Sample test: hipTestVariableTemplateSymbols hipTestVariableTemplateSymbols.cc -- chipStar Sample test: BinomialOption BinomialOption.cpp -- chipStar Sample test: BitonicSort BitonicSort.cpp -- chipStar Sample test: DCT DCT.cpp -- chipStar Sample test: dwtHaar1D dwtHaar1D.cpp -- chipStar Sample test: FastWalshTransform FastWalshTransform.cpp -- chipStar Sample test: FloydWarshall FloydWarshall.cpp -- chipStar Sample test: Histogram Histogram.cpp -- chipStar Sample test: RecursiveGaussian RecursiveGaussian.cpp -- chipStar Sample test: SimpleConvolution SimpleConvolution.cpp -- chipStar Sample test: strings strings.cc -- chipStar Sample test: nop_printfs nop_printfs.cc -- chipStar Sample test: dynamic_str_args dynamic_str_args.cc -- chipStar Sample test: clock clock.cc -- chipStar Sample test: graphMatrixMultiply graphMatrixMultiply.cpp -- chipStar Sample test: graph graphs.cpp -- chipStar Sample test: hipComplex hipComplex.cc -- OpenCL is enabled: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1 -- Level Zero is enabled: /usr/lib/x86_64-linux-gnu/libze_loader.so -- Configuring incomplete, errors occurred!

linehill commented 3 weeks ago

The errors in the following part are harmless and doesn't contribute to the configuration error. They are coming from a test that checks if the system has working LTO/IPO. The error messages could be hidden (e.g. redirected to a log file) so the errors aren't chased needlessly.

(...)
-- Interprocedural optimizations (IPO): NO.
To enable IPO with clang you may need to re-configure LLVM/Clang with -DLLVM_BINUTILS_INCDIR for locating plugin-api.h from binutils-dev package.
-- IPO error: Change Dir: /scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin

Run Build Command(s):/usr/bin/gmake -f Makefile && /usr/bin/cmake -S/scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/src -B/scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin/CMakeFiles /scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin//CMakeFiles/progress.marks

(...)

[100%] Linking CXX executable boo
/usr/bin/cmake -E cmake_link_script CMakeFiles/boo.dir/link.txt --verbose=1
/nfs/site/home/karnamsr/local/llvm-17/bin/clang++ -flto=thin CMakeFiles/boo.dir/main.cpp.o -o boo libfoo.a
/usr/bin/ld: /nfs/site/home/karnamsr/local/llvm-17/bin/../lib/LLVMgold.so: error loading plugin: /nfs/site/home/karnamsr/local/llvm-17/bin/../lib/LLVMgold.so: cannot open shared object file: No such file or directory
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [CMakeFiles/boo.dir/build.make:101: boo] Error 1
gmake[2]: Leaving directory '/scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin'
gmake[1]: *** [CMakeFiles/Makefile2:114: CMakeFiles/boo.dir/all] Error 2
gmake[1]: Leaving directory '/scratch/users/karnamsr/chipstar/chipstar_rt/chipStar/build/CMakeFiles/_CMakeLTOTest-CXX/bin'
gmake: *** [Makefile:94: all] Error 2
linehill commented 3 weeks ago

Are there no errors prior this (excluding the LTO/IPO case)?

CMake Error at tests/CMakeLists.txt:12 (add_dependencies):
Cannot add target-level dependencies to non-existent target "build_tests".

The add_dependencies works for top-level logical targets created by the
add_executable, add_library, or add_custom_target commands. If you want to
add file-level dependencies see the DEPENDS option of the add_custom_target
and add_custom_command commands.
Call Stack (most recent call first):
tests/devicelib/CMakeLists.txt:26 (add_hip_test)
(...)

The build_tests target is created by default by the HIP submodule. Did you initialize submodules?

pvelesko commented 3 weeks ago

@srihari-karnam it seems that your issue of cmake failing is not related to IPO but rather something simpler like not initializing submodules as @linehill mentioned.

Either way, please try this https://github.com/CHIP-SPV/chipStar/pull/870 It should enable IPO for you.

srihari-karnam commented 3 weeks ago

Any inputs on this error:

/usr/bin/ld: /scratch/users/karnamsr/chipstar/llvm-17/bin/../lib/LLVMgold.so: error loading plugin: /scratch/users/karnamsr/chipstar/llvm-17/bin/../lib/LLVMgold.so: cannot open shared object file: No such file or directory

pvelesko commented 3 weeks ago

@srihari-karnam did you rebuild LLVM using the PR I gave you?

linehill commented 3 weeks ago

Any inputs on this error:

/usr/bin/ld: /scratch/users/karnamsr/chipstar/llvm-17/bin/../lib/LLVMgold.so: error loading plugin: /scratch/users/karnamsr/chipstar/llvm-17/bin/../lib/LLVMgold.so: cannot open shared object file: No such file or directory

It should go away with #870. Could you try the patch and report progress of the chipStar build? No need to rebuild the LLVM if you prefer not to; the IPO/LTO feature is optional.

srihari-karnam commented 3 weeks ago

First I tried to use the configure_llvm.sh script as per instructions below, but it aborts with error: https://github.com/CHIP-SPV/chipStar#:~:text=chipStar/scripts/configure_llvm.sh%2017%20/opt/install/llvm/17.0%20dynamic%20on

$ chipStar/scripts/configure_llvm.sh 17 /opt/install/llvm/17.0 dynamic on Unknown option 17

pvelesko commented 3 weeks ago

I've reactored the configure tool. Please run it without arguments to see how to use it. I'll update the Readme

Sent from Outlook for iOShttps://aka.ms/o0ukef


From: srihari-karnam @.> Sent: Friday, June 14, 2024 6:04:19 AM To: CHIP-SPV/chipStar @.> Cc: Paulius Velesko @.>; Assign @.> Subject: Re: [CHIP-SPV/chipStar] CMake Error for Chipstar Build (Issue #869)

First I tried to use the configure_llvm.sh script as per instructions below, but it aborts with error: https://github.com/CHIP-SPV/chipStar#:~:text=chipStar/scripts/configure_llvm.sh%2017%20/opt/install/llvm/17.0%20dynamic%20on

$ chipStar/scripts/configure_llvm.sh 17 /opt/install/llvm/17.0 dynamic on Unknown option 17

— Reply to this email directly, view it on GitHubhttps://github.com/CHIP-SPV/chipStar/issues/869#issuecomment-2167126848, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACCJBQOGVJFMGPPQME7IZUTZHJMTHAVCNFSM6AAAAABJEML75KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRXGEZDMOBUHA. You are receiving this because you were assigned.Message ID: @.***>

srihari-karnam commented 3 weeks ago

$ sh configure_llvm.sh --version 17 --install-dir /opt/llvm_new --link-type dynamic --only-necessary-spirv-exts off configure_llvm.sh: 79: [: unexpected operator Cloning into 'llvm-project'... remote: Enumerating objects: 138885, done. remote: Counting objects: 100% (138885/138885), done. remote: Compressing objects: 100% (107015/107015), done. remote: Total 138885 (delta 31095), reused 89466 (delta 27730), pack-reused 0 Receiving objects: 100% (138885/138885), 200.36 MiB | 12.18 MiB/s, done. Resolving deltas: 100% (31095/31095), done. Checking connectivity: 138885, done. Updating files: 100% (132025/132025), done. Cloning into 'SPIRV-LLVM-Translator'... remote: Enumerating objects: 962, done. remote: Counting objects: 100% (962/962), done. remote: Compressing objects: 100% (795/795), done. remote: Total 962 (delta 220), reused 377 (delta 145), pack-reused 0 Receiving objects: 100% (962/962), 1.90 MiB | 10.75 MiB/s, done. Resolving deltas: 100% (220/220), done. Updating files: 100% (867/867), done. plugin-api.h was found at /usr/include/plugin-api.h configure_llvm.sh: 175: [: dynamic: unexpected operator configure_llvm.sh: 188: [: dynamic: unexpected operator Invalid link_type. Must be 'static' or 'dynamic'.

pvelesko commented 3 weeks ago

@srihari-karnam that is a bash script. Please execute it

./configure_llvm.sh

or

bash ./configure_llvm.sh
srihari-karnam commented 3 weeks ago

Thank you. With $./configure_llvm.sh configuration, make , make install is successful $./configure_llvm.sh --version 17 --install-dir /opt/install/llvm_new --link-type dynamic --only-necessary-spirv-exts off $make -j 16 $make install Now I will check Chipstar code

pvelesko commented 3 weeks ago

If you get a cmake configure error, please paste the entire cmake configuration output. I think mostly likely the source of previous errors was incomplete git submodule cloning which could have been caused by two submodules depending on ssh keys rather than https but that was also fixed.

git submodule update --init --recursive
srihari-karnam commented 3 weeks ago

I have changed SSH urls to HTTPS urls for H4I-MKLShim and H4I-HipBLAS. And used CMakelists.txt from #870 PR. Now CMake configuration is successfull.

[submodule "HIP"] path = HIP url = https://github.com/CHIP-SPV/HIP.git [submodule "hip-testsuite"] path = hip-testsuite url = https://github.com/CHIP-SPV/hip-testsuite.git [submodule "bitcode/ROCm-Device-Libs"] path = bitcode/ROCm-Device-Libs url = https://github.com/CHIP-SPV/ROCm-Device-Libs.git [submodule "HIPCC"] path = HIPCC url = https://github.com/CHIP-SPV/HIPCC.git [submodule "hip-tests"] path = hip-tests url = https://github.com/ROCm-Developer-Tools/hip-tests.git [submodule "H4I-MKLShim"] path = H4I-MKLShim url = https://github.com/CHIP-SPV/H4I-MKLShim.git [submodule "H4I-HipBLAS"] path = H4I-HipBLAS url = https://github.com/CHIP-SPV/H4I-HipBLAS.git [submodule "spirv-extractor/SPIRV-Tools"] path = spirv-extractor/SPIRV-Tools url = https://github.com/KhronosGroup/SPIRV-Tools.git

pvelesko commented 3 weeks ago

I have changed SSH urls to HTTPS urls for H4I-MKLShim and H4I-HipBLAS

this change was incorporated into the PR so if you pulled recently it should not have been necessary.

CMake configuration is successfull

Glad to hear it