model_server icon indicating copy to clipboard operation
model_server copied to clipboard

Allow CPU_RUNTIME_CACHE_CAPACITY in plugin_config

Open andersendsa opened this issue 5 months ago • 1 comments

🛠 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.

  1. 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.
  2. 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. ``

andersendsa avatar Jun 25 '26 15:06 andersendsa

Hi @atobiszei, @dtrawins pls let me know if this pr needs any changes or if it is good to merge

andersendsa avatar Jun 25 '26 15:06 andersendsa

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

andersendsa avatar Jul 01 '26 10:07 andersendsa