Skip to content

Commit

Permalink
Fix CI and apply comments
Browse files Browse the repository at this point in the history
  • Loading branch information
echuraev committed Jun 29, 2021
1 parent 858d3f0 commit f71fc96
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/relay/backend/build_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ class RelayBuildModule : public runtime::ModuleNode {
if (targets.size() == 1) {
const auto& target = (*targets.begin()).second;
pass_seqs.push_back(
transform::SplitArgs(target->GetAttr<Integer>("max_function_args").value()));
transform::SplitArgs(target->GetAttr<Integer>("max_function_args", -1).value()));
}

// Create a sequential pass and perform optimizations.
Expand Down
7 changes: 0 additions & 7 deletions src/relay/transforms/pattern_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -700,13 +700,6 @@ Expr StopFusion(Expr data);

Expr CastHint(Expr data, DataType dtype);

inline Expr Concat(Expr x, int axis = 0) {
static const Op& op = Op::Get("concatenate");
auto attrs = make_object<ConcatenateAttrs>();
attrs->axis = axis;
return Call(op, {x}, Attrs(attrs), {});
}

} // namespace relay
} // namespace tvm
#endif // TVM_RELAY_TRANSFORMS_PATTERN_UTILS_H_
4 changes: 2 additions & 2 deletions src/relay/transforms/split_args.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ class ArgumentSplitter : public ExprRewriter {
args.push_back(op->fields[j + startIdx]);
}
Tuple tuple(args);
Expr body = Concat(tuple, param->axis);
Expr body = MakeConcatenate(tuple, param->axis);
splitted[i] = StopFusion(body);
}
tvm::Array<Expr> tupleArgs(splitted);
Tuple tuple(tupleArgs);
return Concat(tuple, param->axis);
return MakeConcatenate(tuple, param->axis);
}
return post;
}
Expand Down

0 comments on commit f71fc96

Please sign in to comment.