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

Method _dev_tensor

imperative/python/src/tensor.cpp:734–738  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

732}
733
734PyObject* TensorWrapper::_dev_tensor() {
735 auto dv = m_tensor->data().dev_tensor();
736 // TODO: handle scalar
737 return py::cast(dv->as_nd(true)).release().ptr();
738}
739
740void TensorWrapper::_drop() {
741 imperative::apply(DTRCommand(DTRCommand::Drop), m_tensor->data());

Callers 10

runFunction · 0.80
embed_inputsFunction · 0.80
runMethod · 0.80
make_dev_tensorMethod · 0.80
make_dev_tensorFunction · 0.80
_get_compiled_resultFunction · 0.80
test_ioFunction · 0.80
test_io2Function · 0.80
test_attr_outputFunction · 0.80
test_opFunction · 0.80

Calls 6

castFunction · 0.85
as_ndMethod · 0.80
dev_tensorMethod · 0.45
dataMethod · 0.45
ptrMethod · 0.45
releaseMethod · 0.45

Tested by 6

make_dev_tensorFunction · 0.64
_get_compiled_resultFunction · 0.64
test_ioFunction · 0.64
test_io2Function · 0.64
test_attr_outputFunction · 0.64
test_opFunction · 0.64