docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CommandBufferWorkerExtensions

    Provides extension methods for scheduling the worker from a CommandBuffer.

    Inheritance
    object
    CommandBufferWorkerExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.InferenceEngine
    Assembly: Unity.InferenceEngine.dll
    Syntax
    [MovedFrom("Unity.Sentis")]
    public static class CommandBufferWorkerExtensions

    Methods

    ScheduleWorker(CommandBuffer, Worker)

    Schedules the execution of the model on a worker using a command buffer. This is non-blocking.

    Call Graphics.ExecuteCommandBuffer to execute the command buffer after scheduling.

    Declaration
    public static void ScheduleWorker(this CommandBuffer cb, Worker worker)
    Parameters
    Type Name Description
    CommandBuffer cb

    The command buffer.

    Worker worker

    The worker.

    ScheduleWorker(CommandBuffer, Worker, Tensor)

    Schedules the execution of the model on a worker using a command buffer. This is non-blocking.

    Call Graphics.ExecuteCommandBuffer to execute the command buffer after scheduling.

    Declaration
    public static void ScheduleWorker(this CommandBuffer cb, Worker worker, Tensor input)
    Parameters
    Type Name Description
    CommandBuffer cb

    The command buffer.

    Worker worker

    The worker.

    Tensor input

    The tensor to set to the default input of the model.

    ScheduleWorker(CommandBuffer, Worker, params Tensor[])

    Schedules the execution of the model on a worker using a command buffer. This is non-blocking.

    Call Graphics.ExecuteCommandBuffer to execute the command buffer after scheduling.

    Declaration
    public static void ScheduleWorker(this CommandBuffer cb, Worker worker, params Tensor[] inputs)
    Parameters
    Type Name Description
    CommandBuffer cb

    The command buffer.

    Worker worker

    The worker.

    Tensor[] inputs

    The tensors to set to the inputs of the model.

    ScheduleWorkerIterable(CommandBuffer, Worker)

    Schedules the execution of the model on a worker using a command buffer in parts. This is non-blocking.

    Call Graphics.ExecuteCommandBuffer to execute the command buffer after scheduling.

    To schedule the execution of the next layer of the model, call MoveNext on the IEnumerator object this method returns.

    Declaration
    public static IEnumerator ScheduleWorkerIterable(this CommandBuffer cb, Worker worker)
    Parameters
    Type Name Description
    CommandBuffer cb

    The command buffer.

    Worker worker

    The worker.

    Returns
    Type Description
    IEnumerator

    The IEnumerator for iterating the scheduling.

    ScheduleWorkerIterable(CommandBuffer, Worker, Tensor)

    Schedules the execution of the model on a worker using a command buffer in parts. This is non-blocking.

    Call Graphics.ExecuteCommandBuffer to execute the command buffer after scheduling.

    To schedule the execution of the next layer of the model, call MoveNext on the IEnumerator object this method returns.

    Declaration
    public static IEnumerator ScheduleWorkerIterable(this CommandBuffer cb, Worker worker, Tensor input)
    Parameters
    Type Name Description
    CommandBuffer cb

    The command buffer.

    Worker worker

    The worker.

    Tensor input

    The tensor to set to the default input of the model.

    Returns
    Type Description
    IEnumerator

    The IEnumerator for iterating the scheduling.

    ScheduleWorkerIterable(CommandBuffer, Worker, params Tensor[])

    Schedules the execution of the model on a worker using a command buffer in parts. This is non-blocking.

    Call Graphics.ExecuteCommandBuffer to execute the command buffer after scheduling.

    To schedule the execution of the next layer of the model, call MoveNext on the IEnumerator object this method returns.

    Declaration
    public static IEnumerator ScheduleWorkerIterable(this CommandBuffer cb, Worker worker, params Tensor[] inputs)
    Parameters
    Type Name Description
    CommandBuffer cb

    The command buffer.

    Worker worker

    The worker.

    Tensor[] inputs

    The tensors to set to the inputs of the model.

    Returns
    Type Description
    IEnumerator

    The IEnumerator for iterating the scheduling.

    In This Article
    Back to top
    Copyright © 2025 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)