Steven Johnson
Steven Johnson
The failure is coming from INSIDE HALIDE! Look at `mirror_interior()` and tell me where the uint32->int32 cast is (implicitly) creeping in: ``` Expr limit = extent - 1; Expr coord...
Unfortunately, if I change the bad line to `coord = saturating_cast(abs(coord));`, we still fail with the same result (input is touched in an infinite way), but none of the "dodgy"...
OK, that fixes the unbounded access... now I get failures with `Error: Signed integer overflow occurred during constant-folding. Signed integer overflow for int32 and int64 is undefined behavior in Halide.`...
Yeah, this is another one where it is gonna be tricky to find these errors in existing code without some helpers.
The first one I found basically amounted to code that used explicit casting to do a 'widening' mul (this code predates the `widening_mul()` etc operators: ``` // f and h...
> Also, widening_mul just means the same thing. The evidence suggests otherwise? Not sure I can give you an easy repro case from it but maybe using that snippet and...
> I pushed a user_warning for when bounds inference does something different to what it used to do. I'll apply that and retry.
> I'm a little alarmed that widening_mul heals that, because any 16-bit -> i32 cast should be bounded, because i32 can represent i16 and u16. Also, widening_mul just means the...
Also interesting (though maybe not 100% relevant here): we do specialize for shift_left, but only for signed integers, not for unsigned... in the case of this code, we have a...
This is fairly old, where does it stand?