Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused is_update argument #8487

Merged
merged 1 commit into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ApplySplit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ using std::map;
using std::string;
using std::vector;

vector<ApplySplitResult> apply_split(const Split &split, bool is_update, const string &prefix,
vector<ApplySplitResult> apply_split(const Split &split, const string &prefix,
map<string, Expr> &dim_extent_alignment) {
vector<ApplySplitResult> result;

Expand Down
2 changes: 1 addition & 1 deletion src/ApplySplit.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ struct ApplySplitResult {
* defined the values of variables referred by the predicates and substitutions
* (ordered from innermost to outermost let). */
std::vector<ApplySplitResult> apply_split(
const Split &split, bool is_update, const std::string &prefix,
const Split &split, const std::string &prefix,
std::map<std::string, Expr> &dim_extent_alignment);

/** Compute the loop bounds of the new dimensions resulting from applying the
Expand Down
8 changes: 4 additions & 4 deletions src/Func.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ bool apply_split(const Split &s, vector<ReductionVariable> &rvars,

rvars.insert(it + 1, {s.outer, 0, simplify((old_extent - 1 + s.factor) / s.factor)});

vector<ApplySplitResult> splits_result = apply_split(s, true, "", dim_extent_alignment);
vector<ApplySplitResult> splits_result = apply_split(s, "", dim_extent_alignment);
vector<pair<string, Expr>> bounds_let_stmts = compute_loop_bounds_after_split(s, "");
apply_split_result(bounds_let_stmts, splits_result, predicates, args, values);

Expand Down Expand Up @@ -694,7 +694,7 @@ bool apply_fuse(const Split &s, vector<ReductionVariable> &rvars,
iter_outer->extent = extent;
rvars.erase(iter_inner);

vector<ApplySplitResult> splits_result = apply_split(s, true, "", dim_extent_alignment);
vector<ApplySplitResult> splits_result = apply_split(s, "", dim_extent_alignment);
vector<pair<string, Expr>> bounds_let_stmts = compute_loop_bounds_after_split(s, "");
apply_split_result(bounds_let_stmts, splits_result, predicates, args, values);

Expand All @@ -718,7 +718,7 @@ bool apply_purify(const Split &s, vector<ReductionVariable> &rvars,
<< ", deleting it from the rvars list\n";
rvars.erase(iter);

vector<ApplySplitResult> splits_result = apply_split(s, true, "", dim_extent_alignment);
vector<ApplySplitResult> splits_result = apply_split(s, "", dim_extent_alignment);
vector<pair<string, Expr>> bounds_let_stmts = compute_loop_bounds_after_split(s, "");
apply_split_result(bounds_let_stmts, splits_result, predicates, args, values);

Expand All @@ -738,7 +738,7 @@ bool apply_rename(const Split &s, vector<ReductionVariable> &rvars,
debug(4) << " Renaming " << iter->var << " into " << s.outer << "\n";
iter->var = s.outer;

vector<ApplySplitResult> splits_result = apply_split(s, true, "", dim_extent_alignment);
vector<ApplySplitResult> splits_result = apply_split(s, "", dim_extent_alignment);
vector<pair<string, Expr>> bounds_let_stmts = compute_loop_bounds_after_split(s, "");
apply_split_result(bounds_let_stmts, splits_result, predicates, args, values);

Expand Down
9 changes: 4 additions & 5 deletions src/ScheduleFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ Stmt build_loop_nest(
const string &prefix,
int start_fuse,
const Function &func,
const Definition &def,
bool is_update) {
const Definition &def) {
const auto &dims = func.args();
const auto &func_s = func.schedule();
const auto &stage_s = def.schedule();
Expand Down Expand Up @@ -220,7 +219,7 @@ Stmt build_loop_nest(
user_assert(predicated_vars.count(split.old_var) == 0)
<< "Cannot split a loop variable resulting from a split using PredicateLoads or PredicateStores.";

vector<ApplySplitResult> splits_result = apply_split(split, is_update, prefix, dim_extent_alignment);
vector<ApplySplitResult> splits_result = apply_split(split, prefix, dim_extent_alignment);

// To ensure we substitute all indices used in call or provide,
// we need to substitute all lets in, so we correctly guard x in
Expand Down Expand Up @@ -503,7 +502,7 @@ Stmt build_provide_loop_nest(const map<string, Function> &env,
}

// Default schedule/values if there is no specialization
Stmt stmt = build_loop_nest(body, prefix, start_fuse, func, def, is_update);
Stmt stmt = build_loop_nest(body, prefix, start_fuse, func, def);
stmt = inject_placeholder_prefetch(stmt, env, prefix, def.schedule().prefetches());

// Make any specialized copies
Expand Down Expand Up @@ -847,7 +846,7 @@ Stmt build_extern_produce(const map<string, Function> &env, Function f, const Ta

Definition f_def_no_pred = f.definition().get_copy();
f_def_no_pred.predicate() = const_true();
return build_loop_nest(check, f.name() + ".s0.", -1, f, f_def_no_pred, false);
return build_loop_nest(check, f.name() + ".s0.", -1, f, f_def_no_pred);
}

// A schedule may include explicit bounds on some dimension. This
Expand Down
Loading