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.
| 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");