Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions csharp/src/Microsoft.ML.OnnxRuntime/InferenceSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ internal IDisposableReadOnlyCollection<DisposableNamedOnnxValue> Run(IReadOnlyCo
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();
Expand Down
13 changes: 1 addition & 12 deletions csharp/src/Microsoft.ML.OnnxRuntime/SessionOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@

namespace Microsoft.ML.OnnxRuntime
{
/// <summary>
/// Various providers of ONNX operators
/// </summary>
public enum ExecutionProvider
{
Cpu,
MklDnn,
Cuda
//TODO: add more providers gradually
};

/// <summary>
/// Holds the options for creating an InferenceSession
/// </summary>
Expand Down Expand Up @@ -56,7 +45,7 @@ public bool SetSessionGraphOptimizationLevel(uint optimization_level)
/// </param>
public void EnableSequentialExecution()
{
NativeMethods.OrtEnableSequentialExecution(_nativePtr);
NativeMethods.OrtEnableSequentialExecution(_nativePtr);
}

/// <summary>
Expand Down
9 changes: 0 additions & 9 deletions docs/CSharp_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down