runner_ext¶
Functions
-
namespace vart
Functions
-
class RunnerExt : public Runner
Public Functions
-
explicit RunnerExt() = default¶
-
virtual ~RunnerExt() = default¶
-
virtual std::vector<vart::TensorBuffer*> get_inputs() = 0
Gets all input TensorBuffers of RunnerExt.
Sample code:
auto runner = vart::RunnerExt::create_runner(subgraph, attrs); auto input_tensor_buffers = runner->get_inputs(); for (auto input : input_tensor_buffers) { auto shape = input->get_tensor()->get_shape(); }
- Returns:
All input TensorBuffers. A vector of raw pointer to the input TensorBuffer.
-
virtual std::vector<vart::TensorBuffer*> get_outputs() = 0
Gets all output TensorBuffers of RunnerExt.
Sample code:
auto runner = vart::RunnerExt::create_runner(subgraph, attrs); auto output_tensor_buffers = runner->get_outputs(); for (auto output : output_tensor_buffers) { auto shape = output->get_tensor()->get_shape(); }
- Returns:
All output TensorBuffers. A vector of raw pointer to the output TensorBuffer.
Public Static Functions
-
static std::unique_ptr<RunnerExt> create_runner(const xir::Subgraph *subgraph, xir::Attrs *attrs)
Factory fucntion to create an instance of runner by subgraph and attrs.
- Parameters:
subgraph – XIR Subgraph
attrs – XIR attrs object, this object is shared among all runners on the same graph.
- Returns:
An instance of runner.
-
explicit RunnerExt() = default¶
-
class RunnerExt : public Runner