[v0.23] Sort PCI devices; this makes the devices list to match CUDA driver ordering, which fixes a bug when there was more than one NVIDIA GPU

This commit is contained in:
Dr-Noob
2022-01-22 13:25:22 +01:00
parent 23586a18e9
commit bd1158c139
11 changed files with 103 additions and 20 deletions

View File

@@ -15,7 +15,7 @@ struct pci {
uint16_t func;
};
struct pci* get_pci_from_pciutils(struct pci_dev *devices, int id);
struct pci* get_pci_from_pciutils(struct pci_dev *devices, int id, int idx);
struct pci_dev *get_pci_devices_from_pciutils();
void print_gpus_list_pci();