Skip to content

TensorSplitsCollection

Namespace: LLama.Abstractions

A fixed size array to set the tensor splits across multiple GPUs

public sealed class TensorSplitsCollection : System.Collections.Generic.IEnumerable`1[[System.Single, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.IEnumerable

Inheritance ObjectTensorSplitsCollection
Implements IEnumerable<Single>, IEnumerable

Properties

Length

The size of this array

public int Length { get; }

Property Value

Int32

Item

public float Item { get; set; }

Property Value

Single

Constructors

TensorSplitsCollection(Single[])

Create a new tensor splits collection, copying the given values

public TensorSplitsCollection(Single[] splits)

Parameters

splits Single[]

Exceptions

ArgumentException

TensorSplitsCollection()

Create a new tensor splits collection with all values initialised to the default

public TensorSplitsCollection()

Methods

Clear()

Set all values to zero

public void Clear()

Pin()

internal MemoryHandle Pin()

Returns

MemoryHandle

GetEnumerator()

public IEnumerator<float> GetEnumerator()

Returns

IEnumerator<Single>