Read Nvidia Driver version via NVML

This commit is contained in:
harlekin
2023-01-06 14:19:34 +00:00
parent aaa1b466dd
commit 1bf519c9c3
9 changed files with 115 additions and 27 deletions

View File

@@ -49,6 +49,10 @@ public class Linux extends OS {
return "cuda";
}
@Override public String getNVMLLib() {
return "nvidia-ml";
}
@Override public Process exec(List<String> command, Map<String, String> env_overight) throws IOException {
Map<String, String> new_env = new HashMap<String, String>();
new_env.putAll(java.lang.System.getenv()); // clone the env

View File

@@ -63,6 +63,11 @@ public abstract class OS {
return null;
}
//path to NVIDIA NVML lib
public String getNVMLLib() {
return null;
}
public abstract boolean getSupportHighPriority();
public abstract boolean checkNiceAvailability();

View File

@@ -42,6 +42,9 @@ public class Windows extends OS {
@Override public String getCUDALib() {
return "nvcuda";
}
@Override public String getNVMLLib() {
return "nvml";
}
@Override public Process exec(List<String> command, Map<String, String> env) throws IOException {
// disable a popup because the renderer might crash (seg fault)