1
votes

I'll warn you in advance my written english it is not good, so please have some patience because I'll do a lot of errors. I need to expose the graphic card in order to do some benchmark with parallel algorithms on finite element analysis. I downloaded the intel sdk at this link https://software.intel.com/en-us/intel-opencl . I am using Ubuntu 16.10, so i followed all the instruction as explained in this post https://streamcomputing.eu/blog/2011-06-24/install-opencl-on-debianubuntu-orderly/ . When i run a simple algorithm wich checks all the device, it only recognizes the cpu, failing to find the graphic card. The same program works well on a mac (because OpenCL is in the stack of course).

// includes...

int main(int argc, const char * argv[])
{
// See what standard OpenCL sees
std::vector<cl::Platform> platforms;

// Get platform
cl::Platform::get(&platforms);

// Temp
std::string s;

// Where the GPU lies
cl::Device gpudevice;

// Found a GPU
bool gpufound = false;

std::cout << "**** OPENCL ****" << std::endl;

// See if we have a GPU
for (auto p : platforms)
{        
    std::vector<cl::Device> devices;

    p.getDevices(CL_DEVICE_TYPE_ALL, &devices);

    for (auto d : devices)
    {
        std::size_t i = 4;
        d.getInfo(CL_DEVICE_TYPE, &i);

        std::cout << "> Device type     " <<
                    (i & CL_DEVICE_TYPE_CPU ? "CPU" : "") <<
                    (i & CL_DEVICE_TYPE_GPU ? "GPU" : "") <<
                    (i & CL_DEVICE_TYPE_ACCELERATOR ? "ACCELERATOR" : "");

        if (i & CL_DEVICE_TYPE_GPU)
        {
            gpudevice = d;
            gpufound  = true;
        }

        std::cout << " Version  " << s << std::endl;

    }
}

if (!gpufound)
{
    std::cout << "NO GPU FOUND. ABORTING." << std::endl;
    return 1;
}
// Do other things...

the output is:

/home/andrea/Dropbox/fem/SiNDy/clfem/cmake-build-debug/vector_sycl
**** OPENCL ****
> Device type     CPU Version  
NO GPU FOUND. ABORTING.

Process finished with exit code 1

I tried to add the current user in the video group, i also tried to install Intel Media Server Studio following the instructions coming with the package but I could not build the kernel because of some compile errors. I also updated all the drivers with the automatic software update of Ubuntu, but still the GC is not found.

1

1 Answers

0
votes

Maybe you want to try beignet, which is an OpenCL implementation for IvyBridge+ iGPUs. There are packages of beignet for Ubuntu 16.10. To be more precise, I think you are looking for the packages beignet-dev and beignet-opencl-icd. Test it yourself since I have no Ubuntu installation currently available. (However, beignet itself works pretty well on my Intel HD Graphics 520 and Antergos/Arch Linux)