Overv / vramfs

VRAM based file system for Linux
1.26k stars 65 forks source link

compatibility with nvidia opencl cuda 8.0 sdk #13

Closed ric96 closed 7 years ago

ric96 commented 7 years ago

hi, i was still getting an error about: In file included from src/memory.cpp:1:0: include/memory.hpp:13:25: fatal error: CL/cl.hpp: No such file or directory

include <CL/cl.hpp>

did a bit of debugging myself, found the following pull request to be the best solution... maybe its because i have recently installed the cuda 8 sdk. I created this pull to let you know of the issue and if multiple people are affected under similar circumstances. thnx.

Overv commented 7 years ago

Isn't that header for the 2.0 version of OpenCL?

ric96 commented 7 years ago

Yes, but that is the only thing i seem to have in my include library, and the other is cl.h and not cl.hpp, hance the cl.hpp file Not found error.

Overv commented 7 years ago

That is odd, perhaps there really is merit in using the C API instead of C++. Can you check if this is a new thing with version 8 of the SDK?

ric96 commented 7 years ago

A quick search on google only provided me with one similar error which mentioned that cl.hpp is not provided by cuda 8, https://github.com/rlguy/GridFluidSim3D/issues/8

Looks like everyone is working in C.

Overv commented 7 years ago

Hmm, I'll merge this for now and consider changing the code to use the C API.

ric96 commented 7 years ago

Cool! A bit more on the topic, opencl2.0 was long due on Nvidia's CUDA platform, everyone else had it long back. Although this is a clear indication that Nvidia now supports opencl 2.0, two things are still not clear. 1) Lack of any announcements regarding support for opencl2 2) clinfo still showing 1.2 on my gtx960

As for the cl2.hpp, I think Nvidia merged the header so that the developers can set a range of opencl version that they want to support instead of having multiple header fies for multiple opencl version. Maybe they'll do the same with cl.h, cl2.h?

Overv commented 7 years ago

I don't think NVIDIA supports OpenCL 2.0 yet, because they haven't announced it anywhere.