Skip to content

Commit

Permalink
Merge branch 'master' into an/general_fix_fp16
Browse files Browse the repository at this point in the history
  • Loading branch information
allnes authored Oct 26, 2023
2 parents 3b4e0bc + 7720135 commit e4e0677
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,13 @@ class GraphCache : public ICache {

GraphCache(const std::string& device = "") {
ExtractorsManager::ExtractorsMap matchers = {
// temporary disabling according mem leaks in CI and not using swap mem
{ "fused_names", FusedNamesExtractor::Ptr(new FusedNamesExtractor(device)) },
{ "repeat_pattern", RepeatPatternExtractor::Ptr(new RepeatPatternExtractor) },
};
try {
matchers.insert({ "fused_names", FusedNamesExtractor::Ptr(new FusedNamesExtractor(device)) });
} catch(const std::exception& e) {
std::cout << "[ GRAPH CACHE ][ WARNING ] Fused names extractor is disabled according: " << e.what() << std::endl;
}
m_manager.set_extractors(matchers);
m_cache_subdir = "subgraph";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ RepeatPatternExtractor::update_extractor_cache(
const std::map<std::string, InputInfo>& pattern_in_info) {
for (auto& extracted_pattern : extracted_patterns) {
auto& pattern_structure = extracted_pattern.front();
const auto& cached_pattern = std::get<0>(pattern_structure);
const auto cached_pattern = std::get<0>(pattern_structure);
if (model_comparator->match(pattern, cached_pattern)) {
try {
const auto& cached_in_info = std::get<2>(pattern_structure);
Expand All @@ -99,17 +99,15 @@ void
RepeatPatternExtractor::update_extractor_cache(
std::list<std::vector<RepeatPatternExtractor::ExtractedRepeatPattern>>& extracted_patterns,
std::list<std::vector<RepeatPatternExtractor::ExtractedRepeatPattern>>& secondary_extracted_patterns) {
auto extern_it = secondary_extracted_patterns.begin();
while (!secondary_extracted_patterns.empty()) {
auto it = extern_it->rbegin();
auto extern_it = secondary_extracted_patterns.begin();
while (!extern_it->empty()) {
auto& pattern_structure = *it;
auto& pattern_structure = *(extern_it->rbegin());
const auto& pattern = std::get<0>(pattern_structure);
const auto& pattern_node_vector = std::get<1>(pattern_structure);
const auto& pattern_in_info = std::get<2>(pattern_structure);
update_extractor_cache(extracted_patterns, pattern, pattern_node_vector, pattern_in_info);
extern_it->pop_back();
it = extern_it->rbegin();
}
secondary_extracted_patterns.pop_front();
}
Expand Down

0 comments on commit e4e0677

Please sign in to comment.