krrishnarraj / clpeak

A tool which profiles OpenCL devices to find their peak capacities
Apache License 2.0
396 stars 111 forks source link

Cmake find library issue #49

Open nerdralph opened 6 years ago

nerdralph commented 6 years ago

Cmake doesn't find OpenCL with AMDGPU-pro. As a hack/workaround I added the lib path to the find_library hints: /opt/amdgpu-pro/lib/x86_64-linux-gnu/

I came across lots of bug reports about Cmake multiarch issues, but it's not clear what the "correct" solution is.

hjmallon commented 6 years ago

Does using the default CMake finder fix things for you. See https://github.com/krrishnarraj/clpeak/pull/45

nerdralph commented 6 years ago

I tried find_package(OpenCL), but that didn't work. I'm not a cmake fan, so it's still possible it could work with more changes. I'm using cmake 3.5.1 on Ubuntu 16.04.

hjmallon commented 6 years ago

Yeah. Sorry I haven't used AMDGPU-pro. Seems that path isn't included in the OpenCL module in cmake. https://gitlab.kitware.com/cmake/cmake/blob/master/Modules/FindOpenCL.cmake