Skip to content

Commit 74fdf9c

Browse files
committed
fix split-18
Signed-off-by: daquexian <[email protected]>
1 parent 95b2161 commit 74fdf9c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

onnxoptimizer/passes/eliminate_nop_split.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ struct EliminateNopSplit final : public PredicateBasedPass {
2323
}
2424

2525
bool patternMatchPredicate(Node* node) override {
26-
return CheckKind(node, "Split") && node->input()->has_sizes() &&
27-
node->hasAttribute(kaxis) && node->hasAttribute(ksplit) &&
28-
node->outputs().size() == 1;
26+
// TODO: support Split-18 where `split` is an input instead of an attribute
27+
return CheckKind(node, "Split") && node->inputs().size() == 1 &&
28+
node->input()->has_sizes() && node->hasAttribute(kaxis) &&
29+
node->hasAttribute(ksplit) && node->outputs().size() == 1;
2930
}
3031

3132
bool runTransform(Node* node, Graph& graph,

0 commit comments

Comments
 (0)