C++ API to query NVENC concurrency limit

This question has been asked in the forum without an answer. Since the last activity on that topic is one year ago, I am starting a new topic.

We are building a software that utilizes NVENC in multiple use cases. Unfortunately, since it’s quite unpredictive what GPU model the users have, we have to determine the number of NVENC concurrency from inside our logic to determine our software’s behavior.

One way that seems to work but actually does not is to maintain a table of GPU model string to the concurrency limit:

  1. With different drivers, the queried GPU model string can be different, thus deemed this method unreliable.
  2. For any new product on the market, we need to patch our software to make the table work.
  3. The values of the concurrency limit may change along the way. NVIDIA Silently Increases GeForce NVENC Concurrent Sessions Limit to 3 | TechPowerUp

NVENC documents, and the samples does not mention anything about how to query the NVENC concurrency limit. IMHO it’s fair to ask for such API.

https://docs.nvidia.com/video-technologies/video-codec-sdk/nvenc-application-note/#nvenc-licensing-policy