Ask Your Question
1

Enable AMD OpenCL for OpenCV 2.4.5 .

asked 2013-04-15 03:54:51 -0600

updated 2013-04-15 04:00:24 -0600

Hi, all:

Long time no see. ^_^

Environment:

  1. Ubuntu 12.10

  2. OpenCV 2.4.5

  3. AMDAPP: AMD-APP-SDK-v2.8-lnx32

  4. Video Card: AMD 6870

I'm trying to play OpenCL with OpenCV 2.4.5. I defaultly installed AMDAPP under /opt/AMDAPP

And while I do a out-of-folder build for OpenCV, I set

  1. OPENCL_ROOT_DIR /opt/AMDAPP/include (this seems to be correct)
  2. OpenCL_DIR OpenCL_DIR-NOTFOUND (always showing NOTFOUND)

I tried to let

  • OpenCL_DIR = /opt/AMDAPP/include
  • OpenCL_DIR = /opt/AMDAPP etc. but nothing worked ever.

My question is: what is OpenCL_DIR if I use a AMD video card and related packages, instead of a NVidia one? Besides AMDAPP, is there anything else that I need to install for OpenCL?

Thank you..

Best Regards Pei

edit retag flag offensive close merge delete

Comments

Have you tried if it works without setting this variable? Probably you don't need it at all...

Guanta gravatar imageGuanta ( 2013-04-15 06:45:59 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-04-25 17:03:35 -0600

charpentier franck gravatar image

updated 2013-04-27 02:28:32 -0600

OpenCL_DIR appear in opencv-2.4.5/<directory_of_cmake>/CMakeCache.txt I modified the file opencv-2.4.5/cmake/OpenCVDetectOpenCL.make at line 7 by removing the optional QUIET. An now I have the message:

CMake Warning at cmake/OpenCVDetectOpenCL.cmake:7 (find_package):
  By not providing "FindOpenCL.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "OpenCL", but
  CMake did not find one.

  Could not find a package configuration file provided by "OpenCL" with any
  of the following names:

    OpenCLConfig.cmake
    opencl-config.cmake

  Add the installation prefix of "OpenCL" to CMAKE_PREFIX_PATH or set
  "OpenCL_DIR" to a directory containing one of the above files.  If "OpenCL"
  provides a separate development package or SDK, be sure it has been
  installed.

There no package for OpenCL of AMD. The OpenCL_DIR variable is not used for OpenCV with AMD OpenCL.

As against the required variable AMDAPPSDKROOT

Add at /etc/environement

AMDAPPSDKROOT="/opt/AMDAPP"
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"/opt/AMDAPP/lib/x86:/opt/AMDAPP/lib/x86_64"

disconnect and reconnect your user and delete old cmake compilation with make clean

let me know

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-04-15 03:54:51 -0600

Seen: 2,179 times

Last updated: Apr 27 '13