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

Method device

imperative/python/src/tensor.cpp:688–690  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

686}
687
688PyObject* TensorWrapper::device() {
689 return py::cast(m_tensor->comp_node()).release().ptr();
690}
691
692PyObject* TensorWrapper::format() {
693 return py::cast(m_tensor->format().to_string()).release().ptr();

Callers 7

init_tensorFunction · 0.45
comp_nodeMethod · 0.45
subtensor_grad_ruleFunction · 0.45
indexing_grad_ruleFunction · 0.45
warp_affine_grad_ruleFunction · 0.45

Calls 4

castFunction · 0.85
ptrMethod · 0.45
releaseMethod · 0.45
comp_nodeMethod · 0.45

Tested by

no test coverage detected