Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

OpenCL support #17

Closed
UniqueFool opened this issue Dec 3, 2015 · 17 comments
Closed

OpenCL support #17

UniqueFool opened this issue Dec 3, 2015 · 17 comments

Comments

@UniqueFool
Copy link

It seems, that the symlink to /usr/local/cuda/include/CL is missing, once it is manually set up, OpenCL examples build properly.

Equally, /usr/local/cuda/lib64 must be added to /etc/ld.so.conf (or a corresponding file), to ensure that libOpenCL* can be found

I guess, it might be a good idea to try to build the CUDA/OpenCL examples as part of the update/release process ?

Thanks

@3XX0
Copy link
Member

3XX0 commented Dec 3, 2015

We don't support OpenCL currently, we will probably add it in a future release though.

CUDA libraries are in fact included in ld.so.conf (see https://github.com/NVIDIA/nvidia-docker/blob/master/ubuntu-14.04/cuda/7.5/runtime/Dockerfile#L29)

We provide few CUDA samples images in samples

@3XX0 3XX0 changed the title OpenCL support: missing symlink for headers and ld.so.conf entry ? OpenCL support Dec 3, 2015
@UniqueFool
Copy link
Author

thanks for clarifying, it would be great if OpenCL could be supported "out of the box", and it may make sense to run a few CUDA/OpenCL examples as regression tests when building/updating the docker image, i.e. as part of the release process

@flx42
Copy link
Member

flx42 commented Dec 4, 2015

Yes, we definitely need to add more tests; I will try to do that simultaneously with #18

@UniqueFool
Copy link
Author

regarding clinfo, I really suggest to check out this version, which seems to support all major ICDs, including parallel installations: https://github.com/Oblomov/clinfo

I have been using this, to test different ICDs (nvidia, amd and intel) with different hardware: https://github.com/elhigu/opencl-testsuite

You can see the results, which are published at: http://elhigu.github.io/opencl-testsuite/

There is a "send-report" make target which will automatically send a JSON request to update the test matrix

@lsb
Copy link

lsb commented Mar 28, 2016

I'd like to see this too, but my workaround is minimal, I have success running
nvidia-docker run nvidia/cuda:7.5 /bin/bash -exc "apt-get update && apt-get install -y clinfo nvidia-opencl-icd-352 && clinfo"

@3XX0
Copy link
Member

3XX0 commented Mar 28, 2016

Here you go (pushed in the opencl branch):
https://github.com/NVIDIA/nvidia-docker/blob/opencl/ubuntu-14.04/opencl/runtime/Dockerfile

If you need devel files just install ocl-icd-opencl-dev

@3XX0 3XX0 closed this as completed in 9fdb5f6 May 28, 2016
@UniqueFool
Copy link
Author

Thank you very much for taking care of this, much appreciated !!

@UniqueFool
Copy link
Author

we definitely need to add more tests;

@flx42, how about including some of the more popular OpenCL related libraries/platforms, e.g. things like pyOpenCL, numpy or arrayfire etc ?

Most of these already contain a bunch of unit tests using OpenCL, so that would be a straightforward way to grow a library of OpenCL unit tests without having to write them from scratch ?

@flx42
Copy link
Member

flx42 commented Jun 2, 2016

@UniqueFool This should not be included in the base image, but feel free to build your own images :)

@mjmg
Copy link

mjmg commented Nov 18, 2016

It seems OpenCL support has not been included in the latest cuda-8.0 runtime dockerfiles for centos 6/7 and ubuntu-16.04.

@msalvaris
Copy link

msalvaris commented Jul 3, 2017

@3XX0 : Any update on OpenCL support for the latest cuda-8.0 runtime dockerfiles?

@juliandroid
Copy link

@3XX0 : OpenCL support is missing. I was trying CentOS image and Davinci Resolve software, which requires both Cuda and OpenCL to run.

@bhalonen
Copy link

@3XX0 : I have the same request as @juliandroid . Would like nvidia-docker, Centos 6, and OpenCL.

Thank you

@3XX0
Copy link
Member

3XX0 commented Aug 28, 2017

We don't plan to publish OpenCL images for now. We will revisit after 2.0 is out.
In the meantime, creating your own Dockerfile should be too difficult, see:
https://gitlab.com/nvidia/opencl/blob/ubuntu14.04/runtime/Dockerfile

@flx42
Copy link
Member

flx42 commented Jan 6, 2018

We just published the OpenCL images on DockerHub (finally!).
https://hub.docker.com/r/nvidia/opencl/

@gautam1858
Copy link

@flx42 PyOpenCL seems to be not working, this throwing some errors, here is the post describing the problem (https://devtalk.nvidia.com/default/topic/1047065/need-pyopencl-nvidia-docker-container/) can you please help us ?

@lagorsse
Copy link

Hi, I am trying to user nvidia opencl docker on GKE, clinfo doesn't detect plateform. The driver seems to be well instaled and the GPU seems detected.

/# /usr/local/nvidia/bin/nvidia-smi
Mon Jun 17 13:43:21 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.79 Driver Version: 410.79 CUDA Version: 10.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Tesla P100-PCIE... Off | 00000000:00:04.0 Off | 0 |
| N/A 36C P0 27W / 250W | 0MiB / 16280MiB | 0% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+

ldd /usr/bin/clinfo
linux-vdso.so.1 => (0x00007fff933e0000)
libOpenCL.so.1 => /usr/local/nvidia/lib64/libOpenCL.so.1 (0x00007fb60b652000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb60b34e000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb60b138000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb60ad6f000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb60ab6b000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb60a94d000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb60a647000)
/lib64/ld-linux-x86-64.so.2 (0x00007fb60b859000)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

10 participants