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

Method dtype

imperative/python/src/tensor.cpp:684–686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

682}
683
684PyObject* TensorWrapper::dtype() {
685 return py::cast(m_tensor->dtype()).release().ptr();
686}
687
688PyObject* TensorWrapper::device() {
689 return py::cast(m_tensor->comp_node()).release().ptr();

Callers 15

test_attr_outputFunction · 0.45
forward_computeFunction · 0.45
backward_computeFunction · 0.45
init_graph_rtFunction · 0.45
pyarr2hvalFunction · 0.45
TensorWrapperMethod · 0.45
init_tensorFunction · 0.45
ndarray_from_tensorFunction · 0.45
get_dl_datatypeMethod · 0.45
_dtype_promotionFunction · 0.45
_get_dtypeFunction · 0.45
subtensor_grad_ruleFunction · 0.45

Calls 3

castFunction · 0.85
ptrMethod · 0.45
releaseMethod · 0.45

Tested by 3

test_attr_outputFunction · 0.36
forward_computeFunction · 0.36
backward_computeFunction · 0.36