halide / Halide

a language for fast, portable data-parallel computation
https://halide-lang.org
Other
5.86k stars 1.07k forks source link

Fix corner case in if_then_else simplification #8189

Closed abadams closed 5 months ago

abadams commented 5 months ago

Fixes the segfault reported in #8170

I have no idea how to repro this in a test. It came about as a result of applying the adams autoscheduler to an hvx pipeline, which produced a schedule with vectors wider than tiles, which turned into predication, which was then turned into something invalid inside the hexagon lowering path.

The if_then_else intrinsic is supposed to evaluate to zero if the condition is false and there's no false value defined.

steven-johnson commented 5 months ago

Ready to land?

jxl1080 commented 4 months ago

Hi, I wonder if this fix will eventually be included in binaries that I can download from: https://github.com/halide/Halide/releases

If so, is there an estimation when it will become publicly available?

Thank you!

abadams commented 4 months ago

There are one or two bugs that I would like to close out before we next do an official release, so it'll be a few more weeks. In the mean-time you can download a nightly build from https://buildbot.halide-lang.org/

These are the same as the releases. For the release artifacts we just grab the latest nightlies.

jxl1080 commented 4 months ago

@abadams Hi Andrew, thank you for your quick response! However, I'm still not very clear which item on https://buildbot.halide-lang.org/ is the nightly build you were referring to. I tried 'Halide-17.0.1-x86-64-linux-52541176253e74467dabc42eeee63d9a62c199f6.tar' on that page, but the issue I reported in #8170 seems still over there. Am I downloading the wrong item on that page? Thank you.

jxl1080 commented 4 months ago

I got more experimental result. The issue is resolved in 'Halide-18.0.0-x86-64-linux-dfaf6ad0715bc4973955d085c40f13340971529b', but it's still over there for 'Halide-17.0.0-x86-64-linux-d15325e3df2fec9927184bdc5a06284477df84bf' and 'Halide-17.0.1-x86-64-linux-52541176253e74467dabc42eeee63d9a62c199f6'. Will the fix eventually be in version 17, or I have to use version 18 if I need the fix? Thank you.