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

Function make_from_op_node

imperative/src/impl/ops/specializations.cpp:36–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34namespace {
35namespace dimshuffle {
36std::shared_ptr<OpDef> make_from_op_node(cg::OperatorNodeBase* node_) {
37 auto* node = &node_->cast_final_safe<opr::Dimshuffle>();
38 std::vector<int> pattern(node->param().pattern_len);
39 for (size_t i = 0; i < node->param().pattern_len; ++i) {
40 pattern[i] = node->param().pattern[i];
41 }
42 return Dimshuffle::make(pattern);
43}
44
45auto apply_on_var_node(const OpDef& def, const VarNodeArray& inputs) {
46 auto&& ds = static_cast<const Dimshuffle&>(def);

Callers

nothing calls this directly

Calls 2

makeFunction · 0.70
paramMethod · 0.45

Tested by

no test coverage detected