I want to detect the AMD GPU generation in Python code. My case is that to run specific application (DaVinci Resolve), it is required to use AMDGPU-PRO drivers for GPU cards before Vega. And AMDGPU-PRO drivers are not required when the AMD GPU is Vega or a newer generation. See the list of AMD GPUs on Wikipedia. I am writing a script (davinci-resolve-checker) that tells the user if he/she needs to use that driver.
The question is, how do I differentiate between GPU generations/chip codenames of a GPU? I am using pylspci to get information of the presented GPUs. Is there a list of generations that I can check with?