forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CONFORMANCE][SUBGRAPHS DUMPER] Rework
subgraphs_dumper
graphs extr…
…action algo feedback by plugins (openvinotoolkit#19669) * [CONFORMANCE][SUBGRAPHS DUMPER] Change repeat pattern extractor to avoid duplications and reduce graphs size * Small change * temporary * merge * try to handle large models * Fixes + tests * Remove extra * Exclude models after const folding in case dynamic modesl * shapes to meta * Fix tests * Fix test + is_subgraph * Fix issue with default output * change hashing * Check memory * Hash algo * correct modelsize check * Log large models * tmp disable fused_names extractor * add device for fused_names * remove extra * fix vuild * Disable fused_names extractor
- Loading branch information
Showing
33 changed files
with
764 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/tests/functional/plugin/conformance/subgraphs_dumper/include/utils/memory.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Copyright (C) 2018-2023 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#pragma once | ||
|
||
#if defined(_WIN32) | ||
#include <Windows.h> | ||
#else | ||
#include <unistd.h> | ||
#include <sys/types.h> | ||
#include <sys/param.h> | ||
#endif | ||
|
||
namespace ov { | ||
namespace tools { | ||
namespace subgraph_dumper { | ||
|
||
static size_t get_ram_size() { | ||
size_t ram_mem_size_bytes = 0; | ||
#ifdef _WIN32 | ||
MEMORYSTATUSEX status; | ||
status.dwLength = sizeof(status); | ||
GlobalMemoryStatusEx( &status ); | ||
ram_mem_size_bytes = status.ullTotalPhys; | ||
#elif defined(CTL_HW) && defined(HW_MEMSIZE) | ||
int mib[2]; | ||
mib[0] = CTL_HW; | ||
#if defined(HW_MEMSIZE) | ||
mib[1] = HW_MEMSIZE; | ||
#endif | ||
int64_t size = 0; | ||
size_t len = sizeof( size ); | ||
if ( sysctl( mib, 2, &size, &len, NULL, 0 ) == 0 ) | ||
ram_mem_size_bytes = size; | ||
#elif defined(_SC_AIX_REALMEM) | ||
ram_mem_size_bytes = sysconf( _SC_AIX_REALMEM ) * (size_t)1024L; | ||
|
||
#elif defined(_SC_PHYS_PAGES) && defined(_SC_PAGE_SIZE) | ||
ram_mem_size_bytes = static_cast<size_t>(sysconf( _SC_PHYS_PAGES )) * | ||
static_cast<size_t>(sysconf(_SC_PAGE_SIZE)); | ||
#endif | ||
return ram_mem_size_bytes; | ||
} | ||
|
||
} // namespace subgraph_dumper | ||
} // namespace tools | ||
} // namespace ov |
Oops, something went wrong.