MIVisionX icon indicating copy to clipboard operation
MIVisionX copied to clipboard

SPACK -- AMD RPP & rocAL: not found warning

Open srekolam opened this issue 1 year ago • 6 comments

This is regarding building the mivisionx in spack. When tried with 5.2.0 sources, with both the backend=HIP and backend=OPENCL,i am seeing the below in the build log.

NOTE: FindAMDRPP failed to find -- amd_rpp -- NOTE: FindTurboJpeg failed to find -- turbojpeg -- hip::amdhip64 is SHARED_LIBRARY -- Found HIP for rocAL: 5.2.0/spack/opt/spack/linux-centos8-skylake_avx512/gcc-8.4.1/hip-5.2.0-gbvm654apxooprnk632rbcgxais2aafs -- NOTE: rocAL library requires AMD's rpp library, Not Found -- NOTE: rocAL library requires TurboJpeg, Not Found

while the build for 5.2.0 is successful, it would help if there are better instructions provided for building amd rpp and the rocAL modules. mivisionx_5.2.0_backend_HIP_build_out.txt mivisionx_5.2.0_backend_OPENCL_build_out.txt

srekolam avatar Aug 01 '22 19:08 srekolam

@srekolam to build the full stack MIVisionX you can use TOT setup script to setup all the dependency requirements.

  • HIP
python MIVisionX/MIVisionX-setup.py --reinstall yes --ffmpeg yes
  • OpenCL
python MIVisionX/MIVisionX-setup.py --reinstall yes --ffmpeg yes --backend OCL

You can not built and install both backends on the same machine. You can either choose HIP or OpenCL. HIP is the default flow.

Let me know if this works.

kiritigowda avatar Aug 04 '22 22:08 kiritigowda

Tried the rpp "0.96" version building through Spack.. I see some issues ..

  1. ${ROCM_PATH}/${CMAKE_INSTALL_BINDIR}/hipcc inside the CMakelists.txt
  2. Also HIP_INC hardcoded to $(ROCM_PATH}/inc ..some hardcoded references to ROCM_PATH do not work for Spack.
  3. From the Read.md cp half/half.hpp inside /usr/include/half - this will not work for spack.. We cannot copy the half inside /usr/include . I ran into half.hpp - no such file or directory .. I think better soln to use the find_path() etc .. and then use include_directories(${HALF_INCLUDE_DIR}) inside CMakeLists.txt as well as modify set(INCLUDE_LIST ${HIP_INCLUDE_DIRS} ${HIP_INC} ${INCLUDE_LIST} ${HALF_INCLUDE_DIR} inside src/modules/CMakeLists.txt
  4. The same issue with llvm . When i included the llvm-10.0.0 , i am seeing got omp.h file not found etc. " /tmp/root/spack-stage/spack-stage-amdrpp-0.96-pomo6dsn2tuj65p3m5deahiwedaqvqyu/spack-src/src/include/cpu/rpp_cpu_ common.hpp:9:10: fatal error: 'omp.h' file not found"
  5. in files that are part of build , #include <half/half.hpp> not sure if this will need to be altered to #include <half.hpp>. Just my thoughts .

srekolam avatar Aug 12 '22 21:08 srekolam

PR #948 to fix Turbo JPEG Find and RPP V0.96 to add support for SPACK Build

kiritigowda avatar Sep 14 '22 22:09 kiritigowda

@srekolam let me know if TOT works for you.

kiritigowda avatar Sep 16 '22 20:09 kiritigowda

sure.. I tried with 0.97 , and i still see the issue with half.hpp /tmp/root/spack-stage/spack-stage-rpp-0.97-qrgscygsacqpq5wb2kdwz4uxwqtxnfqj/spack-src/src/include/common/rpp/op_k ernel_args.hpp:5:10: fatal error: 'half/half.hpp' file not found 216 #include <half/half.hpp> -Even when i looked the master branch at the https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp/blob/master/src/include/common/rpp/op_kernel_args.hpp . i find its using the same way. The half package in spack is installed at the following install prefix path - ./opt/spack/linux-centos8-skylake_avx512/gcc-8.4.1/half-2.1.0-jsbb7udpvdhwi7bcqh4b42p2irkolkfo/include/half.hpp So, i think as long as the header files like op_kernel_args.hpp includes half using,#include<half/half.hpp> it will break.

Also, one another question , inside the CMakeLists.txt, COMPILER_FOR_HIP is mentioned as ${ROCM_PATH}/llvm/bin/clang++ , if that is the case, is it using 2 different clang++ for HIP and OpenCL , because i see the package is dependent on llvm@10.

srekolam avatar Sep 16 '22 22:09 srekolam

@srekolam rocm has the half package which is installed at /opt/rocm/include

sudo apt install half
Reading package lists... Done
Building dependency tree       
Reading state information... Done
half is already the newest version (1.12.0.50300-36~20.04).
half set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

If you install this package ROCM_PATH/include will cover it

/opt/rocm/include/half$ ls
half.hpp

kiritigowda avatar Sep 16 '22 22:09 kiritigowda

@srekolam any updates on this?

kiritigowda avatar Dec 06 '22 19:12 kiritigowda

@srekolam rocAL has migrated to this repo. Can you please close this issue here and open a new issue if you still see it.

LakshmiKumar23 avatar Jan 03 '23 19:01 LakshmiKumar23

@srekolam reopen this issue if you see this with TOT.

kiritigowda avatar Mar 31 '23 19:03 kiritigowda