| 97 | } |
| 98 | |
| 99 | GraphProfiler::~GraphProfiler() noexcept { |
| 100 | auto wait = [](const CompNodeEventPtr& ev) { |
| 101 | if (ev) |
| 102 | ev->host_wait(); |
| 103 | }; |
| 104 | for (auto&& i : m_kern_event) { |
| 105 | wait(i.second.start); |
| 106 | wait(i.second.kern); |
| 107 | wait(i.second.end); |
| 108 | } |
| 109 | |
| 110 | m_owner_graph->options().user_data.pop_user_data<opr_profile::OprProfileHolder>(); |
| 111 | } |
| 112 | |
| 113 | void GraphProfiler::ensure_start_time() { |
| 114 | if (!m_start_of_time.valid()) { |