Function executorch_sys::torch::executor::Method_get_outputs
source · pub unsafe extern "C" fn Method_get_outputs(
this: *mut Method,
output_evalues: *mut EValue,
length: usize,
) -> ErrorExpand description
Copies the method’s outputs into the provided array.
WARNING: The output contains shallow copies of internal tensor outputs. Please do not mutate returned Tensor elements.
TODO(T139259264): Add checks to detect output mutation, or deep-copy outputs.
@param[in] output_evalues The array to copy the outputs into. The first
outputs_size() elements will be set to the corresponding output
values. The rest of the array will be set to the EValue value None.
@param[in] length The size of the output_evalues array in elements. Must
be greater than or equal to outputs_size().
@returns Error::Ok on success, non-Ok on failure.