Oh, I see now. I must have read the names wrong (there was A LOT of debugging to get OpenCL running).
If I try to play a file after enabling OpenCL I get a crash. I'm unable to retrieve the event log, but this is what appears on the command line:
Playing: /home/djhg2000/Downloads/EVERYBODY DO THE FLOP (asdfmovie song).mp4
(+) Video --vid=1 (*) (h264)
(+) Audio --aid=1 --alang=und (*) (aac)
libEGL warning: DRI2: failed to authenticate
AO: [pulse] 44100Hz stereo 2ch float
VO: [opengl] 1280x720 yuv420p
01:25:00.925 [i]: VideoPlayer: mpv 0.15.0
01:25:01.321 [i]: Media: video 1280x720 [PAR 1.000] at 25.000 fps [constant]
01:25:01.321 [i]: Media: codec type is AVC, YUV/4:2:0/8 bits
01:25:01.348 [i]: Playback: starting up...
01:25:01.358 [i]: Playback [e297b1d7]: resulting video frame 1280x720
01:25:01.358 [i]: Playback [e297b1d7]: 2 acceptible profiles, best is 'Manual' [0]
01:25:01.361 [i]: Playback [e297b1d7]: enabled while video is playing
01:25:01.362 [i]: Profile: using auto values [12]
01:25:01.387 [i]: Playback: playing at 143.75 [25 *23/4]
Opening video filter: [vapoursynth file=/home/djhg2000/.local/share/SVP4/scripts/e297b1d7.py buffered-frames=4 concurrent-frames=17]
[vapoursynth] Script evaluation failed:
[vapoursynth] Python exception: SVSmoothFps: unable to init GPU-based renderer - code 65536
[vapoursynth] Traceback (most recent call last):
[vapoursynth] File "vapoursynth.pyx", line 1489, in vapoursynth.vpy_evaluateScript (src/cython/vapoursynth.c:23962)
[vapoursynth] File "/home/djhg2000/.local/share/SVP4/scripts/e297b1d7.py", line 52, in <module>
[vapoursynth] smooth = interpolate(clip)
[vapoursynth] File "/home/djhg2000/.local/share/SVP4/scripts/e297b1d7.py", line 36, in interpolate
[vapoursynth] smooth = core.svp2.SmoothFps(input,super["clip"],super["data"],vectors["clip"],vectors["data"],smoothfps_params,src=clip,fps=container_fps)
[vapoursynth] File "vapoursynth.pyx", line 1381, in vapoursynth.Function.__call__ (src/cython/vapoursynth.c:22423)
[vapoursynth] vapoursynth.Error: SVSmoothFps: unable to init GPU-based renderer - code 65536
[vapoursynth]
Video filter chain:
[in] 1280x720 yuv420p bt.709/limited CL=mpeg2/4/h264
[vapoursynth] 1280x720 yuv420p bt.709/limited CL=mpeg2/4/h264 <---
[out] ???
01:25:01.601 [E]: Playback [e297b1d7]: VS - Script evaluation failed:
01:25:01.601 [E]: Playback [e297b1d7]: VS - Python exception: SVSmoothFps: unable to init GPU-based renderer - code 65536
01:25:01.601 [E]: Playback [e297b1d7]: VS - Traceback (most recent call last):
01:25:01.601 [E]: Playback [e297b1d7]: VS - File *vapoursynth.pyx*, line 1489, in vapoursynth.vpy_evaluateScript (src/cython/vapoursynth.c:23962)
01:25:01.601 [E]: Playback [e297b1d7]: VS - File */home/djhg2000/.local/share/SVP4/scripts/e297b1d7.py*, line 52, in <module>
01:25:01.601 [E]: Playback [e297b1d7]: VS - smooth = interpolate(clip)
01:25:01.601 [E]: Playback [e297b1d7]: VS - File */home/djhg2000/.local/share/SVP4/scripts/e297b1d7.py*, line 36, in interpolate
01:25:01.601 [E]: Playback [e297b1d7]: VS - smooth = core.svp2.SmoothFps(input,super[*clip*],super[*data*],vectors[*clip*],vectors[*data*],smoothfps_params,src=clip,fps=container_fps)
01:25:01.601 [E]: Playback [e297b1d7]: VS - File *vapoursynth.pyx*, line 1381, in vapoursynth.Function.__call__ (src/cython/vapoursynth.c:22423)
01:25:01.602 [E]: Playback [e297b1d7]: VS - vapoursynth.Error: SVSmoothFps: unable to init GPU-based renderer - code 65536
Opening video filter: [vapoursynth file=/home/djhg2000/.local/share/SVP4/scripts/e297b1d7.py buffered-frames=4 concurrent-frames=17]
[vapoursynth] Script evaluation failed:
[vapoursynth] Python exception: SVSmoothFps: unable to init GPU-based renderer - code 65536
[vapoursynth] Traceback (most recent call last):
[vapoursynth] File "vapoursynth.pyx", line 1489, in vapoursynth.vpy_evaluateScript (src/cython/vapoursynth.c:23962)
[vapoursynth] File "/home/djhg2000/.local/share/SVP4/scripts/e297b1d7.py", line 52, in <module>
[vapoursynth] smooth = interpolate(clip)
[vapoursynth] File "/home/djhg2000/.local/share/SVP4/scripts/e297b1d7.py", line 36, in interpolate
[vapoursynth] smooth = core.svp2.SmoothFps(input,super["clip"],super["data"],vectors["clip"],vectors["data"],smoothfps_params,src=clip,fps=container_fps)
[vapoursynth] File "vapoursynth.pyx", line 1381, in vapoursynth.Function.__call__ (src/cython/vapoursynth.c:22423)
[vapoursynth] vapoursynth.Error: SVSmoothFps: unable to init GPU-based renderer - code 65536
[vapoursynth]
Inconsistency detected by ld.so: dl-close.c: 762: _dl_close: Assertion `map->l_init_called' failed!
01:25:01.697 [i]: Playback [e297b1d7]: disabled while video is playing
01:25:01.698 [i]: Playback [e297b1d7]: deleted
Segmentation fault (core dumped)
It works fine if I disable OpenCL (by moving /etc/OpenCL/vendors/amdocl64.icd to /etc/OpenCL/vendors/amdocl64.icd.bak). I'm starting to think there's something wrong with the OpenCL implementation itself.
Mid-post update: I tried to run the testing tools (from https://github.com/hpc12/tools) again with the proper OpenCL device (derp) and found that selecting the GPU throws this error:
*** build of 'sum' on 'Devastator' said:
"/tmp/OCLWqA90x.cl", line 1: error: can't enable all OpenCL extensions or
unrecognized OpenCL extension
#pragma OPENCL EXTENSION cl_khr_fp64: enable
^
1 error detected in the compilation of "/tmp/OCLWqA90x.cl".
Frontend phase failed compilation.
*** (end of message)
*** 'clBuildProgram' in 'cl-helper.c' on line 470 failed with error 'build program failure'.
Aborted (core dumped)
I recall from the output of clinfo that "cl_khr_fp64" is the double type supported on the CPU, the GPU only supports "cl_amd_fp64". From the context I guess "khr" refers to Khronos? If so I think this means my GPU doesn't support standard double types in OpenCL.
Armed with this theory I ran the following in the tools directory:
sed -i 's/cl_khr_fp64/cl_amd_fp64/' vec-add-soln.cl
Then I recompiled the tools with
make clean
make OPENCL_INC="/opt/AMDAPP/include/"
I then ran the cl-demo tool again, which terminated with this message:
*** Kernel compilation resulted in non-empty log message.
*** Set environment variable CL_HELPER_PRINT_COMPILER_OUTPUT=1 to see more.
*** NOTE: this may include compiler warnings and other important messages
*** about your code.
*** Set CL_HELPER_NO_COMPILER_OUTPUT_NAG=1 to disable this message.
0.001141 s
10.514965 GB/s
GOOD
So in short, my GPU is weird but now I know about it and I can, in theory, fix it!
Hopefully newer AMD GPUs supports the Khronos extensions, but it seems it's as simple (it's never simple) as replacing "cl_khr_fp64" with "cl_amd_fp64". From my extremely limited testing they seem to behave close enough to be compatible.
I'm sorry it turned into such a lengthy post, but I really hope any of this information helps