| 285 | } |
| 286 | |
| 287 | void ComputingGraphImpl::cleanup() { |
| 288 | if (m_recorded_seq_level2_dtor_chk) { |
| 289 | m_recorded_seq_level2_dtor_chk->enable(); |
| 290 | } |
| 291 | // clear device memory storage and return them to comp node |
| 292 | clear_device_memory(); |
| 293 | |
| 294 | // so opr dtors would incur no overhead when deleting vars |
| 295 | m_var_node_pool.disable_freelist(); |
| 296 | |
| 297 | // TODO: call this after each graph exec when we have faster impl |
| 298 | CompNode::try_coalesce_all_free_memory(); |
| 299 | |
| 300 | options().user_data.clear_all_user_data(); |
| 301 | components().~Components(); |
| 302 | m_var_receiver.clear(); |
| 303 | m_opr_refkeeper.clear(); |
| 304 | } |
| 305 | |
| 306 | void* ComputingGraphImpl::alloc_varnode_storage() { |
| 307 | return m_var_node_pool.alloc_raw(); |
nothing calls this directly
no test coverage detected