Giter Site home page Giter Site logo

Comments (7)

c0gent avatar c0gent commented on May 21, 2024

So for starters yes, you may have some sort of issue with your ICD loader. You might be linking directly to an OpenCL 1.2 driver instead of your system-wide loader, which should include all installed platforms. Let me know which OS you're on and I'll point you in the right direction. If you're on Windows this could be related to the recently added build script and we'll need to improve that script if that's the case (we simply haven't had enough people use it yet).

The HalffpConfig error is normal, it just means your driver doesn't support it. That error should probably be silenced or something.

Additionally, there are various quirks with OpenCL 2.0+ on every platform I know of (AMD, NVIDIA, Intel, ARM) such as the version not displaying correctly but in this case I think we just need to tweak or fix how your library is being linked.

from ocl.

botev avatar botev commented on May 21, 2024

I'm on ubuntu 14.04, more specifically:
Linux botev-ThinkPad-T440 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

from ocl.

c0gent avatar c0gent commented on May 21, 2024

Ok so you need to relink your OpenCL loader if you want to use OpenCL 2.0+ features.

There are a number of ways to configure this but you should have /usr/lib/libOpenCL.so linked (eventually) to the system wide loader rather than a specific vendor's library.

For troubleshooting purposes however, first locate your OpenCL 2.x library. It's probably in /opt/intel/ somewhere. Possibly /opt/intel/intel-opencl{...}/opencl/lib64/libOpenCL.so.X....

  • Find the libOpenCL that is the actual binary and not a symlink.
  • Temporarily rename /usr/lib/libOpenCL.so to /usr/lib/libOpenCL.so.bak
  • Do: sudo ln {path to intel binary} /usr/lib/libOpenCL.so

This should link your Intel 2.x library as your system default (assuming you have no other custom ld stuff going on). Run the ocl info and info-core examples and see what you see.

If that works and you have no immediate need to use another device, leave it alone. If you want to set your libraries up properly to the system loader (which should be able to load all available platforms) I can help you sort that out.

from ocl.

botev avatar botev commented on May 21, 2024

Ah it was quite a dumb mistake, I was just not looping trough the platforms (I assumed that the 2.0 was overwriting the previous) thus I was just listing the OpenCL 1.2. Just to update the output now is as expected:

Platform:
    Profile: FULL_PROFILE
    Version: OpenCL 1.2 LINUX
    Name: Intel(R) OpenCL
    Vendor: Intel(R) Corporation
    Extensions: cl_khr_icd cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_depth_images cl_khr_3d_image_writes cl_intel_exec_by_local_thread cl_khr_spir cl_khr_fp64 
    Total Device Count: 1
    Device[0]: 
        Name: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz
        Type: DEVICE_TYPE_CPU
        Vendor: Intel(R) Corporation[32902]
        MaxComputeUnits: 4
        MaxWorkItemDimensions: 3
        MaxWorkGroupSize: 8192
        MaxWorkItemSizes: [8192, 8192, 8192]

Platform:
    Profile: FULL_PROFILE
    Version: OpenCL 2.1 LINUX
    Name: Experimental OpenCL 2.1 CPU Only Platform
    Vendor: Intel(R) Corporation
    Extensions: cl_khr_icd cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_depth_images cl_khr_3d_image_writes cl_intel_exec_by_local_thread cl_khr_spir cl_khr_fp64 cl_khr_image2d_from_buffer 
    Total Device Count: 1
    Device[0]: 
        Name: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz
        Type: DEVICE_TYPE_CPU
        Vendor: Intel(R) Corporation[32902]
        MaxComputeUnits: 4
        MaxWorkItemDimensions: 3
        MaxWorkGroupSize: 8192
        MaxWorkItemSizes: [8192, 8192, 8192]

from ocl.

botev avatar botev commented on May 21, 2024

One suggestion though. If you remember I was getting an error from the HalfFpConfig:

################################ OPENCL ERROR ############################### 

Error executing function: clGetDeviceInfo  

Status error code: CL_INVALID_VALUE (-30)  

Please visit the following url for more information: 

https://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clGetDeviceInfo.html#errors  

And this pops up when you call device.to_stirng(). I suggest that the method should unwrap any errors and just add to the string and indication it does not support that info, rather than breaking the string and giving up.

from ocl.

c0gent avatar c0gent commented on May 21, 2024

Yeah I've been meaning to get to that...

I actually wanted to do a detection of whether or not the device supports each particular feature before even requesting info for it but it remains on my very long list of things to get to.

from ocl.

c0gent avatar c0gent commented on May 21, 2024

cogciprocate/ocl-core@e7666bc

from ocl.

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.