Class CommandBufferWorkerExtensions
Provides extension methods for scheduling the worker from a CommandBuffer.
Inherited Members
Namespace: Unity.Sentis
Assembly: Unity.Sentis.dll
Syntax
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 |
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 |
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 |