OPENCLAMDBLAS and OPENCLAMDFFT cmake file cmake/OpenCVDetectOpenCL.cmake (Bug #2985)


Added by Franck Charpentier almost 12 years ago. Updated over 11 years ago.


Status:Done Start date:2013-04-24
Priority:Normal Due date:
Assignee:Vladislav Vinogradov % Done:

0%

Category:build/install
Target version:2.4.6
Affected version:2.4.5 (latest release) Operating System:
Difficulty: HW Platform:
Pull request:https://github.com/Itseez/opencv/pull/995

Description

OPENCLAMDBLAS and OPENCLAMDFFT never detected under linux.
in file cmake/OpenCVDetectOpenCL.cmake line 45-49:

if (X86_64)
  set(CLAMD_POSSIBLE_LIB_SUFFIXES lib64/import)
elseif (X86)
  set(CLAMD_POSSIBLE_LIB_SUFFIXES lib32/import)
endif()

lib64/import and ib32/import is the path on Windows but not Linux.
And CLAMD_POSSIBLE_LIB_SUFFIXES is used to line 68 in
find_library(CLAMDFFT_LIBRARY
              NAMES clAmdFft.Runtime
              HINTS ${CLAMDFFT_ROOT_DIR}
              PATH_SUFFIXES ${CLAMD_POSSIBLE_LIB_SUFFIXES}
              DOC "clAmdFft library")


OpenCVDetectOpenCL.cmake - cmake/OpenCVDetectOpenCL.cmake (3.5 kB) Franck Charpentier, 2013-04-24 11:51 pm


Associated revisions

Revision 05513758
Added by Vladislav Vinogradov over 11 years ago

fix for bug #2985:

OPENCLAMDBLAS and OPENCLAMDFFT never detected under linux.
lib64/import and lib32/import is the path on Windows but not Linux.
for CLAMDBLAS library we should use CLAMDBLAS_PATH (not CLAMDFFT_PATH)

Revision 946c09f5
Added by Vadim Pisarevsky over 10 years ago

Merge pull request #2985 from StevenPuttemans:fix_3777_redo

History

Updated by Franck Charpentier almost 12 years ago

with windows, the lib does not call clAmdFft.Runtime. a search on clAmdFft would be better for Windows and Linux.

Updated by Franck Charpentier almost 12 years ago

The last comment is an error. "NAMES" of find_library is really clAmdFft.Runtime

Updated by Franck Charpentier almost 12 years ago

to detect, I define the :

CLAMDBLAS_PATH=/opt/clAmdBlas-1.10.321
CLAMDFFT_PATH=/opt/clAmdFft-1.10.321

And this is their default location.

Updated by Franck Charpentier almost 12 years ago

The modified file as an attachment. This is probably not the best solution but on my linux, it goes.

diff OpenCVDetectOpenCL.cmake OpenCVDetectOpenCL.cmake.2
45c45
< if (WIN64)
---
>   if (X86_64)
47c47
< elseif (WIN32)
---
>   elseif (X86)
49,55c49
< endif()
< 
< if (X86_64 AND UNIX )
<     set(CLAMD_POSSIBLE_LIB_SUFFIXES lib64)
< elseif (X86 AND UNIX)
<     set(CLAMD_POSSIBLE_LIB_SUFFIXES lib32)
< endif()
---
>   endif()
72c66
<               NAMES clAmdFft.Runtime
---
>               NAMES clAmdFft
87c81
<               PATHS ENV CLAMDBLAS_PATH ENV ProgramFiles
---
>               PATHS ENV CLAMDFFT_PATH ENV ProgramFiles

Updated by Anna Kogan almost 12 years ago

Hello Franck,
Could you please make a pull request containing the solution?

  • Assignee changed from Andrey Kamaev to Franck Charpentier

Updated by Vladislav Vinogradov over 11 years ago

  • Assignee changed from Franck Charpentier to Vladislav Vinogradov
  • Pull request set to https://github.com/Itseez/opencv/pull/995

Updated by Vladislav Vinogradov over 11 years ago

  • Status changed from Open to Done

Also available in: Atom PDF