Allow CPU_RUNTIME_CACHE_CAPACITY in plugin_config
🛠 Summary
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.
Closes : #4299
JIRA/Issue if applicable.
Describe the changes.
-
Whitelisted CPU_RUNTIME_CACHE_CAPACITY in src/ov_utils.cpp
- In the validatePluginConfiguration function, OVMS dynamically checks if the keys provided in plugin_config are supported by the target device.
- I explicitly added pluginSupportedConfigKeys.insert("CPU_RUNTIME_CACHE_CAPACITY"); to bypass this validation failure for this specific key, similar to how it is handled for the ENABLE_MMAP configuration.
- This ensures that OVMS allows the key and forwards it correctly to the OpenVINO Runtime, where it is functionally supported.
-
Added Unit Tests in src/test/ov_utils_test.cpp
- I implemented a new test case TEST(OVUtils, ValidatePluginConfigurationAllowCPURuntimeCacheCapacity).
- This test initializes a mock configuration with CPU_RUNTIME_CACHE_CAPACITY set to "0" and verifies that ovms::validatePluginConfiguration successfully executes without returning any errors (validating status.ok()).
🧪 Checklist
- [x] Unit tests added.
- [ ] The documentation updated.
- [x] Change follows security best practices. ``
Hi @atobiszei, @dtrawins pls let me know if this pr needs any changes or if it is good to merge
Hi @dtrawins I have added the suggesteed changes pls let me know if this pr needs any changes or if it is good to merge