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

Method get_device_id

lite/src/mge/tensor_impl.cpp:115–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115int TensorImplDft::get_device_id() const {
116 if (is_host()) {
117 return m_host_tensor->comp_node().locator().device;
118 } else {
119 return m_dev_tensor->comp_node().locator().device;
120 }
121}
122
123bool TensorImplDft::is_pinned_host() const {
124 return is_host() && get_device_from_locator(m_host_tensor->comp_node().locator()) !=

Callers

nothing calls this directly

Calls 2

locatorMethod · 0.45
comp_nodeMethod · 0.45

Tested by

no test coverage detected