I am implementing a video decoder using NVidia's NvDec CUVID feature. According to chapter 2 of the (woefully inadequate) manual, decoding limits are specified by GPU architecture. ie, the maximum h265 horizontal resolution is 8192 on a GP10x, 4096 on a GP100 or less, and unsupported on any architecture less than GM206.
How do I use CUDA to detect such architectures? Am I supposed to infer it from compute capabilities or what? And if I'm supposed to infer it, is there a table of architectures vs compute capabilities?
Though there isn't a function that returns code name of GPU, NVIDIA provides
cuvidGetDecoderCaps()
API to let users query the capabilities of underlying hardware video decoder.A detailed example of
cuvidGetDecoderCaps()
can be found inVideo_Codec_SDK_x.x.x
downloaded from nvenc official site. One example inSamples/NvDecodeD3D11/NvDecodeD3D11.cpp
: