Refactor NVML wrapper and update CORS policy; add appsettings configuration files

This commit is contained in:
Din
2025-04-30 17:01:33 +08:00
parent 413360ece2
commit 294438145a
8 changed files with 122 additions and 19 deletions
+4 -4
View File
@@ -10,13 +10,13 @@ public static class NvmlWrapper
public static extern int NvmlShutdown();
// Get device count
[DllImport("nvml.dll", CallingConvention = CallingConvention.Cdecl)]
private static extern int nvmlDeviceGetCount_v2(ref uint deviceCount);
/* [DllImport("nvml.dll", CallingConvention = CallingConvention.Cdecl)]
private static extern int nvmlDeviceGetCount_v2(ref uint deviceCount); */
public static int NvmlDeviceGetCount(ref uint deviceCount)
/* public static int NvmlDeviceGetCount(ref uint deviceCount)
{
return nvmlDeviceGetCount_v2(ref deviceCount);
}
} */
[DllImport("nvml.dll", EntryPoint = "nvmlDeviceGetHandleByIndex_v2")]
public static extern int NvmlDeviceGetHandleByIndex(int index, out IntPtr device);