Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace variadic arguments with fixed #112

Merged
merged 7 commits into from
May 22, 2024

Conversation

rahulchaphalkar
Copy link
Contributor

  • Replaces variadic args ... with property_key: *const ::std::os::raw::c_char, property_value: *const ::std::os::raw::c_char for 2 functions, ov_compiled_model_set_property and ov_core_set_property
  • This is needed because variadic args do not yet work with runtime linking (link macro in runtime.rs)
  • Other functions like ov_core_compile_model also have ..., but these are not replaced as above since. The only place where they are replaced are functions which expect 1 or more pairs of property_key/property_value, but not in functions which expect 0 or more.
  • The optional properties passed in ov_core_compile_model set properties just for that compiled model, while properties set in ov_core_set_property are for all models compiled with that core. Similarly, some subtle differences seem to exist between properties set for ov_compiled_model_set_property and those in ov_core_compile_model. This is the reason why, for example, ov_compiled_model_set_property is not called from within ov_core_compile_model at this time.
  • Regenerated function bindings with cargo xtask codegen

Copy link
Contributor

@abrown abrown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense; if we get requests for full property support we can update the link! macro to do more by rewriting it as a procedural macro.

crates/xtask/Cargo.toml Outdated Show resolved Hide resolved
crates/xtask/src/codegen.rs Outdated Show resolved Hide resolved
@rahulchaphalkar rahulchaphalkar merged commit 82f0a0a into intel:main May 22, 2024
15 checks passed
@rahulchaphalkar rahulchaphalkar deleted the variadic-to-fixed branch May 22, 2024 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants