Allow CPU_RUNTIME_CACHE_CAPACITY in plugin_config#4326
Open
andersendsa wants to merge 2 commits into
Open
Conversation
OpenVINO's `CPU_RUNTIME_CACHE_CAPACITY` is an internal parameter that isn't returned by `get_property(pluginName, ov::supported_properties)`. This caused OVMS validation to fail when users attempted to configure it via `plugin_config`. This commit whitelists `CPU_RUNTIME_CACHE_CAPACITY` during validation (similar to `ENABLE_MMAP`) so that the configuration is passed down to OpenVINO Runtime, where it is supported.
Author
|
Hi @atobiszei, @dtrawins pls let me know if this pr needs any changes or if it is good to merge |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates OVMS’ OpenVINO plugin-config validation to allow passing the CPU plugin’s internal CPU_RUNTIME_CACHE_CAPACITY setting via plugin_config, addressing startup failures when users configure it (as reported in #4299).
Changes:
- Whitelists
CPU_RUNTIME_CACHE_CAPACITYduring plugin-config key validation (similar to the existingENABLE_MMAPworkaround). - Adds a unit test asserting validation succeeds when
CPU_RUNTIME_CACHE_CAPACITYis present inplugin_config.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/ov_utils.cpp |
Extends validation allowlist to accept CPU_RUNTIME_CACHE_CAPACITY. |
src/test/ov_utils_test.cpp |
Adds a unit test covering the new allowlisted key. |
Comment on lines
+137
to
+138
| pluginSupportedConfigKeys.insert("ENABLE_MMAP"); // WA: always supported | ||
| pluginSupportedConfigKeys.insert("CPU_RUNTIME_CACHE_CAPACITY"); // WA: always supported |
Comment on lines
+245
to
+252
| ov::Core ieCore; | ||
| ovms::ModelConfig config; | ||
| config.setTargetDevice("CPU"); | ||
| config.setPluginConfig({{"CPU_RUNTIME_CACHE_CAPACITY", "0"}}); | ||
| ovms::plugin_config_t pluginConfig = ovms::ModelInstance::prepareDefaultPluginConfig(config); | ||
| auto status = ovms::validatePluginConfiguration(pluginConfig, "CPU", ieCore); | ||
| EXPECT_TRUE(status.ok()); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🛠 Summary
OpenVINO's
CPU_RUNTIME_CACHE_CAPACITYis an internal parameter that isn't returned byget_property(pluginName, ov::supported_properties). This caused OVMS validation to fail when users attempted to configure it viaplugin_config. This commit whitelistsCPU_RUNTIME_CACHE_CAPACITYduring validation (similar toENABLE_MMAP) so that the configuration is passed down to OpenVINO Runtime, where it is supported.Closes : #4299
JIRA/Issue if applicable.
Describe the changes.
Whitelisted CPU_RUNTIME_CACHE_CAPACITY in src/ov_utils.cpp
Added Unit Tests in src/test/ov_utils_test.cpp
🧪 Checklist
``