I upgraded a GTX960 to a Grid M40 to accelerate FFMPEG encodes. I had everything working with the old GTX960 on CentOS 7 and was impressed enough with the results to get a M40. The OS seems to see the card just fine as you can see:
[root@localhost]~# nvidia-smi
Mon Nov 14 17:59:15 2016
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 367.48 Driver Version: 367.48 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GRID M40 Off | 0000:44:00.0 Off | N/A |
| 60% 60C P0 17W / 53W | 0MiB / 4041MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 1 GRID M40 Off | 0000:45:00.0 Off | N/A |
| 59% 59C P0 17W / 53W | 0MiB / 4041MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 2 GRID M40 Off | 0000:46:00.0 Off | N/A |
| 40% 41C P0 16W / 53W | 0MiB / 4041MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 3 GRID M40 Off | 0000:47:00.0 Off | N/A |
| 0% 49C P0 10W / 53W | 0MiB / 4041MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
And I can run some sample Nvidia apps:
[root@localhost]~/NVIDIA_CUDA-8.0_Samples/1_Utilities/bandwidthTest# ./bandwidthTest
[CUDA Bandwidth Test] - Starting...
Running on...
Device 0: GRID M40
Quick Mode
Host to Device Bandwidth, 1 Device(s)
PINNED Memory Transfers
Transfer Size (Bytes) Bandwidth(MB/s)
33554432 6286.3
Device to Host Bandwidth, 1 Device(s)
PINNED Memory Transfers
Transfer Size (Bytes) Bandwidth(MB/s)
33554432 6441.0
Device to Device Bandwidth, 1 Device(s)
PINNED Memory Transfers
Transfer Size (Bytes) Bandwidth(MB/s)
33554432 64577.1
Result = PASS
But when I try running ffmpeg, I get this error:
[hevc_nvenc @ 0x290e500] No NVENC capable devices found
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> hevc (hevc_nvenc))
Stream #0:1 -> #0:1 (copy)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
I have tried to uninstall the nvidia drivers, cuda and reinstall them, I even recompiled ffmpeg, but the error hasn’t gone away. Any ideas?