From 9b6fd1c9ec850166bffc7ff4a6ed5c2a51ef54b1 Mon Sep 17 00:00:00 2001 From: RedBlackAka <140876408+RedBlackAka@users.noreply.github.com> Date: Sat, 21 Dec 2024 03:58:21 +0100 Subject: [PATCH] Capitalize machine learnings runner names Capitalizes CPU, DirectML and CoreML. This was something that was bugging me. --- OpenUtau.Core/Util/Onnx.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/OpenUtau.Core/Util/Onnx.cs b/OpenUtau.Core/Util/Onnx.cs index a7bbc7a6c..dd80a138e 100644 --- a/OpenUtau.Core/Util/Onnx.cs +++ b/OpenUtau.Core/Util/Onnx.cs @@ -19,17 +19,17 @@ public class Onnx { public static List getRunnerOptions() { if (OS.IsWindows()) { return new List { - "cpu", - "directml" + "CPU", + "DirectML" }; } else if (OS.IsMacOS()) { return new List { - "cpu", - "coreml" + "CPU", + "CoreML" }; } return new List { - "cpu" + "CPU" }; } @@ -64,13 +64,13 @@ private static SessionOptions getOnnxSessionOptions(){ runner = runnerOptions[0]; } if (!runnerOptions.Contains(runner)) { - runner = "cpu"; + runner = "CPU"; } switch(runner){ - case "directml": + case "DirectML": options.AppendExecutionProvider_DML(Preferences.Default.OnnxGpu); break; - case "coreml": + case "CoreML": options.AppendExecutionProvider_CoreML(CoreMLFlags.COREML_FLAG_ENABLE_ON_SUBGRAPH); break; }