docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Namespace Unity.Sentis

    Classes

    BurstTensorData

    Represents Burst-specific internal data storage for a Tensor.

    CPUBackend

    Represents a CPU backend ops.

    ComputeInfo

    Represents information about the compute capabilities of the GPU.

    ComputeTensorData

    Represents data storage for a Tensor as a compute buffer, for GPUCompute backend.

    Functional

    Represents the static functional methods for model building and compilation.

    FunctionalExtensions

    Represents extension functions for the Sentis functional API.

    FunctionalTensor

    Represents a tensor that is a result of tensor operations.

    GPUCommandBufferBackend

    Represents a GPUCompute backend ops.

    GPUComputeBackend

    Represents a GPUCompute backend ops.

    GPUPixelBackend

    Represents a GPUPixel backend ops.

    GenericWorker

    Represents a generic implementation of an IWorker.

    Model

    Represents a Sentis neural network.

    ModelAsset

    Represents a Sentis model asset.

    ModelAssetData

    Represents data storage for a Sentis model asset.

    ModelAssetWeightsData

    Represents data storage for the constant weights of a model.

    ModelLoader

    Provides methods for loading models.

    ModelWriter

    Provides methods for saving 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.

    PixelShaderSingleton

    Represents the compute kernel cache for backends that use GPU pixel shaders.

    Random

    Represents a pseudo-random number generator used by Sentis.

    Tensor

    Represents data in a multidimensional array-like structure.

    Ownership and lifetime:

    • Disposed needs to be called on the main thread.
    • Ownership is always to the owner of the object.

    Data Representation:

    • TensorShape represents the data layout of the tensor
    • Data is held by a tensorData (ITensorData) which can be on a given backend
    • Data is stored in a flattened row major format
    • Data can be pending (ie computation is being done in parallel)
      • call CompleteAllPendingOperations for a blocking call to finish computing the tensor's data Data can be in a non readable type (GPU/NPU)
      • Call CompleteAllPendingOperations to finish computing the tensor's data
      • Call ReadbackAndClone or ReadBackAndCloneAsync to allow reading the tensor's data

    Data manipulation

    • ToReadOnlyArray returns a copy of the tensor's data
    • dataOnBackend can be manipulated directly to avoid a unnecessary copy see ComputeTensorData/BurstTensorData for info

    TensorByte

    Represents data in a multidimensional array-like structure.

    Ownership and lifetime:

    • Disposed needs to be called on the main thread.
    • Ownership is always to the owner of the object.

    Data Representation:

    • TensorShape represents the data layout of the tensor
    • Data is held by a tensorData (ITensorData) which can be on a given backend
    • Data is stored in a flattened row major format
    • Data can be pending (ie computation is being done in parallel)
      • call CompleteAllPendingOperations for a blocking call to finish computing the tensor's data Data can be in a non readable type (GPU/NPU)
      • Call CompleteAllPendingOperations to finish computing the tensor's data
      • Call ReadbackAndClone or ReadBackAndCloneAsync to allow reading the tensor's data

    Data manipulation

    • ToReadOnlyArray returns a copy of the tensor's data
    • dataOnBackend can be manipulated directly to avoid a unnecessary copy see ComputeTensorData/BurstTensorData for info

    TensorFloat

    Represents data in a multidimensional array-like structure.

    Ownership and lifetime:

    • Disposed needs to be called on the main thread.
    • Ownership is always to the owner of the object.

    Data Representation:

    • TensorShape represents the data layout of the tensor
    • Data is held by a tensorData (ITensorData) which can be on a given backend
    • Data is stored in a flattened row major format
    • Data can be pending (ie computation is being done in parallel)
      • call CompleteAllPendingOperations for a blocking call to finish computing the tensor's data Data can be in a non readable type (GPU/NPU)
      • Call CompleteAllPendingOperations to finish computing the tensor's data
      • Call ReadbackAndClone or ReadBackAndCloneAsync to allow reading the tensor's data

    Data manipulation

    • ToReadOnlyArray returns a copy of the tensor's data
    • dataOnBackend can be manipulated directly to avoid a unnecessary copy see ComputeTensorData/BurstTensorData for info

    TensorInt

    Represents data in a multidimensional array-like structure.

    Ownership and lifetime:

    • Disposed needs to be called on the main thread.
    • Ownership is always to the owner of the object.

    Data Representation:

    • TensorShape represents the data layout of the tensor
    • Data is held by a tensorData (ITensorData) which can be on a given backend
    • Data is stored in a flattened row major format
    • Data can be pending (ie computation is being done in parallel)
      • call CompleteAllPendingOperations for a blocking call to finish computing the tensor's data Data can be in a non readable type (GPU/NPU)
      • Call CompleteAllPendingOperations to finish computing the tensor's data
      • Call ReadbackAndClone or ReadBackAndCloneAsync to allow reading the tensor's data

    Data manipulation

    • ToReadOnlyArray returns a copy of the tensor's data
    • dataOnBackend can be manipulated directly to avoid a unnecessary copy see ComputeTensorData/BurstTensorData for info

    TensorShort

    Represents data in a multidimensional array-like structure.

    Ownership and lifetime:

    • Disposed needs to be called on the main thread.
    • Ownership is always to the owner of the object.

    Data Representation:

    • TensorShape represents the data layout of the tensor
    • Data is held by a tensorData (ITensorData) which can be on a given backend
    • Data is stored in a flattened row major format
    • Data can be pending (ie computation is being done in parallel)
      • call CompleteAllPendingOperations for a blocking call to finish computing the tensor's data Data can be in a non readable type (GPU/NPU)
      • Call CompleteAllPendingOperations to finish computing the tensor's data
      • Call ReadbackAndClone or ReadBackAndCloneAsync to allow reading the tensor's data

    Data manipulation

    • ToReadOnlyArray returns a copy of the tensor's data
    • dataOnBackend can be manipulated directly to avoid a unnecessary copy see ComputeTensorData/BurstTensorData for info

    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 RGBA float4 texture.

    Sentis chooses a single tensor dimension as the blocked axis, across which data is chunked in float4 blocks.

    Tensor dimensions don't map directly to texture dimensions. Sentis creates the texture with dimensions large enough to fit all the data and pixel shaders index the data based on both the tensor and texture dimensions (see example below).

    WorkerExtensions

    Provides extension methods for the IWorker interface.

    WorkerFactory

    Provides methods for instantiating workers and ops on given back ends.

    Structs

    ExecutionContext

    Represents a context object that holds the model operations and variables for layer execution.

    InputDef

    Represents an input definition of a model at build time. This holds a data type and shape.

    Model.Input

    Represents an input to a model.

    Model.Output

    Represents an output to a model.

    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.

    TensorIndex

    Represents a set of indices corresponding to each axis of a tensor

    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

    IBackend

    An interface that provides methods for operations on tensors.

    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.

    IModelStorage

    An interface that provides methods for storing variables.

    IReadableTensorData

    An interface that represents tensor data that can be read to and written from on CPU.

    ITensorData

    An interface that represents a device-dependent representation of the data in a tensor.

    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

    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.

    TensorLayout

    Options for the dimension layout in a texture tensor.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)