MIVisionX icon indicating copy to clipboard operation
MIVisionX copied to clipboard

OpenCL - ArchLinux: Link to Generic OpenCL Lib

Open acxz opened this issue 3 years ago • 3 comments

Error Log with -DLOOM=ON (default behavior)

/home/acxz/vcs/git/github/rocm-arch/rocm-arch/mivisionx/src/MIVisionX-rocm-5.0.0/utilities/loom_shell/loom_shell_util.cpp: In function ‘vx_status createOpenCLContext(const char*, const char*, _cl_context**)’:
/home/acxz/vcs/git/github/rocm-arch/rocm-arch/mivisionx/src/MIVisionX-rocm-5.0.0/utilities/loom_shell/loom_shell_util.cpp:519:9  error: ‘clEnqueueWaitSignalAMD_fn’ was not declared in this scope
  519 |         clEnqueueWaitSignalAMD_fn clEnqueueWaitSignalAMD = (clEnqueueWaitSignalAMD_fn)clGetExtensionFunctionAddressForPlatform(platform_id[platform_index], "clEnqueueWaitSignalAMD");
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/acxz/vcs/git/github/rocm-arch/rocm-arch/mivisionx/src/MIVisionX-rocm-5.0.0/utilities/loom_shell/loom_shell_util.cpp:520:9  error: ‘clEnqueueWriteSignalAMD_fn’ was not declared in this scope
  520 |         clEnqueueWriteSignalAMD_fn clEnqueueWriteSignalAMD = (clEnqueueWriteSignalAMD_fn)clGetExtensionFunctionAddressForPlatform(platform_id[platform_index], "clEnqueueWriteSignalAMD");
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/acxz/vcs/git/github/rocm-arch/rocm-arch/mivisionx/src/MIVisionX-rocm-5.0.0/utilities/loom_shell/loom_shell_util.cpp:521:9  error: ‘clEnqueueMakeBuffersResidentAMD_fn’ was not declared in this scope
  521 |         clEnqueueMakeBuffersResidentAMD_fn clEnqueueMakeBuffersResidentAMD = (clEnqueueMakeBuffersResidentAMD_fn)clGetExtensionFunctionAddressForPlatform(platform_id[platform_index], "clEnqueueMakeBuffersResidentAMD");
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/acxz/vcs/git/github/rocm-arch/rocm-arch/mivisionx/src/MIVisionX-rocm-5.0.0/utilities/loom_shell/loom_shell_util.cpp:522:13: error: ‘clEnqueueWaitSignalAMD’ was not declared in this scope
  522 |         if (clEnqueueWaitSignalAMD && clEnqueueWriteSignalAMD && clEnqueueMakeBuffersResidentAMD) {
      |             ^~~~~~~~~~~~~~~~~~~~~~
/home/acxz/vcs/git/github/rocm-arch/rocm-arch/mivisionx/src/MIVisionX-rocm-5.0.0/utilities/loom_shell/loom_shell_util.cpp:522:39: error: ‘clEnqueueWriteSignalAMD’ was not declared in this scope; did you mean ‘clEnqueueWriteImage’?
  522 |         if (clEnqueueWaitSignalAMD && clEnqueueWriteSignalAMD && clEnqueueMakeBuffersResidentAMD) {
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~
      |                                       clEnqueueWriteImage
/home/acxz/vcs/git/github/rocm-arch/rocm-arch/mivisionx/src/MIVisionX-rocm-5.0.0/utilities/loom_shell/loom_shell_util.cpp:522:66: error: ‘clEnqueueMakeBuffersResidentAMD’ was not declared in this scope
  522 |         if (clEnqueueWaitSignalAMD && clEnqueueWriteSignalAMD && clEnqueueMakeBuffersResidentAMD) {
      |                                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [utilities/loom_shell/CMakeFiles/loom_shell.dir/build.make:76: utilities/loom_shell/CMakeFiles/loom_shell.dir/loom_shell_util.cpp.o] Error 1

cmake output:

-- The C compiler identification is GNU 11.1.0
-- The CXX compiler identification is GNU 11.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- MIVisionX Version -- 2.0.1
-- MIVisionX Install Path -- /opt/rocm/mivisionx
-- MIVisionX Backend set to -- OPENCL
-- MIVisionX Build Type -- Release
-- MIVisionX Developer Options
--      -D NEURAL_NET=OFF [Turn OFF Neural Net Modules (default:ON)]
--      -D ROCAL=OFF [Turn OFF ROCAL Modules (default:ON)]
--      -D LOOM=OFF [Turn OFF LOOM Modules (default:ON)]
--      -D GPU_SUPPORT=OFF [Turn OFF GPU support (default:ON)]
--      -D BACKEND=HIP [select HIP for GPU backend [options:CPU/OPENCL/HIP](default:OPENCL)]
-- ROCm OpenCL Not Found
-- OpenCL - Setting CL_TARGET_OPENCL_VERSION=220
-- AMD OpenVX -- OpenVX built with OpenCL Support
-- Using OpenCL Library -- /lib/libOpenCL.so
-- AMD OpenVX -- OpenVX module added
-- NOTE: FindAMDRPP failed to find -- amd_rpp
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.0")
-- Checking for module 'libavcodec'
--   Found libavcodec, version 58.134.100
-- Checking for module 'libavformat'
--   Found libavformat, version 58.76.100
-- Checking for module 'libavutil'
--   Found libavutil, version 56.70.100
-- Using FFMPEG -- Libraries:/usr/lib/libavcodec.so;/usr/lib/libavformat.so;/usr/lib/libavutil.so;/usr/lib/libswscale.so Includes:/usr/include
-- Found OpenCL: /lib/libOpenCL.so
-- amd_media -- Building with OpenCL
-- AMD OpenVX Media Extension -- amd_media module added
-- AMD OpenVX Loom Stich Library Extension -- amd_loomsl module added
-- WARNING: GPU_SUPPORT/MIOpen Not Found -- amd_nn module excluded
-- WARNING: AMDRPP Not Found -- amd_rpp module excluded
-- OpenCV Found -- Version-4.5.X Supported
-- AMD OpenVX OpenCV Extension -- amd_opencv module added
-- Utilities -- runvx module added with OPENCL support
-- Loom Shell -- loom shell script interpreter module added
-- Utilities -- runvx, runcl, loom_shell, & mv_deploy modules added
-- NOTE: FindAMDRPP failed to find -- amd_rpp
-- NOTE: rocAL library requires AMD's rpp library, Not Found
-- WARNING: rocAL module excluded
-- Configuring done
-- Generating done
-- Build files have been written to: /home/acxz/vcs/git/github/rocm-arch/rocm-arch/mivisionx/src/build

sysinfo: OS: Archlinux cmake: 3.22.2

acxz avatar Feb 17 '22 05:02 acxz

@acxz looks like the link error to OpenCL 2.2. Can you check if the CMakeList log links to rocm OpenCL or generic OpenCL?

kiritigowda avatar Feb 17 '22 05:02 kiritigowda

Yep looks like ur rite:

-- Found OpenCL: /lib/libOpenCL.so

Should I be using miopen-opencl? I believe I was using miopen-hip. I guess I would have to use the following flag: -DBACKEND=HIP. I'll try and report back.

acxz avatar Feb 17 '22 05:02 acxz

FindOpenCL behavior issue - ArchLinux

-- ROCm OpenCL Not Found
-- OpenCL - Setting CL_TARGET_OPENCL_VERSION=220
-- AMD OpenVX -- OpenVX built with OpenCL Support
-- Using OpenCL Library -- /lib/libOpenCL.so

kiritigowda avatar Feb 17 '22 18:02 kiritigowda

@acxz this issue should be fixed with TOT. Please reopen if you still see this issue with TOT master. Thanks!

kiritigowda avatar Jan 03 '23 21:01 kiritigowda