Scanner C++ API
|
Interface for constructing ops at runtime. More...
#include <kernel_factory.h>
Public Member Functions | |
KernelFactory (const std::string &op_name, DeviceType type, i32 max_devices, const std::map< std::string, DeviceType > &input_devices, const std::map< std::string, DeviceType > &output_devices, bool can_batch, i32 batch_size, KernelConstructor constructor) | |
const std::string & | get_op_name () const |
DeviceType | get_device_type () const |
i32 | get_max_devices () const |
const std::map< std::string, DeviceType > & | get_input_devices () const |
const std::map< std::string, DeviceType > & | get_output_devices () const |
bool | can_batch () const |
i32 | preferred_batch_size () const |
BaseKernel * | new_instance (const KernelConfig &config) |
Interface for constructing ops at runtime.
Scanner pipelines are composed of a sequence of op factories. A single job may use any number of a given op, so the OpFactory allows the user to capture configuration information about the op (e.g. batch size of a neural net, device type) and pass that information to each new op instance. The OpFactory also provides metadata about the inputs and outputs from the op it produces.
|
inline |
Describes the capabilities of the ops the factory produces.