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

Method copy_from_mge_tensor

lite/src/mge/tensor_impl.cpp:433–441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

431}
432
433void TensorImplDft::copy_from_mge_tensor(const mgb::DeviceTensorND& dv) {
434 if (is_host()) {
435 auto src_cn = dv.comp_node();
436 m_host_tensor->comp_node(src_cn, true);
437 m_host_tensor->copy_from(dv);
438 } else {
439 m_dev_tensor->copy_from(dv);
440 }
441}
442
443void TensorImplDft::set_reset_callback(const std::function<void(TensorImplDft*)>& cb) {
444 m_reset_callback = cb;

Callers 1

make_output_specMethod · 0.80

Calls 2

comp_nodeMethod · 0.45
copy_fromMethod · 0.45

Tested by

no test coverage detected