Skip to content

Conversation

@susbhere
Copy link

@susbhere susbhere commented Aug 8, 2025

cache_mode can be set from load_config json. However, OV backend did not
use it so far. Added the support but restricted to GPU for tiem being.

https://jira.devtools.intel.com/browse/CVS-171607

@susbhere susbhere marked this pull request as ready for review August 8, 2025 09:10
LOGS_DEFAULT(INFO) << log_tag << "Enables Caching";

OVCore::Get()->SetCache(session_context_.cache_dir.string());
config_t& load_config = session_context_.load_config;

Choose a reason for hiding this comment

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

I see that you are setting the values explicitly, can we not directly pass below & let ov toolkit take care of it. In my opinion this change is not needed, as we are delegating all the heavy lifting & setting of ov::AnyMap device_config properties to OV toolkit internally going ahead

{
 "GPU": {
    "CACHE_MODE": "OPTIMIZE_SIZE"
    // "CACHE_MODE": "OPTIMIZE_SPEED"
  }
}

@susbhere
Copy link
Author

@ankitm3k, cache_mode is not handled anywhere today. Just adding it from json does not work without this change. Whereever we put, handling of cache_mode and cache_dir should be together. Pls suggest if you have any better place to put them.

cache_mode can be set from load_config json. However, OV backend did not
use it so far. Added the support but restricted to GPU for tiem being.
@sfatimar
Copy link

sfatimar commented Aug 13, 2025

@susbhere can you please put cache mode and cache dir in the latest ovep-develop together through load json and verify , It should work, just like it works for OV

@susbhere susbhere closed this Aug 14, 2025
@susbhere
Copy link
Author

This code change is not required. Cache mode can be set through load_config json.

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.

3 participants