From 5d60d57ce2b263f3e148c7b7d97b96c748405660 Mon Sep 17 00:00:00 2001 From: gwang-msft <62914304+gwang-msft@users.noreply.github.com> Date: Sat, 5 Sep 2020 04:40:38 -0700 Subject: [PATCH] Add csharp API for AddSessionConfigEntry (#5072) Co-authored-by: gwang0000 <62914304+gwang0000@users.noreply.github.com> --- csharp/src/Microsoft.ML.OnnxRuntime/SessionOptions.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/csharp/src/Microsoft.ML.OnnxRuntime/SessionOptions.cs b/csharp/src/Microsoft.ML.OnnxRuntime/SessionOptions.cs index b9118ccc23..54960c9e1c 100644 --- a/csharp/src/Microsoft.ML.OnnxRuntime/SessionOptions.cs +++ b/csharp/src/Microsoft.ML.OnnxRuntime/SessionOptions.cs @@ -175,6 +175,10 @@ namespace Microsoft.ML.OnnxRuntime NativeApiStatus.VerifySuccess(NativeMethods.OrtRegisterCustomOpsLibrary(handle, libraryPath, out libraryHandle)); } + public void AddSessionConfigEntry(string configKey, string configValue) + { + NativeApiStatus.VerifySuccess(NativeMethods.OrtAddSessionConfigEntry(handle, configKey, configValue)); + } #endregion internal IntPtr Handle