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

Method make

src/opr/impl/cond.cpp:599–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

597}
598
599SymbolVar CondExecPredLogical::make(
600 const VarNodeArrayView& preds, const Param& param,
601 const OperatorNodeConfig& config) {
602 mgb_assert(!preds.empty());
603 if (preds.size() == 1) {
604 if (!config.has_comp_node_set() ||
605 config.get_single_comp_node() == preds[0]->comp_node()) {
606 auto m = param.mode;
607 if (m == Mode::OR || m == Mode::XOR || m == Mode::AND) {
608 return preds[0];
609 }
610 }
611 }
612 return SymbolVar{preds[0]}.insert_single_output_opr<CondExecPredLogical>(
613 preds, param, config);
614}
615
616void CondExecPredLogical::init_output_static_infer_desc() {
617 using namespace cg::static_infer;

Callers

nothing calls this directly

Calls 5

has_comp_node_setMethod · 0.80
get_single_comp_nodeMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
comp_nodeMethod · 0.45

Tested by

no test coverage detected