Class WorkerFactory
Provides methods for instantiating workers and ops on given back ends.
Inheritance
WorkerFactory
Syntax
public class WorkerFactory
Methods
CreateOps(BackendType, ITensorAllocator)
Initializes and returns an instance of IOps on a given back end.
Declaration
public static IOps CreateOps(BackendType backendType, ITensorAllocator allocator)
Parameters
Returns
CreateWorker(BackendType, Model, Boolean)
Initializes and returns an instance of IWorker on a given back end with a model to execute.
Declaration
public static IWorker CreateWorker(BackendType backendType, Model model, bool verbose = false)
Parameters
Returns
CreateWorker(BackendType, Model, WorkerFactory.WorkerConfiguration)
Initializes and returns an instance of IWorker on a given back end with a model to execute and workerConfiguration.
Declaration
public static IWorker CreateWorker(BackendType backendType, Model model, WorkerFactory.WorkerConfiguration workerConfiguration)
Parameters
Returns
CreateWorker(Model, DeviceType, Boolean)
Initializes and returns an instance of IWorker on a given device with a model to execute. Sentis selects the best backend type available for deviceType.
Declaration
public static IWorker CreateWorker(Model model, DeviceType deviceType, bool verbose = false)
Parameters
Returns
GetBestTypeForDevice(DeviceType)
Returns the best backend type for the given deviceType.
Declaration
public static BackendType GetBestTypeForDevice(DeviceType deviceType)
Parameters
Returns
IsType(BackendType, DeviceType)
Checks if a backend is a given backendType. For example, IsType(Type.ComputeShader, DeviceType.GPU) returns true.
Declaration
public static bool IsType(BackendType backendType, DeviceType deviceType)
Parameters
Returns