I am experience a very slow startup using OpenCL on Linux (Ubuntu 15.04). My GPU is a Tesla C 2075 and I installed the latest available driver. Here are some time measurements for the API calls.
The first call that uses the GPU is usually a long one. It forces the GPU runtime to complete its initialization, so very often the first call will experience a long delay.
You might be able to improve things somewhat by setting persistence mode on the GPU using nvidia-smi
I tried enabling persistence (nvidia-smi -i 0 -pm ENABLED), but although the command returns with success, the persistence mode is still disabled (nvidia-smi -i 0 -q). The alternative seems to use the persistence demon, which I can start, but it doesn’t run afterwards (ps aux).
While this may indeed be the problem, I have no clue how solve it (short of installing X and reinstalling the drivers).
It doesn’t show up in lsmod, so I guess it is disabled. Installing the downloaded nvidia driver also requires disabling nouveau. The installer offers to create a blacklist file with the content you suggested.
Thanks for you advice! If I stumble upon a solution, I will post it here for future reference.
Found a solution. I think, I used the drivers from the Ubuntu repositories before. Switching to the driver from the nvidia website made it work. The version is a bit different, maybe that did it.
$ sudo apt-get remove nvidia-opencl-dev nvidia-opencl-icd-346 nvidia-346 nvidia-opencl-icd-346 nvidia-346-uvm nvidia-modprobe nvidia-opencl-dev
$ sudo ./NVIDIA-Linux-x86_64-346.89.run
$ sudo nvidia-smi -i 0 -pm ENABLED
Enabled persistence mode for GPU 0000:03:00.0.
All done.
$ sudo nvidia-smi
Mon Sep 7 00:27:31 2015
+------------------------------------------------------+
| NVIDIA-SMI 346.89 Driver Version: 346.89 |
|-------------------------------+----------------------+----------------------+
| 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 C2075 On | 0000:03:00.0 Off | 0 |
| 30% 40C P12 26W / 225W | 10MiB / 5375MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+