17#ifndef _LOCOMOTIV_SESSION_H_
18#define _LOCOMOTIV_SESSION_H_
54 : _graph(g), _outputs(custom_outputs)
60 template <
typename InputIt>
79 void set_input(uint32_t index, std::unique_ptr<NodeData> &&data);
103 std::vector<loco::Node *> _outputs;
InputContext * inputs(void)
Logical unit of computation.
uint32_t size(void) const
Return the number of objects.
Session for loco graph inference.
const NodeData * get_output(uint32_t index)
Get output of graph as NodeData.
~Session()
Free all node annotations of the graph assigned by this Session.
void set_input(uint32_t index, std::unique_ptr< NodeData > &&data)
Set graph input at specific index by NodeData.
Session(loco::Graph *g, const std::vector< loco::Node * > &custom_outputs)
Make Session for graph with selective custom outputs. Only subgraph to calculate given outputs would ...
void infer()
Do inference for this session and graph.
const loco::Node * get_output_node(uint32_t index)
uint32_t output_size() const
Get number of graph outputs held by this Session.
Session(loco::Graph *g, InputIt begin, InputIt end)
Make Session by range.
uint32_t input_size() const
Get number of graph inputs held by this Session.
Session(loco::Graph *g)
Make Session for graph with graph outputs themselves.
Read-only no-template wrapper for 'Buffer'. Serves interface for input and output of 'Session'.