-
Notifications
You must be signed in to change notification settings - Fork 0
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
Further caching implementation #11
Conversation
* Update Convert extender * Update copyright year
* Fix MVN in MO * Apply feedback and add test * Remove unneeded import * Apply review feedback * Apply review feedback * Fix issue with class name
* Moved input preparation to another function, cleared argparse, minor code improvements * Minor changes in function description
* Comment and type check * test
FileStorageCacheManager - also public Reworked ICacheManager to avoid knowledge of "modelCacheDir" on creation ICacheManager - changed interface to lambdas (TBD: check convinience) Functional tests: created first test with cache enabled - Allow mock_engine.dll to pass import + getMetric - Verifies appropriate Load/Import/Export calls in cached/non-cached modes
CacheManagerContext is also removed Support of "CACHE_DIR" global config for model caching Some cleanup of iecore.cpp (not finished) CachingTest - enable CACHE_DIR
Added metric IMPORT_EXPORT_SUPPORT for plugins. Enabled it for Template and Myriad When caching is enabled, Loading by name will not perform 'read network' (hash is calculated by name and device name) Added more CachingTest's - Loading by name - Loading when cache is not supported by plug-in - Loading when cach is not enabled in global config
auto it = std::find(supportedMetricKeys.begin(), supportedMetricKeys.end(), | ||
METRIC_KEY(IMPORT_EXPORT_SUPPORT)); | ||
supported = (it != supportedMetricKeys.end()) && | ||
plugin.GetMetric(METRIC_KEY(IMPORT_EXPORT_SUPPORT), {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{}
are not needed.
} | ||
|
||
if (!loadedFromCache) { | ||
auto cnnNetwork = ReadNetwork(modelPath, ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need ""
?
Verify that mock.0 and mock.1 loads the same cache Verify that mock.50 and mock.51 loads the different cache
@@ -30,10 +30,12 @@ struct NetworkCompilationContext final { | |||
const std::map<std::string, std::string> & compileOptions = {}) : | |||
m_weights{}, | |||
m_compileOptions{compileOptions}, | |||
m_modelName{network.getName()}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose it's excess in this case, since model name is already in serialized representation after ngraph::pass::Serialize::run_on_function
- Allow user to change cache dir - Allow user to disable caching - Thread-safety of caching enable/disable (no unit tests so far) - FuncTests for Cache_Dir behavior
This reverts commit 7d01f23.
- Support QueryNetwork for "mock" plugin Discovered potential issue with HeteroPlugin (marked as TODO)
- State shall remain previous and shall not be corrupted after exception - Reworked tests to use GMOCK approach
For CNNNetwork it will serialize it and calculate hash on serialized buffer Added tests for corrupted blob and version mismatch
Merged to main repo |
Details:
Tickets: