Show / Hide Table of Contents

Class OrtExternalInitializerInfo

Class to that stores information about the file location where an "external" initializer is stored.

Inheritance
object
CriticalFinalizerObject
SafeHandle
OrtExternalInitializerInfo
Implements
IDisposable
IReadOnlyExternalInitializerInfo
Inherited Members
SafeHandle.handle
SafeHandle.Close()
SafeHandle.DangerousAddRef(ref bool)
SafeHandle.DangerousGetHandle()
SafeHandle.DangerousRelease()
SafeHandle.Dispose()
SafeHandle.Dispose(bool)
SafeHandle.SetHandle(nint)
SafeHandle.SetHandleAsInvalid()
SafeHandle.IsClosed
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Microsoft.ML.OnnxRuntime
Assembly: Microsoft.ML.OnnxRuntime.dll
Syntax
public class OrtExternalInitializerInfo : SafeHandle, IDisposable, IReadOnlyExternalInitializerInfo

Constructors

| Improve this Doc View Source

OrtExternalInitializerInfo(string, long, long)

Create a new OrtExternalInitializerInfo instance.

Declaration
public OrtExternalInitializerInfo(string filePath, long fileOffset, long byteSize)
Parameters
Type Name Description
string filePath

The path to the file that stores the initializer data.

long fileOffset

The byte offset in the file where the data is stored.

long byteSize

The size of the data (in bytes) within the file.

Properties

| Improve this Doc View Source

IsInvalid

Indicates whether the native handle is invalid.

Declaration
public override bool IsInvalid { get; }
Property Value
Type Description
bool
Overrides
SafeHandle.IsInvalid

Methods

| Improve this Doc View Source

GetByteSize()

Get the size in bytes of the initializer's data within the file.

Declaration
public long GetByteSize()
Returns
Type Description
long

The size in bytes of the initializer data.

| Improve this Doc View Source

GetFileOffset()

Get the byte offset within the file where the initializer's data is stored.

Declaration
public long GetFileOffset()
Returns
Type Description
long

The file offset location.

| Improve this Doc View Source

GetFilePath()

Get the file path to the file that store's the initializer's data.

Declaration
public string GetFilePath()
Returns
Type Description
string

The file path.

Remarks

The path is relative to the filesystem directory where the ONNX model was stored.

| Improve this Doc View Source

ReleaseHandle()

Release the native instance of OrtExternalInitializerInfo if we own it.

Declaration
protected override bool ReleaseHandle()
Returns
Type Description
bool

true on success and false on error.

Overrides
SafeHandle.ReleaseHandle()

Implements

IDisposable
IReadOnlyExternalInitializerInfo
  • Improve this Doc
  • View Source
In This Article
Back to top