Skip to content

Commit

Permalink
fix split-18
Browse files Browse the repository at this point in the history
Signed-off-by: daquexian <[email protected]>
  • Loading branch information
daquexian committed Nov 15, 2022
1 parent 95b2161 commit 74fdf9c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions onnxoptimizer/passes/eliminate_nop_split.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ struct EliminateNopSplit final : public PredicateBasedPass {
}

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

bool runTransform(Node* node, Graph& graph,
Expand Down

0 comments on commit 74fdf9c

Please sign in to comment.