MCPcopy Index your code
hub / github.com/apache/tvm / get_outputs

Method get_outputs

python/tvm/runtime/vm.py:294–323  ·  view source on GitHub ↗

Get the value output by the function by the given name after a call of `invoke_stateful`. It is an error to call this function without first calling `invoke_stateful`. Parameters ---------- func_name: str The name of the function whose o

(self, func_name: str)

Source from the content-addressed store, hash-verified

292 self._invoke_stateful(func_name)
293
294 def get_outputs(self, func_name: str) -> tvm.Object | tuple[Any]:
295 """
296 Get the value output by the function by the given name
297 after a call of `invoke_stateful`.
298
299 It is an error to call this function without first calling `invoke_stateful`.
300
301 Parameters
302 ----------
303 func_name: str
304 The name of the function whose output should be fetched.
305
306 Returns
307 -------
308 ret: Union[tvm.Object, Tuple[Any]]
309 The result of the earlier call to the function via `invoke_stateful`.
310 If the result is a tuple, it returns a list of the fields.
311 The fields are potentially also tuples, so these can be arbitrily nested.
312 """
313
314 # to deal with potentially nested tuples, we need to query for arity recursively
315 def get_output_rec(func_name, *idx):
316 arity = self._get_output_arity(func_name, *idx)
317 if arity == -1:
318 return self._get_output(func_name, *idx)
319 # otherwise we need to specify more indices
320 idx_list = list(idx)
321 return tuple(get_output_rec(func_name, *(idx_list + [i])) for i in range(arity))
322
323 return get_output_rec(func_name)
324
325 def set_instrument(self, instrument: Function) -> None:
326 """Set an instrumentation function.

Callers 15

check_correctnessFunction · 0.95
get_vm_resFunction · 0.95
check_correctnessFunction · 0.95
run_in_tvmFunction · 0.95
test_nmsFunction · 0.95
test_nms_iou_suppressionFunction · 0.95
test_nms_max_boxes_limitFunction · 0.95
test_nms_score_thresholdFunction · 0.95

Calls

no outgoing calls

Tested by 15

check_correctnessFunction · 0.76
get_vm_resFunction · 0.76
check_correctnessFunction · 0.76
run_in_tvmFunction · 0.76
test_nmsFunction · 0.76
test_nms_iou_suppressionFunction · 0.76
test_nms_max_boxes_limitFunction · 0.76
test_nms_score_thresholdFunction · 0.76