Skip to content

A split can use the same var name for inner and outer without error #7714

@abadams

Description

@abadams

The following code should throw an error on the call to split but does not. Instead it compiles to a garbage pipeline that sprays writes all over the place.

#include "Halide.h"

using namespace Halide;

int main(int argc, char **argv) {
    Var x;
    Func f;
    f(x) = 0;
    f.split(x, x, x, 16, TailStrategy::RoundUp);
    return 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    error_messageImprovements to error messages

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions