Bugfix: if two gpus have the same name/model, the actual gpu used was the first in the list
This commit is contained in:
@@ -96,7 +96,7 @@ public class GPU {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static List<String> listDevices() {
|
||||
public static List<String> listModels() {
|
||||
if (devices == null) {
|
||||
generate();
|
||||
}
|
||||
@@ -111,6 +111,17 @@ public class GPU {
|
||||
return devs;
|
||||
}
|
||||
|
||||
public static List<GPUDevice> listDevices() {
|
||||
if (devices == null) {
|
||||
generate();
|
||||
}
|
||||
if (devices == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return devices;
|
||||
}
|
||||
|
||||
public static GPUDevice getGPUDevice(String device_model) {
|
||||
if (device_model == null) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user