Show / Hide Table of Contents

Class OrtTensorRTProviderOptions

Holds the options for configuring a TensorRT Execution Provider instance

Inheritance
System.Object
OrtTensorRTProviderOptions
Namespace: Microsoft.ML.OnnxRuntime
Assembly: cs.temp.dll.dll
Syntax
public class OrtTensorRTProviderOptions : SafeHandle

Constructors

OrtTensorRTProviderOptions()

Constructs an empty OrtTensorRTProviderOptions instance

Declaration
public OrtTensorRTProviderOptions()

Properties

IsInvalid

Overrides SafeHandle.IsInvalid

Declaration
public override bool IsInvalid { get; }
Property Value
Type Description
System.Boolean

returns true if handle is equal to Zero

Methods

GetDeviceId()

Get device id of TensorRT EP.

Declaration
public int GetDeviceId()
Returns
Type Description
System.Int32

device id

GetOptions()

Get TensorRT EP provider options

Declaration
public string GetOptions()
Returns
Type Description
System.String

return C# UTF-16 encoded string

ReleaseHandle()

Overrides SafeHandle.ReleaseHandle() to properly dispose of the native instance of OrtTensorRTProviderOptions

Declaration
protected override bool ReleaseHandle()
Returns
Type Description
System.Boolean

always returns true

UpdateOptions(Dictionary<String, String>)

Updates the configuration knobs of OrtTensorRTProviderOptions that will eventually be used to configure a TensorRT EP Please refer to the following on different key/value pairs to configure a TensorRT EP and their meaning: https://www.onnxruntime.ai/docs/reference/execution-providers/TensorRT-ExecutionProvider.html

Declaration
public void UpdateOptions(Dictionary<string, string> providerOptions)
Parameters
Type Name Description
Dictionary<System.String, System.String> providerOptions

key/value pairs used to configure a TensorRT Execution Provider

In This Article
Back to top