Skip to main content

set_api

Function set_api 

Source
pub fn set_api(api: OrtApi) -> bool
Expand description

Sets the global ort_sys::OrtApi interface used by ort in order to use alternative backends, or a custom loading scheme.

When using an alternative backend, this must be called before using any other ort API.

Returns true if successful, meaning this API will take effect. If an API was already set prior, it will not be overridden, and this function will return false.

ort::set_api(ort_tract::api());