create_runner - create_runner - 3.0 English - UG1414

Vitis AI User Guide (UG1414)

Document_ID
UG1414
Release_Date
2023-02-24
Version
3.0 English

Creates an instance of CPU/SIM/DPU runner by subgraph. This is a factory method.

Prototype

std::unique_ptr<Runner> create_runner(const xir::Subgraph* subgraph,
                                       const std::string& mode = "");

Parameters

The following table lists the create_runner function arguments.

Table 1. create_runner Arguments
Type Name Description
const xir::Subgraph* subgraph XIR Subgraph
const std::string& mode 3 mode supported:

'ref' - CPU runner

'sim' - Simulation

'run' - DPU runner

Returns

An instance of CPU/SIM/DPU runner.

Usage

The runner instance has a number of member functions to control the execution and get the input and output tensors of the runner. This API can be used like:
auto runner = vart::Runner::create_runner(subgraph, "run");