| 714 | } |
| 715 | |
| 716 | void Tensor::fetch_value() { |
| 717 | MGB_LOCK_GUARD(m_value_mtx); |
| 718 | if (m_value.empty()) { |
| 719 | m_value.copy_from(dev_tensor(false)); |
| 720 | m_value_ready.reset(EventPool::without_timer().alloc(comp_node())); |
| 721 | m_value_ready->record(); |
| 722 | } |
| 723 | } |
| 724 | |
| 725 | bool Tensor::value_fetched() { |
| 726 | MGB_LOCK_GUARD(m_value_mtx); |