HasTensorCores defaults to false on error

This commit is contained in:
N00MKRAD
2021-04-05 21:42:41 +02:00
parent a0e06bd306
commit 7e2c2e21f5

View File

@@ -81,6 +81,8 @@ namespace Flowframes.OS
}
public static bool HasTensorCores (int gpu = 0)
{
try
{
if (gpuList == null)
Init();
@@ -92,5 +94,11 @@ namespace Flowframes.OS
return (gpuName.Contains("RTX ") || gpuName.Contains("Tesla V") || gpuName.Contains("Tesla T"));
}
catch (Exception e)
{
Logger.Log($"HasTensorCores({gpu}) Error: {e.Message}", true);
return false;
}
}
}
}