[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

@@ -4,7 +4,7 @@
#include "../common/gpu.hpp"
#define CUDA_DRIVER_START_WARNING "Waiting for CUDA driver to start..."
struct gpu_info* get_gpu_info_cuda(int gpu_idx);
struct gpu_info* get_gpu_info_cuda(struct pci_dev *devices, int gpu_idx);
bool print_gpu_cuda(struct gpu_info* gpu);
char* get_str_sm(struct gpu_info* gpu);
char* get_str_cores_sm(struct gpu_info* gpu);