You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
736 B
33 lines
736 B
3 years ago
|
#!/usr/bin/python3
|
||
|
# -*- coding: utf-8 -*-
|
||
|
#
|
||
|
# Copyright (C) 2021 Simone Caronni <negativo17@gmail.com>
|
||
|
# Licensed under the GNU General Public License Version or later
|
||
|
|
||
|
import json
|
||
|
import sys
|
||
|
|
||
|
def main():
|
||
|
if len(sys.argv) != 2:
|
||
|
print("usage: %s supported-gpus.json" % sys.argv[0])
|
||
|
return 1
|
||
|
|
||
|
f = open(sys.argv[1])
|
||
|
gpus_raw = json.load(f)
|
||
|
legacy = 'legacybranch'
|
||
|
devids = []
|
||
|
|
||
|
for product in gpus_raw["chips"]:
|
||
|
|
||
|
if legacy not in product.keys():
|
||
|
|
||
|
devid = int(product["devid"], 16)
|
||
|
if not devid in devids:
|
||
|
devids.append(devid)
|
||
|
|
||
|
for devid in devids:
|
||
|
print("pci:v000010DEd%08Xsv*sd*bc*sc*i*" % (devid))
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
main()
|