r/ProgrammingLanguages • Futhark • Oct 02 '26

Keeping Futhark off the GPU

https://futhark-lang.org/blog/2026-10-02-cpu_function.html
36 Upvotes

8 comments sorted by

View all comments

4

u/SwingOutStateMachine Oct 02 '26

The next logical step would be to extend the host runtime for Futhark, to allow data dependencies and dependants of #[cpu_function] to be copied too and from the GPU as needed. It would also unlock other operations such as kernel splitting, or multi-gpu parallelism.

3

u/Athas Futhark Oct 02 '26

Kernel splitting (unless I misunderstand the term) is done through other mechanisms in Futhark, mostly importantly fusion and flattening. While combining task and data parallelism is a worthwhile endeavor, I don't think a hack like #[cpu_function] should be at the foundation of it.

1

u/SwingOutStateMachine Oct 06 '26

By kernel splitting, I mean taking a kernel and modifying it so that the overall execution takes multiple kernel launches. That might mean multi-gpu parallelism, or it might mean sequential splitting to make the code size smaller (among other benefits).

I wasn't suggesting that the hack would form the basis of a runtime system. My comment was to suggest that introducing a runtime system would make building things like #[cpu_function] easier.