| 135 | } |
| 136 | |
| 137 | Handle ChannelImpl::put(const HostTensorND& value, bool no_cache) { |
| 138 | MGB_LOCK_GUARD(m_spin); |
| 139 | assert_available(); |
| 140 | std::optional<StackManager::Guard> guard; |
| 141 | if (Profiler::is_profiling()) { |
| 142 | auto& state = get_channel_state(); |
| 143 | guard.emplace("Put", &state.stack_manager); |
| 144 | } |
| 145 | auto info = put_impl(value, no_cache); |
| 146 | return reinterpret_cast<Handle>(info); |
| 147 | } |
| 148 | |
| 149 | TensorInfo* ChannelImpl::put_impl(const HostTensorND& value, bool no_cache) { |
| 150 | if (value.empty()) { |
no test coverage detected