change in OpenCL device numbering behaviour

These CUDA filters are packaged into DGDecodeNV, which is part of DGDecNV.
Post Reply
User avatar
hydra3333
Distinguished Aussie Member
Distinguished Aussie Member
Posts: 150
Joined: Wed Oct 06, 2010 3:34 am
Contact:

change in OpenCL device numbering behaviour

Post by hydra3333 » Wed Dec 05, 2018 6:25 pm

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.

User avatar
admin
Site Admin
Posts: 4274
Joined: Thu Sep 09, 2010 3:08 pm

Re: change in OpenCL device numbering behaviour

Post by admin » Wed Dec 05, 2018 8:22 pm

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.

User avatar
hydra3333
Distinguished Aussie Member
Distinguished Aussie Member
Posts: 150
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Re: change in OpenCL device numbering behaviour

Post by hydra3333 » Sat Dec 08, 2018 10:17 am

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
Clipboard01.jpg (64.35 KiB) Viewed 481 times

User avatar
admin
Site Admin
Posts: 4274
Joined: Thu Sep 09, 2010 3:08 pm

Re: change in OpenCL device numbering behaviour

Post by admin » Sat Dec 08, 2018 11:46 am

Yup, DGDecNV doesn't know anything about Intel GPUs.

Post Reply