create_graph_runner - create_graph_runner - 2.0 English - UG1414

Vitis AI User Guide (UG1414)

Document_ID
UG1414
Release_Date
2022-01-20
Version
2.0 English
Factory function to create an instance of runner by graph and attributes.

Prototype

static std::unique_ptr<vart::RunnerExt> create_graph_runner(const xir::Graph* graph, xir::Attrs* attrs);

Parameters

The following table lists the create_graph_runner function arguments.
Table 1. create_graph_runner Arguments
Type Name Description
const xir::Graph* graph XIR Graph
xir::Attrs* attrs XIR attrs object, this object is shared among all runners on the same graph.

Returns

An instance of runner.

Usage

auto graph = xir::Graph::deserialize(xmodel_file);
auto attrs = xir::Attrs::create();
auto runner = vitis::ai::GraphRunner::create_graph_runner(graph.get(), attrs.get());
auto input_tensor_buffers = runner->get_inputs();