vart.Runner Example - 3.0 English

Vitis AI User Guide (UG1414)

Document ID
Release Date
3.0 English
This example assumes creating a DPU runner from a DPU subgraph (called dpu_subgraph).
# create DPU runner
dpu_runner = vart.Runner.create_runner(dpu_subgraph, "run")
# get a list of runner inputs
inputTensors = dpu.get_input_tensors()
# optional – print names and shapes of each input tensor
for inputTensor in inputTensors:
print('Input tensor :',, inputTensors.dims)
# create input buffer
# Important: Order of values passed to DPU thru’ input data buffer must match the order of tensor objects returned by get_input_tensor() 
inputData = []
for inputTensor in inputTensors:
# pass input buffer to DPU runner, launch and wait for completion
job_id = dpu_runner.execute_async(inputData,outputData)