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

Method device

src/custom/impl/tensor.cpp:465–468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

463}
464
465Device Tensor::device(void) const {
466 auto builtin = TensorImplRef(m_tensor).comp_node();
467 return Device(&builtin);
468}
469
470size_t Tensor::size(void) const {
471 return TensorImplRef(m_tensor).shape().total_nr_elems();

Callers 7

TESTFunction · 0.45
cpu_kernelFunction · 0.45
CustomOpImplMethod · 0.45
computeMethod · 0.45
get_cuda_runtime_argsFunction · 0.45
executeMethod · 0.45
to_paramMethod · 0.45

Calls 2

DeviceClass · 0.50
comp_nodeMethod · 0.45

Tested by 2

TESTFunction · 0.36
cpu_kernelFunction · 0.36