halide / Halide

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

Floats and hexagon #3495

Closed edubois closed 5 years ago

edubois commented 5 years ago

Hi,

I'd like to do this:

        f.update(0)
            .split(x, x_o, x_i, 128)
            .reorder(x_i, x_o, y)
            .split(x_i, x_i_vo, x_i_vi, 128)
            .hexagon().vectorize(x_i_vi, 128)
            .parallel(y)
            ;

Except that f is made of floating points, is there any trick I can use to use take profit of HVX using floating points? I mean using vectorization or parallelization.

dsharletg commented 5 years ago

Unfortunately, no, you'll have to find a way to express your algorithm without floats. I think Hexagon can do scalar floating point math, but that's probably not what you want (it's not HVX).