Giter VIP home page Giter VIP logo

Comments (4)

tmagomedov avatar tmagomedov commented on July 17, 2024

src/FindOpenCL.cmake CMake script is used to find OpenCL. It looks for the cl.h header and greps it for CL_VERSION_1_1, CL_VERSION_1_2, CL_VERSION_2_0. This points him to OpenCL version supportred by header. On my system I have the following code in cl.h for example:

 195 #define CL_VERSION_1_0                              1
 196 #define CL_VERSION_1_1                              1
 197 #define CL_VERSION_1_2                              1
 198 #define CL_VERSION_2_0                              1

You can try to set set( OpenCL_VERSION "0.0" ) line to set( OpenCL_VERSION "1.2" ) if you are sure. Or better check what particular cl.h header is found and what CL_VERSION_X_X are defined in it.

from clblas.

jrgruher avatar jrgruher commented on July 17, 2024

Thanks for the response. I do have cl.h header on my system. How does it know where to look for cl.h, is it guided by some environment variable? I wonder if I just need to configure or fix some environment variable and then it will work.

By the way, what OpenCL package/distribution do you test against?

Thanks!

don@donfpga2:~$ cat /opt/intel/opencl-1.2-6.4.0.25/SDK/include/CL/cl.h|grep CL_VERSION
#define CL_VERSION_1_0 1
#define CL_VERSION_1_1 1
#define CL_VERSION_1_2 1

from clblas.

tmagomedov avatar tmagomedov commented on July 17, 2024

You can check OPENCL_INCLUDE_DIRS variable in your CMakeCache.txt. If it is not /opt/intel/opencl-1.2-6.4.0.25/SDK/include you can try pointing clBLAS to it by using OPENCL_ROOT CMake variable like this:

cmake ../src/ -DOPENCL_ROOT=/opt/intel/opencl-1.2-6.4.0.25/SDK

And yes, it also checks environment variables OPENCL_ROOT, AMDAPPSDKROOT and CUDA_PATH.
Newer versions of FindOpenCL.cmake script found in CMake distribution look at INTELOCLSDKROOT variable too but it doesn't matter really since every vendor supports ICD in their implementation. Headers are almost the same in all SDK's and there is no difference what libOpenCL.so to link with. I personally use headers from opencl-headers package which are in /usr/include/CL.

from clblas.

jrgruher avatar jrgruher commented on July 17, 2024

Thanks! Settings the OPENCL_ROOT environment variable (and cleaning up the files in the build directory from my previous failed attempts) allowed the build to complete.

from clblas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.