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

Method copy

imperative/python/src/tensor.h:51–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 ~Tensor() = default;
50
51 inline Tensor copy() { return Tensor(imperative::apply(DupTensor(), data())[0]); }
52
53 inline DType dtype() { return *data().dtype(); }
54 inline CompNode comp_node() { return *data().device(); }

Callers 15

loadMethod · 0.45
get_oprs_seqFunction · 0.45
find_vars_by_nameFunction · 0.45
_build_with_ninjaFunction · 0.45
__setstate__Method · 0.45
get_module_stateMethod · 0.45
__getstate__Method · 0.45
state_dictMethod · 0.45
_test_optimizerFunction · 0.45
run_indexFunction · 0.45
fwdFunction · 0.45

Calls 3

DupTensorClass · 0.85
TensorClass · 0.70
applyFunction · 0.50

Tested by 15

_test_optimizerFunction · 0.36
fwdFunction · 0.36
test_insert_qat_moduleFunction · 0.36
test_subtensorFunction · 0.36
test_advance_indexingFunction · 0.36
test_mesh_indexingFunction · 0.36
test_qparamsFunction · 0.36
test_formatFunction · 0.36
_ctc_npy_single_seqFunction · 0.36
test_identityFunction · 0.36