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

Method get_dev_tensor

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

Source from the content-addressed store, hash-verified

549}
550
551DeviceTensorND ChannelImpl::get_dev_tensor(Handle handle) {
552 MGB_LOCK_GUARD(m_spin);
553 assert_available();
554 mgb_assert(
555 m_valid_handle.find(handle) != m_valid_handle.end(), "invalid handle: %p",
556 handle);
557 auto info = reinterpret_cast<TensorInfo*>(handle);
558 return wait_tensor(info, TensorProp::DevValue)->dev_tensor();
559}
560
561void ChannelImpl::sync() {
562 MGB_LOCK_GUARD(m_spin);

Callers 10

as_tensorMethod · 0.80
apply_get_attrMethod · 0.80
apply_transformationMethod · 0.80
TESTFunction · 0.80
dumpMethod · 0.80
dumpMethod · 0.80
dumpMethod · 0.80

Calls 3

findMethod · 0.45
endMethod · 0.45
dev_tensorMethod · 0.45

Tested by 3

TESTFunction · 0.64