halide / Halide

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

Feature request: Parallel update definitions. #2289

Open mcourteaux opened 7 years ago

mcourteaux commented 7 years ago

I have looked through the available scheduling methods, but I couldn't seem anything that would allow me to define two (or more) update passes in parallel. Syntax like this would be nice:

output.parallel_updates({3, 4});

Of course, I know that the domains that are influenced by these updates are completely disjunct.

Maybe I'm missing something, and this is already possible?

abadams commented 7 years ago

It's sorta possible, if you express them as a single update definition with an additional outer dimension to the RDom of extent 2, and then you parallelize over that dimension. Halide will try to prove that the regions are disjoint for you.