Skip to content

Commit

Permalink
Allow unconstrained input bounds (#572)
Browse files Browse the repository at this point in the history
This is a subset of #570. I think maybe we should just submit this
change, which allows people to define constants that are empty buffers
as placeholders.
  • Loading branch information
dsharlet authored Jan 28, 2025
1 parent 8b568bd commit 0b77aea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions builder/pipeline.cc
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,8 @@ bounds_map get_output_bounds(const std::vector<func::output>& outputs) {

box_expr compute_input_bounds(
const func* f, const func::input& i, const bounds_map& output_bounds, sanitize_user_exprs& sanitizer) {
assert(i.bounds.size() == i.buffer->rank());
box_expr crop(i.buffer->rank());
for (std::size_t d = 0; d < crop.size(); ++d) {
for (std::size_t d = 0; d < std::min(crop.size(), i.bounds.size()); ++d) {
crop[d] = bounds_of(sanitizer.mutate(i.bounds[d]), output_bounds);

if (d < i.input_crop.size()) {
Expand Down

0 comments on commit 0b77aea

Please sign in to comment.