Page 1 of 1

change in OpenCL device numbering behaviour

Posted: Wed Dec 05, 2018 5:25 pm
by hydra3333
It seems there has been a recent change in OpenCL device numbering behaviour in Windows and/or nvidia driver and/or ffmpeg.

Until recently, the ffmpeg command below used to consistently report NVIDIA CUDA device as number 1.0 and the other as 0.0 (on multiple computers).

Just recently, I noticed that the device numbers (on multiple computers) had swapped around and remained consistently that way across reboots.

I am not sure if that was caused by recent very large Win10x64 update, or a newer build of ffmpeg-with-opencl. Hence I am unsure if the change may affect your software or not.

Code: Select all

"ffmpeg.exe" -hide_banner -v verbose -init_hw_device opencl
[AVHWDeviceContext @ 0000025f0ef2a1c0] 0.0: NVIDIA CUDA / GeForce GTX 1050 Ti
[AVHWDeviceContext @ 0000025f0ef2a1c0] 1.0: Intel(R) OpenCL /         Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz
[AVHWDeviceContext @ 0000025f0ef2a1c0] More than one matching device found.
Device creation failed: -19.
Failed to set value 'opencl' for option 'init_hw_device': No such device
Error parsing global options: No such device
The change caused me some grief in some hard-coded .bat files which assumed consistent device numbering over time.

Cheers.

Re: change in OpenCL device numbering behaviour

Posted: Wed Dec 05, 2018 7:22 pm
by admin
I don't know much about OpenCL so it's hard to comment. What DG tools go by is the device number shown in Video/List GPU Devices. What do you see there and how does it compare to the OpenCL numbering?

EDIT: This link is interesting: https://anteru.net/blog/2014/08/01/2483/index.html.

"What we need is to get a persistent, unique identifier for each device which remains stable between processes, so we can match an OpenCL device id to a physical GPU. There's no such thing in standard OpenCL, but luckily for us, there are some severely under-documented, vendor specific extensions which can help us."

So maybe your reported behavior is not unexpected.

Re: change in OpenCL device numbering behaviour

Posted: Sat Dec 08, 2018 9:17 am
by hydra3333
Ah. Thank you. I guess it is not unexpected if one knows to expect it :)
Given in my case the 2 manufacturers of stuff in the same PC are Intel and Nvidia, I should expect the worst :D
Clipboard01.jpg

Re: change in OpenCL device numbering behaviour

Posted: Sat Dec 08, 2018 10:46 am
by admin
Yup, DGDecNV doesn't know anything about Intel GPUs.