Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,20 @@ jobs:
# found ("dyld: Library not loaded; '@rpath/libopenvino.2310.dylib'"). See
# https://github.com/abrown/openvino-rs/actions/runs/6423141936/job/17441022932#step:7:154
os: [ubuntu-20.04, ubuntu-22.04, windows-latest]
version: [2022.3.0, 2023.1.0, 2023.2.0]
version: [2022.3.0, 2023.1.0, 2023.2.0, 2024.0.0]
apt: [false]
# We also spot-check that things work when installing from APT by adding to the matrix: see
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations
include:
- os: ubuntu-22.04
version: 2023.2.0
version: 2024.0.0
apt: true
env:
RUST_LOG: debug
RUST_BACKTRACE: 1
steps:
- name: Enable long paths
run: git config --global core.longpaths true
- uses: actions/checkout@v2
with:
submodules: true
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "crates/upstream"]
path = crates/openvino-sys/upstream
url = https://github.com/openvinotoolkit/openvino
depth = 1
shallow = true
37 changes: 14 additions & 23 deletions crates/openvino-sys/src/generated/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ extern "C" {
pub fn ov_output_const_port_free(port: *mut ov_output_const_port_t);
}
extern "C" {
#[doc = " @brief Constructs Tensor using element type and shape. Allocate internal host storage using default allocator\n @ingroup ov_tensor_c_api\n @param type Tensor element type\n @param shape Tensor shape\n @param host_ptr Pointer to pre-allocated host memory\n @param tensor A point to ov_tensor_t\n @return Status code of the operation: OK(0) for success."]
#[doc = " @brief Constructs Tensor using element type, shape and external host ptr.\n @ingroup ov_tensor_c_api\n @param type Tensor element type\n @param shape Tensor shape\n @param host_ptr Pointer to pre-allocated host memory\n @param tensor A point to ov_tensor_t\n @return Status code of the operation: OK(0) for success."]
pub fn ov_tensor_create_from_host_ptr(
type_: ov_element_type_e,
shape: ov_shape_t,
Expand Down Expand Up @@ -402,7 +402,7 @@ extern "C" {
) -> ov_status_e;
}
extern "C" {
#[doc = " @brief Get a single const output port of ov_model_t, which only support single output model..\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param output_port A pointer to the ov_output_const_port_t.\n @return Status code of the operation: OK(0) for success."]
#[doc = " @brief Get a single const output port of ov_model_t, which only support single output model.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param output_port A pointer to the ov_output_const_port_t.\n @return Status code of the operation: OK(0) for success."]
pub fn ov_model_const_output(
model: *const ov_model_t,
output_port: *mut *mut ov_output_const_port_t,
Expand All @@ -425,7 +425,7 @@ extern "C" {
) -> ov_status_e;
}
extern "C" {
#[doc = " @brief Get an single output port of ov_model_t, which only support single output model.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param output_port A pointer to the ov_output_const_port_t.\n @return Status code of the operation: OK(0) for success."]
#[doc = " @brief Get a single output port of ov_model_t, which only support single output model.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param output_port A pointer to the ov_output_const_port_t.\n @return Status code of the operation: OK(0) for success."]
pub fn ov_model_output(
model: *const ov_model_t,
output_port: *mut *mut ov_output_port_t,
Expand Down Expand Up @@ -456,7 +456,7 @@ extern "C" {
pub fn ov_model_outputs_size(model: *const ov_model_t, output_size: *mut usize) -> ov_status_e;
}
extern "C" {
#[doc = " @brief Returns true if any of the ops defined in the model is dynamic shape..\n @param model A pointer to the ov_model_t.\n @return true if model contains dynamic shapes"]
#[doc = " @brief Returns true if any of the ops defined in the model is dynamic shape.\n @param model A pointer to the ov_model_t.\n @return true if model contains dynamic shapes"]
pub fn ov_model_is_dynamic(model: *const ov_model_t) -> bool;
}
extern "C" {
Expand Down Expand Up @@ -700,7 +700,7 @@ extern "C" {
pub fn ov_core_free(core: *mut ov_core_t);
}
extern "C" {
#[doc = " @brief Reads models from IR / ONNX / PDPD / TF / TFLite formats.\n @ingroup ov_core_c_api\n @param core A pointer to the ie_core_t instance.\n @param model_path Path to a model.\n @param bin_path Path to a data file.\n For IR format (*.bin):\n * if `bin_path` is empty, will try to read a bin file with the same name as xml and\n * if the bin file with the same name is not found, will load IR without weights.\n For the following file formats the `bin_path` parameter is not used:\n * ONNX format (*.onnx)\n * PDPD (*.pdmodel)\n * TF (*.pb)\n * TFLite (*.tflite)\n @param model A pointer to the newly created model.\n @return Status code of the operation: OK(0) for success."]
#[doc = " @brief Reads models from IR / ONNX / PDPD / TF / TFLite formats.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param model_path Path to a model.\n @param bin_path Path to a data file.\n For IR format (*.bin):\n * if `bin_path` is empty, will try to read a bin file with the same name as xml and\n * if the bin file with the same name is not found, will load IR without weights.\n For the following file formats the `bin_path` parameter is not used:\n * ONNX format (*.onnx)\n * PDPD (*.pdmodel)\n * TF (*.pb)\n * TFLite (*.tflite)\n @param model A pointer to the newly created model.\n @return Status code of the operation: OK(0) for success."]
pub fn ov_core_read_model(
core: *const ov_core_t,
model_path: *const ::std::os::raw::c_char,
Expand All @@ -709,7 +709,7 @@ extern "C" {
) -> ov_status_e;
}
extern "C" {
#[doc = " @brief Reads models from IR / ONNX / PDPD / TF / TFLite formats, path is unicode.\n @ingroup ov_core_c_api\n @param core A pointer to the ie_core_t instance.\n @param model_path Path to a model.\n @param bin_path Path to a data file.\n For IR format (*.bin):\n * if `bin_path` is empty, will try to read a bin file with the same name as xml and\n * if the bin file with the same name is not found, will load IR without weights.\n For the following file formats the `bin_path` parameter is not used:\n * ONNX format (*.onnx)\n * PDPD (*.pdmodel)\n * TF (*.pb)\n * TFLite (*.tflite)\n @param model A pointer to the newly created model.\n @return Status code of the operation: OK(0) for success."]
#[doc = " @brief Reads models from IR / ONNX / PDPD / TF / TFLite formats, path is unicode.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param model_path Path to a model.\n @param bin_path Path to a data file.\n For IR format (*.bin):\n * if `bin_path` is empty, will try to read a bin file with the same name as xml and\n * if the bin file with the same name is not found, will load IR without weights.\n For the following file formats the `bin_path` parameter is not used:\n * ONNX format (*.onnx)\n * PDPD (*.pdmodel)\n * TF (*.pb)\n * TFLite (*.tflite)\n @param model A pointer to the newly created model.\n @return Status code of the operation: OK(0) for success."]
pub fn ov_core_read_model_unicode(
core: *const ov_core_t,
model_path: *const wchar_t,
Expand All @@ -718,16 +718,7 @@ extern "C" {
) -> ov_status_e;
}
extern "C" {
#[doc = " @brief Reads models from IR / ONNX / PDPD / TF / TFLite formats.\n @ingroup ov_core_c_api\n @deprecated Use ov_core_read_model_from_memory_buffer instead.\n @param core A pointer to the ie_core_t instance.\n @param model_str String with a model in IR / ONNX / PDPD / TF / TFLite format, string is null-terminated.\n @param weights Shared pointer to a constant tensor with weights.\n @param model A pointer to the newly created model.\n Reading ONNX / PDPD / TF / TFLite models does not support loading weights from the @p weights tensors.\n @note Created model object shares the weights with the @p weights object.\n Thus, do not create @p weights on temporary data that can be freed later, since the model\n constant data will point to an invalid memory.\n @return Status code of the operation: OK(0) for success."]
pub fn ov_core_read_model_from_memory(
core: *const ov_core_t,
model_str: *const ::std::os::raw::c_char,
weights: *const ov_tensor_t,
model: *mut *mut ov_model_t,
) -> ov_status_e;
}
extern "C" {
#[doc = " @brief Reads models from IR / ONNX / PDPD / TF / TFLite formats with models string size.\n @ingroup ov_core_c_api\n @param core A pointer to the ie_core_t instance.\n @param model_str String with a model in IR / ONNX / PDPD / TF / TFLite format, support model string containing\n several null chars.\n @param str_len The length of model string.\n @param weights Shared pointer to a constant tensor with weights.\n @param model A pointer to the newly created model.\n Reading ONNX / PDPD / TF / TFLite models does not support loading weights from the @p weights tensors.\n @note Created model object shares the weights with the @p weights object.\n Thus, do not create @p weights on temporary data that can be freed later, since the model\n constant data will point to an invalid memory.\n @return Status code of the operation: OK(0) for success."]
#[doc = " @brief Reads models from IR / ONNX / PDPD / TF / TFLite formats with models string size.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param model_str String with a model in IR / ONNX / PDPD / TF / TFLite format, support model string containing\n several null chars.\n @param str_len The length of model string.\n @param weights Shared pointer to a constant tensor with weights.\n @param model A pointer to the newly created model.\n Reading ONNX / PDPD / TF / TFLite models does not support loading weights from the @p weights tensors.\n @note Created model object shares the weights with the @p weights object.\n Thus, do not create @p weights on temporary data that can be freed later, since the model\n constant data will point to an invalid memory.\n @return Status code of the operation: OK(0) for success."]
pub fn ov_core_read_model_from_memory_buffer(
core: *const ov_core_t,
model_str: *const ::std::os::raw::c_char,
Expand All @@ -737,7 +728,7 @@ extern "C" {
) -> ov_status_e;
}
extern "C" {
#[doc = " @brief Creates a compiled model from a source model object.\n Users can create as many compiled models as they need and use\n them simultaneously (up to the limitation of the hardware resources).\n @ingroup ov_core_c_api\n @param core A pointer to the ie_core_t instance.\n @param model Model object acquired from Core::read_model.\n @param device_name Name of a device to load a model to.\n @param property_args_size How many properties args will be passed, each property contains 2 args: key and value.\n @param compiled_model A pointer to the newly created compiled_model.\n @param ... property paramater: Optional pack of pairs: <char* property_key, char* property_value> relevant only\n for this load operation operation. Supported property key please see ov_property.h.\n @return Status code of the operation: OK(0) for success."]
#[doc = " @brief Creates a compiled model from a source model object.\n Users can create as many compiled models as they need and use\n them simultaneously (up to the limitation of the hardware resources).\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param model Model object acquired from Core::read_model.\n @param device_name Name of a device to load a model to.\n @param property_args_size How many properties args will be passed, each property contains 2 args: key and value.\n @param compiled_model A pointer to the newly created compiled_model.\n @param ... property paramater: Optional pack of pairs: <char* property_key, char* property_value> relevant only\n for this load operation operation. Supported property key please see ov_property.h.\n @return Status code of the operation: OK(0) for success."]
pub fn ov_core_compile_model(
core: *const ov_core_t,
model: *const ov_model_t,
Expand All @@ -748,7 +739,7 @@ extern "C" {
) -> ov_status_e;
}
extern "C" {
#[doc = " @brief Reads a model and creates a compiled model from the IR/ONNX/PDPD file.\n This can be more efficient than using the ov_core_read_model_from_XXX + ov_core_compile_model flow,\n especially for cases when caching is enabled and a cached model is available.\n @ingroup ov_core_c_api\n @param core A pointer to the ie_core_t instance.\n @param model_path Path to a model.\n @param device_name Name of a device to load a model to.\n @param property_args_size How many properties args will be passed, each property contains 2 args: key and value.\n @param compiled_model A pointer to the newly created compiled_model.\n @param ... Optional pack of pairs: <char* property_key, char* property_value> relevant only\n for this load operation operation. Supported property key please see ov_property.h.\n @return Status code of the operation: OK(0) for success."]
#[doc = " @brief Reads a model and creates a compiled model from the IR/ONNX/PDPD file.\n This can be more efficient than using the ov_core_read_model_from_XXX + ov_core_compile_model flow,\n especially for cases when caching is enabled and a cached model is available.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param model_path Path to a model.\n @param device_name Name of a device to load a model to.\n @param property_args_size How many properties args will be passed, each property contains 2 args: key and value.\n @param compiled_model A pointer to the newly created compiled_model.\n @param ... Optional pack of pairs: <char* property_key, char* property_value> relevant only\n for this load operation operation. Supported property key please see ov_property.h.\n @return Status code of the operation: OK(0) for success."]
pub fn ov_core_compile_model_from_file(
core: *const ov_core_t,
model_path: *const ::std::os::raw::c_char,
Expand All @@ -759,7 +750,7 @@ extern "C" {
) -> ov_status_e;
}
extern "C" {
#[doc = " @brief Reads a model and creates a compiled model from the IR/ONNX/PDPD file.\n This can be more efficient than using the ov_core_read_model_from_XXX + ov_core_compile_model flow,\n especially for cases when caching is enabled and a cached model is available.\n @ingroup ov_core_c_api\n @param core A pointer to the ie_core_t instance.\n @param model_path Path to a model.\n @param device_name Name of a device to load a model to.\n @param property_args_size How many properties args will be passed, each property contains 2 args: key and value.\n @param compiled_model A pointer to the newly created compiled_model.\n @param ... Optional pack of pairs: <char* property_key, char* property_value> relevant only\n for this load operation operation. Supported property key please see ov_property.h.\n @return Status code of the operation: OK(0) for success."]
#[doc = " @brief Reads a model and creates a compiled model from the IR/ONNX/PDPD file.\n This can be more efficient than using the ov_core_read_model_from_XXX + ov_core_compile_model flow,\n especially for cases when caching is enabled and a cached model is available.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param model_path Path to a model.\n @param device_name Name of a device to load a model to.\n @param property_args_size How many properties args will be passed, each property contains 2 args: key and value.\n @param compiled_model A pointer to the newly created compiled_model.\n @param ... Optional pack of pairs: <char* property_key, char* property_value> relevant only\n for this load operation operation. Supported property key please see ov_property.h.\n @return Status code of the operation: OK(0) for success."]
pub fn ov_core_compile_model_from_file_unicode(
core: *const ov_core_t,
model_path: *const wchar_t,
Expand All @@ -770,15 +761,15 @@ extern "C" {
) -> ov_status_e;
}
extern "C" {
#[doc = " @brief Sets properties for a device, acceptable keys can be found in ov_property_key_xxx.\n @ingroup ov_core_c_api\n @param core A pointer to the ie_core_t instance.\n @param device_name Name of a device.\n @param ... variadic paramaters The format is <char* property_key, char* property_value>.\n Supported property key please see ov_property.h.\n @return Status code of the operation: OK(0) for success."]
#[doc = " @brief Sets properties for a device, acceptable keys can be found in ov_property_key_xxx.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param device_name Name of a device.\n @param ... variadic paramaters The format is <char* property_key, char* property_value>.\n Supported property key please see ov_property.h.\n @return Status code of the operation: OK(0) for success."]
pub fn ov_core_set_property(
core: *const ov_core_t,
device_name: *const ::std::os::raw::c_char,
...
) -> ov_status_e;
}
extern "C" {
#[doc = " @brief Gets properties related to device behaviour.\n The method extracts information that can be set via the set_property method.\n @ingroup ov_core_c_api\n @param core A pointer to the ie_core_t instance.\n @param device_name Name of a device to get a property value.\n @param property_key Property key.\n @param property_value A pointer to property value with string format.\n @return Status code of the operation: OK(0) for success."]
#[doc = " @brief Gets properties related to device behaviour.\n The method extracts information that can be set via the set_property method.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param device_name Name of a device to get a property value.\n @param property_key Property key.\n @param property_value A pointer to property value with string format.\n @return Status code of the operation: OK(0) for success."]
pub fn ov_core_get_property(
core: *const ov_core_t,
device_name: *const ::std::os::raw::c_char,
Expand All @@ -787,7 +778,7 @@ extern "C" {
) -> ov_status_e;
}
extern "C" {
#[doc = " @brief Returns devices available for inference.\n @ingroup ov_core_c_api\n @param core A pointer to the ie_core_t instance.\n @param devices A pointer to the ov_available_devices_t instance.\n Core objects go over all registered plugins and ask about available devices.\n @return Status code of the operation: OK(0) for success."]
#[doc = " @brief Returns devices available for inference.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param devices A pointer to the ov_available_devices_t instance.\n Core objects go over all registered plugins and ask about available devices.\n @return Status code of the operation: OK(0) for success."]
pub fn ov_core_get_available_devices(
core: *const ov_core_t,
devices: *mut ov_available_devices_t,
Expand Down Expand Up @@ -816,7 +807,7 @@ extern "C" {
) -> ov_status_e;
}
extern "C" {
#[doc = " @brief Releases memory occupied by ov_core_version_list_t.\n @ingroup ov_core_c_api\n @param versions A pointer to the ie_core_versions to free memory."]
#[doc = " @brief Releases memory occupied by ov_core_version_list_t.\n @ingroup ov_core_c_api\n @param versions A pointer to the ov_core_version_list_t to free memory."]
pub fn ov_core_versions_free(versions: *mut ov_core_version_list_t);
}
extern "C" {
Expand Down
Loading