Namespace Unity.Sentis
Classes
ArrayTensorData
Represents internal Tensor
data backed by a managed array.
BurstTensorData
Represents Burst-specific internal data storage for a Tensor
.
ComputeInfo
Represents information about the compute capabilities of the GPU.
ComputeShaderSingleton
Represents the compute kernel cache for backends that use GPU compute.
ComputeTensorData
Represents data storage for a Tensor
as a compute buffer, for GPUCompute backend.
CPUOps
Represents a CPU backend ops.
ExecutionContext
Represents a context object that holds the model operations and variables for layer execution.
GenericWorker
Represents a generic implementation of an IWorker.
GPUCommandBufferOps
Reference GPU compute IOps
implementation
GPUComputeOps
Represents a GPUCompute backend ops.
GPUPixelOps
Represents a GPUPixel backend ops.
Model
Represents a Sentis neural network.
Model.ImporterWarning
Represents the data structure for a warning from the model importer.
ModelAsset
Represents a Sentis model asset.
ModelAssetData
Represents data storage for a Sentis model asset.
ModelAssetExtensions
Represents extensions for the ModelAsset
class.
ModelAssetWeightsData
Represents data storage for the constant weights of a model.
ModelExtensions
Represents extensions for the Model
class.
ModelLoader
Provides methods for loading models.
NativeTensorArray
Represents an area of native memory that's exposed to managed code.
NativeTensorArrayFromManagedArray
Represents an area of managed memory that's exposed as if it's native memory.
NonDeterministicOutput
Layer output is non deterministic, i.e. may be different each time the layer is run e.g. Layers which use random number generation such as RandomUniform, Bernoulli, Multinomial These layers will not have outputs precalculated at import time for optimization passes
PixelShaderSingleton
Represents the compute kernel cache for backends that use GPU pixel shaders.
Random
Represents a pseudo-random number generator used by Sentis.
SharedArrayTensorData
Represents internal Tensor
data backed by a managed array and shared between multiple tensors.
Tensor
Represents data in a multidimensional array-like structure.
TensorExtensions
Provides extension methods for tensors.
TensorFloat
Represents data in a multidimensional array-like structure of floats.
TensorInt
Represents data in a multidimensional array-like structure of ints.
TextureConverter
Provides methods for converting between textures and tensors.
TextureTensorData
Represents the data storage for a Tensor
as a render texture, for backends that use GPU pixel shaders.
Sentis packs the tensor data into the pixels of an ARGB float4 texture.
Sentis chooses a single tensor dimension as the blocked axis, across which data is chunked in float4
blocks.
Texture dimensions don't map directly to tensor dimensions. Sentis creates the texture with dimensions large enough for the data, and pixel shaders index the data based on both the tensor and texture dimensions.
WaitForCompletion
Provides methods for suspending the execution of coroutines until the worker completes execution on a device, and Sentis downloads the contents of the specified tensor to the main CPU memory.
You usually shouldn't use WaitForCompletion
, unless you access tensor contents on the CPU.
You can only use WaitForCompletion
with a yield
statement in coroutines.
WorkerExtensions
Provides extension methods for the IWorker
interface.
WorkerFactory
Provides methods for instantiating workers and ops on given back ends.
Structs
Model.Input
Represents an input to a model.
Model.OpsetDescription
Represents an ONNX opset domain and version number.
SymbolicTensorDim
Represents a single dimension of a SymbolicTensorShape
.
SymbolicTensorShape
Represents the shape of an input tensor, or the predicted shape of a tensor before Sentis executes.
TensorNDIterator
Represents a struct used to iterate over a TensorShape
.
TensorShape
Represents the shape of a tensor.
TextureTransform
Represents settings for converting between textures and tensors.
Create an instance of TextureTransform
using the constructor, then use the TextureTransform
object as a parameter in TextureConverter
methods.
For example: TextureTransform settings = new TextureTransform().SetDimensions(256, 256, 4).SetTensorLayout(TensorLayout.NHWC);
WorkerFactory.WorkerConfiguration
Represents the configuration for a WorkerFactory
.
Interfaces
IConvertibleToArrayTensorData
An interface that provides methods for converting custom tensor data to ArrayTensorData
.
IConvertibleToBurstTensorData
An interface that provides methods for converting custom tensor data to BurstTensorData
.
IConvertibleToComputeTensorData
An interface that provides methods for converting custom tensor data to ComputeTensorData
.
IDependableMemoryResource
An interface that provides Job system dependency fences for the memory resource.
IOps
An interface that provides methods for operations on tensors.
ITensorAllocator
An interface that provides methods for allocating tensors.
ITensorData
An interface that represents a device-dependent representation of the data in a tensor.
IVars
An interface that provides methods for storing variables.
IWorker
An interface that allows you to execute neural networks (models).
IWorker
abstracts implementation details on different hardware devices such as the CPU and the GPU. IWorker
lets you do the following:
- Specify inputs.
- Schedule the work.
- Get outputs.
Internally, IWorker
translates the neural network from a Model into a set of operations, then sends the operations to the hardware device for asynchronous execution.
Use WorkerFactory.CreateWorker
or Model.CreateWorker
to create a new instance of a worker.
Enums
AllocScope
Options for the lifetime of an allocation.
BackendType
Types of backend that Sentis uses to execute a neural network.
Channel
Set the position of each color channel in a texture tensor.
ChannelSwizzle
Options for the order of the color channels in a texture tensor.
CoordOrigin
Options for the position of the origin (0, 0) in the x and y dimensions of a texture tensor.
DataType
Options for the data type of a Tensor
.
DeviceType
Types of devices that Sentis uses to execute a neural network.
DimType
Types of SymbolicTensorShape
dimension.
Model.WarningType
Represents types of warning from the model importer.
TensorLayout
Options for the dimension layout in a texture tensor.