Skip to content

TailStrategy RoundUp in inner split with a large split factor triggers compiler internal error #7768

@TH3CHARLie

Description

@TH3CHARLie

Repro code:

    Func input("input");
    Func blur_x("blur_x");
    Func blur_y("blur_y");
    Var x("x"), y("y");
    input(x, y) = x + y;
    blur_x(x, y) = (input(x - 1, y) + input(x, y) + input(x + 1, y)) / 3;
    blur_y(x, y) = (blur_x(x, y - 1) + blur_x(x, y) + blur_x(x, y + 1)) / 3;
    Var x_outer("x_outer"), x_inner("x_inner"), x_inner_outer("x_inner_outer"), x_inner_inner("x_inner_inner"), x_inner_inner_outer("x_inner_inner_outer"), x_inner_inner_inner("x_inner_inner_inner"), x_inner_inner_inner_outer("x_inner_inner_inner_outer"), x_inner_inner_inner_inner("x_inner_inner_inner_inner");
    blur_y.split(x, x_outer, x_inner, 4, TailStrategy::Predicate).split(x_inner, x_inner_outer, x_inner_inner, 2, TailStrategy::GuardWithIf).vectorize(x_inner_inner).split(x_inner_inner, x_inner_inner_outer, x_inner_inner_inner, 1, TailStrategy::RoundUp).split(x_inner_inner_inner, x_inner_inner_inner_outer, x_inner_inner_inner_inner, 8, TailStrategy::RoundUp);
    blur_x.compute_root();
    Pipeline p({blur_y});
    Buffer<int> buf = p.realize({width, height});

Triggers:

Internal Error at /home/xuanda/dev/Serializer/Halide/src/IR.cpp:760 triggered by user code at : Condition failed: 0 <= i && i < input_lanes: Shuffle vector index out of range: 9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions