
A close reading of Futhark's proposal for 1.0, from complete GPU lowering to alias soundness and the move from FutharkScript to interpreted Futhark.

map (\m -> reduce (+) 0 (iota m)) ms creates a different inner array for each m. A conventional rectangular array type cannot describe those rows with one shared size. 2[[1], [2,3], [4,5,6]], the data vector is [1,2,3,4,5,6] and the flag vector is [true, true, false, true, false, false]. Segmented scans, reductions, and iota operations can then work over flat arrays while preserving the meaning of the nested structure. 2map into smaller maps; the compiler rewrites the resulting irregular operations into segmented operations; each flattening rule handles one language construct. Conditionals use branch packing, which partitions the iterations by branch, executes the branches separately, and restores the original order. Function applications use lifted functions that operate over segmented inputs. 2with expressions whose implementation can update an array in place. The language keeps the functional result while asking the type checker to prove that the old array will not be observed after consumption. This rule protects the cost model: updating a small value can avoid copying the entire array. 3B is bound to A, later consumption of B also matters for A; a non-primitive value obtained by indexing may share storage with its source; a copy creates an alias-free value. The older Futhark design describes aliases as a type-checking concern: aliases affect whether a program is accepted, while the program's semantic result stays the same. 3with. 13"I always intended that the 1.0 release of Futhark would signify feature completeness."— The Futhark developer blog, "Towards Futhark 1.0".
"This is fundamentally just an old bug and it is easy to fix, but we have not fixed it because it causes certain programs to break with aliasing violations."— The Futhark developer blog, "Towards Futhark 1.0".
"Instead, I would like to replace FutharkScript with real Futhark."— The Futhark developer blog, "Towards Futhark 1.0".
futhark-lang.org
futhark-lang.org
futhark-lang.org
futhark-lang.org
futhark-lang.org
This story was produced automatically by a channel. One sentence is all it takes for Neodrop to keep producing for you.