diff --git a/csharp/src/Microsoft.ML.OnnxRuntime/InferenceSession.cs b/csharp/src/Microsoft.ML.OnnxRuntime/InferenceSession.cs index bcf680fbe4..fd5133534b 100644 --- a/csharp/src/Microsoft.ML.OnnxRuntime/InferenceSession.cs +++ b/csharp/src/Microsoft.ML.OnnxRuntime/InferenceSession.cs @@ -137,15 +137,15 @@ namespace Microsoft.ML.OnnxRuntime var inputTensors = new IntPtr[inputs.Count]; var pinnedBufferHandles = new System.Buffers.MemoryHandle[inputs.Count]; - int offset = 0; + int inputIndex = 0; foreach (var input in inputs) { - inputNames[offset] = input.Name; + inputNames[inputIndex] = input.Name; // create Tensor from the input if feasible, else throw notsupported exception for now - input.ToNativeOnnxValue(out inputTensors[offset], out pinnedBufferHandles[offset]); + input.ToNativeOnnxValue(out inputTensors[inputIndex], out pinnedBufferHandles[inputIndex]); - offset++; + inputIndex++; } string[] outputNamesArray = outputNames.ToArray(); diff --git a/csharp/src/Microsoft.ML.OnnxRuntime/SessionOptions.cs b/csharp/src/Microsoft.ML.OnnxRuntime/SessionOptions.cs index 9aded53148..c5d36c6a05 100644 --- a/csharp/src/Microsoft.ML.OnnxRuntime/SessionOptions.cs +++ b/csharp/src/Microsoft.ML.OnnxRuntime/SessionOptions.cs @@ -7,17 +7,6 @@ using System.Runtime.InteropServices; namespace Microsoft.ML.OnnxRuntime { - /// - /// Various providers of ONNX operators - /// - public enum ExecutionProvider - { - Cpu, - MklDnn, - Cuda - //TODO: add more providers gradually - }; - /// /// Holds the options for creating an InferenceSession /// @@ -56,7 +45,7 @@ namespace Microsoft.ML.OnnxRuntime /// public void EnableSequentialExecution() { - NativeMethods.OrtEnableSequentialExecution(_nativePtr); + NativeMethods.OrtEnableSequentialExecution(_nativePtr); } /// diff --git a/docs/CSharp_API.md b/docs/CSharp_API.md index 97976ae921..af9d889390 100644 --- a/docs/CSharp_API.md +++ b/docs/CSharp_API.md @@ -117,15 +117,6 @@ Enable Sequential Execution. By default, it is enabled. DisableSequentialExecution(); Disable Sequential Execution and enable Parallel Execution. - AppendExecutionProvider(ExecutionProvider provider); -Appends execution provider to the session. For any operator in the graph the first execution provider that implements the operator will be user. ExecutionProvider is defined as the following enum. - - enum ExecutionProvider - { - Cpu, - MklDnn - } - ### NodeMetadata Container of metadata for a model graph node, used for communicating the shape and type of the input and output nodes.