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

Method get_single_comp_node

src/core/impl/graph/operator_node.cpp:487–495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485}
486
487CompNode OperatorNodeConfig::get_single_comp_node() const {
488 mgb_assert(
489 m_comp_node.size() <= 1,
490 "at most one comp node could be provided, got %zu instead",
491 m_comp_node.size());
492 if (m_comp_node.empty())
493 return {};
494 return m_comp_node[0];
495}
496
497OperatorNodeConfig& OperatorNodeConfig::output_dtype(DType dtype) {
498 m_output_dtype = dtype;

Callers 15

setup_config_cnFunction · 0.80
init_output_comp_nodeMethod · 0.80
make_from_op_nodeFunction · 0.80
var_from_tensor_shapeMethod · 0.80
SwapInMethod · 0.80
makeMethod · 0.80
Host2DeviceCopyMethod · 0.80
init_output_comp_nodeMethod · 0.80
makeMethod · 0.80

Calls 2

sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected