Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
itikhono committed Jun 20, 2024
1 parent 4ee98ad commit 429832b
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions src/core/src/pass/manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ PerfCounters& perf_counters() {
return counters;
}

} // namespace
} // namespace pass
} // namespace ov

#endif // ENABLE_PROFILING_ITT

namespace {
bool getenv_visualize_tracing() {
return ov::util::getenv_bool("OV_ENABLE_VISUALIZE_TRACING");
}


class stopwatch {
public:
void start() {
Expand Down Expand Up @@ -69,8 +81,8 @@ class stopwatch {
class Profiler {
public:
Profiler(bool visualize, bool profile_pass_enable)
: m_visualize(visualize),
m_profile_pass_enable(profile_pass_enable) {}
: m_visualize(visualize),
m_profile_pass_enable(profile_pass_enable) {}

void start_timer(const std::string& name) {
if (m_profile_pass_enable) {
Expand All @@ -97,7 +109,7 @@ class Profiler {
auto base_filename = model->get_name() + std::string("_") + index_str + std::string("_") + name;

auto file_ext = "svg";
pass::VisualizeTree vt(base_filename + std::string(".") + file_ext);
ov::pass::VisualizeTree vt(base_filename + std::string(".") + file_ext);
vt.run_on_model(model);
}
}
Expand All @@ -110,16 +122,6 @@ class Profiler {
bool m_profile_pass_enable;
};

} // namespace
} // namespace pass
} // namespace ov

#endif // ENABLE_PROFILING_ITT

namespace {
bool getenv_visualize_tracing() {
return ov::util::getenv_bool("OV_ENABLE_VISUALIZE_TRACING");
}
} // namespace

ov::pass::Manager::Manager() : m_pass_config(std::make_shared<PassConfig>()), m_visualize(getenv_visualize_tracing()) {}
Expand All @@ -136,7 +138,7 @@ void ov::pass::Manager::set_per_pass_validation(bool new_state) {

bool ov::pass::Manager::run_passes(const shared_ptr<ov::Model>& model) {
OV_ITT_SCOPED_TASK(ov::itt::domains::core, "pass::Manager::run_passes");
ov::pass::Profiler profiler(m_visualize, ov::util::getenv_bool("OV_PROFILE_PASS_ENABLE"));
Profiler profiler(m_visualize, ov::util::getenv_bool("OV_PROFILE_PASS_ENABLE"));

bool pass_applied = false;
bool model_changed = false;
Expand Down

0 comments on commit 429832b

Please sign in to comment.