Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
684
PyObject* TensorWrapper::dtype() {
685
return py::cast(m_tensor->dtype()).release().ptr();
686
}
687
688
PyObject* TensorWrapper::device() {
689
return py::cast(m_tensor->comp_node()).release().ptr();
Callers
15
test_attr_output
Function · 0.45
forward_compute
Function · 0.45
backward_compute
Function · 0.45
init_graph_rt
Function · 0.45
pyarr2hval
Function · 0.45
TensorWrapper
Method · 0.45
init_tensor
Function · 0.45
ndarray_from_tensor
Function · 0.45
get_dl_datatype
Method · 0.45
_dtype_promotion
Function · 0.45
_get_dtype
Function · 0.45
subtensor_grad_rule
Function · 0.45
Calls
3
cast
Function · 0.85
ptr
Method · 0.45
release
Method · 0.45
Tested by
3
test_attr_output
Function · 0.36
forward_compute
Function · 0.36
backward_compute
Function · 0.36