MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / put

Method put

imperative/src/impl/interpreter/interpreter_impl.cpp:137–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137Handle 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
149TensorInfo* ChannelImpl::put_impl(const HostTensorND& value, bool no_cache) {
150 if (value.empty()) {

Callers 2

apply_create_tensorMethod · 0.45
apply_transformationMethod · 0.45

Calls 2

is_profilingFunction · 0.85
emplaceMethod · 0.45

Tested by

no test coverage detected