r/ProgrammingLanguages • u/Athas Futhark • Mar 24 '26
Scan-scatter fusion
https://futhark-lang.org/blog/2026-03-24-scan-scatter-fusion.html
24
Upvotes
r/ProgrammingLanguages • u/Athas Futhark • Mar 24 '26
5
u/Disjunction181 Mar 24 '26
This was interesting to browse, and I'll have to sit down and go through all of the details sometime.
On the back of my mind was the polyhedral simplification optimization, see this paper or the amazing talk. Simplification is the optimization which allows one to write prefix scan naively, but always be transformed into a linear time variation. I was curious if such optimizations were / are being considered for Futhark, and the interaction it has with fusion, e.g., it seems like fusion could open up simplification optimizations (as
g o fmay be better behaved thanf,gindividually). If fusion is important, then I could see simplification being similar.3
u/yjlom Mar 25 '26
The link to accelerate in the post is dead (it leads to a domain name seller) fyi.
1
u/tsanderdev Mar 26 '26
I recently had an idea for explicit fusion for my shading language. If you e.g. dispatch a filter_map kernel, it would get a function pointer as a parameter (or maybe 2 to separate the filter and map), which is then called inside the compute dispatch, making it one dispatch instead of 2 with a complete barrier in between.
-7
u/Clementsparrow Mar 24 '26
How hard is it to give a short summary of the post so that we can know if it's worth our attention? Why is it so common in this subreddit to ignore this very basic rule of good manners?