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

Function get_input_layout_constraint

imperative/src/impl/ops/vision.cpp:62–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62SmallVector<VarNode::LayoutConstraintCallback> get_input_layout_constraint(
63 const OpDef& def, const SmallVector<TensorPtr>& inputs) {
64 SmallVector<VarNode::LayoutConstraintCallback> layout_checker(inputs.size());
65 layout_checker[0] = [](const TensorLayout& layout) {
66 return layout.is_contiguous();
67 };
68 return layout_checker;
69}
70
71OP_TRAIT_REG(Flip, Flip)
72 .apply_on_var_node(apply_on_var_node)

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
is_contiguousMethod · 0.45

Tested by

no test coverage detected