Scanner C++ API
Public Member Functions | List of all members
scanner::internal::KernelFactory Class Reference

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
 
BaseKernelnew_instance (const KernelConfig &config)
 

Detailed Description

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.

Member Function Documentation

DeviceType scanner::internal::KernelFactory::get_device_type ( ) const
inline

Describes the capabilities of the ops the factory produces.


The documentation for this class was generated from the following file: