How to install nengo_ocl (or probably opencl)

I got a new computer and I’m setting up it.
GPU was not installed in my previous computer, but was in my new computer.
So, I would like to implement simulation with GPU, but I don’t know the way.

My new computer is as follows:
・Ubuntu 16.04 64bit
・CPU: Inter Xeon® E5-2620 v2 2.10GHz✕24
・GPU: NVIDIA GeForce GTX 1080/PCle/SSE2

I know that there are two ways, nengo_ocl and CUDA. Which way do you recommend?

(2)For laptop (Macbook Air), I was able to implement nengo_ocl before. So, I tried to install nengo_ocl.
I installed Nengo, mako. and numpy to implement nengo_ocl. However, I don’t know how to install pyopencl or probably opencl.

When I enter “pip install nengo_ocl” on terminal, next messages were showed.
In file included from src/c_wrapper/pyopencl_ext.h:6:0,
from src/c_wrapper/wrap_cl.h:12,
from build/temp.linux-x86_64-3.6/pyopencl._cffi.cpp:493:
src/c_wrapper/clinfo_ext.h:10:19: fatal error: CL/cl.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
Failed building wheel for pyopencl

In file included from src/c_wrapper/pyopencl_ext.h:6:0,from src/c_wrapper/wrap_cl.h:12,from build/temp.linux-x86_64-3.6/pyopencl._cffi.cpp:493:src/c_wrapper/clinfo_ext.h:10:19: fatal error: CL/cl.h: No such file or directorycompilation terminated.error: command 'gcc' failed with exit status 1

Is this because of a lack of opencl? If so, what should I do to install opencl?
I installed nvidia-384 driver because my computer has GeForce.
Should I have installed “nvidia-libopencl1-384”?

Anyway, I want to simulate with GPU. I’m beginner so please give me any advice.
Thank you!

Yes, that error you’re seeing is related to installing opencl, rather than nengo_ocl specifically. There are more detailed installation instructions for opencl here: If you’re able to get opencl installed first with those steps, then pip install nengo_ocl should work.

If you want to try a CUDA-based GPU simulation you can use Nengo DL (it’s based on TensorFlow, which runs on CUDA under the hood).

Thank you for your reply.
I succeeded in installing nengo_ocl! But I have another question.

I thought that Nengo_DL was used only for deep learning. However, can Nengo_DL be used simply to shorten the simulation time?

I’m mainly interested in Semantic Pointer, so I thought I would not use Nengo_DL.

Yes, Nengo DL can be used without any of the deep learning features, just as a simulation backend that allows you to run models on the GPU/CPU (using TensorFlow to accelerate things). However, in terms of pure speed nengo_ocl should be faster than nengo_dl. The only exception to that is if you are interested in running batched processing (i.e., processing several different inputs in parallel through your network). In that case nengo_dl will be faster.

OK, I understand. Thank you so much!