Nondeterminism in Futhark
A high-performance and high-level purely functional data-parallel array programming language that can execute on the GPU and CPU.
Quick read
A Futhark blog post discussing where nondeterminism arises in the Futhark language and how it manifests. It explains which language constructs and floating-point behaviour can cause nondeterministic results and why some checks are omitted.
- scatter can produce unpredictable writes when indices duplicate
- reduce requires associative operators; not enforced by the compiler
- floating-point rounding causes reproducibility differences across runs
Reactions
No reactions yet. Record a short about this link and it shows up here, in Reels and in the community feed.
Is futhark-lang.org your site? Sign in to verify it and get a Verified badge, full stats and a link-back badge.
A closer look at Nondeterminism in Futhark
What Nondeterminism Means in Futhark
This post explains three terms used when talking about numerical nondeterminism: Exact (same result every run), Replay (same result if you rerun with the same schedule/machine), and Approx (potentially nondeterministic). The nondeterminism discussed is about floating-point rounding, not shared-state concurrency. An example is parallel summation: different grouping or chunking changes the order of addition and thus the result. Atomic updates can introduce further variability even on the same machine.
Where nondeterminism actually arises in Futhark
Two main sources are described. First, language abuse: using #[unsafe] can disable safety checks and permit arbitrary memory reads/writes; this can be avoided by passing --safe to the compiler or simply not using unsafe code. Second, parallel constructs: scatter requires that index lists have no duplicates (or duplicates must correspond to identical values), but this is not checked at runtime; violating it makes write order unpredictable and can even produce torn writes. Reduce and other parallel combinators require associative (sometimes commutative) operators; the language does not check associativity, so using non-associative operators (notably floating-point addition) can lead to nonsensical or nondeterministic results.
Who will find this discussion useful
This writeup is aimed at Futhark users who care about numerical reproducibility and parallel correctness: people implementing data-parallel algorithms, those using scatter and reduce, and programmers moving from serial to parallel numeric code. It highlights pitfalls experienced and newer users commonly make and points out which issues are programmer responsibility versus inherent to floating-point arithmetic.
Questions people ask about Nondeterminism in Futhark
- Does Futhark check for duplicate indices in scatter or for associativity in reduce?
- No, scatter duplicate checks are not performed at runtime and associativity of operators is not checked; both are left to the programmer.
- Can I avoid unsafe memory behavior in Futhark?
- Yes, the post notes you can pass --safe to the compiler or avoid using the #[unsafe] attribute to prevent disabling safety checks.
- Is the nondeterminism discussed due to race conditions?
- No, the nondeterminism discussed comes from floating-point rounding and ordering of reductions or atomic combines, not classic shared-state race conditions.
Nondeterminism in Futhark was shared on NexURLs by NexURLs on November 7, 2026, in Tech & AI.
What we found on this site
- Built with
- Drupal
- Home page answered in
- 583 ms
- Trackers
- None found
- Ads
- None found
- RSS feed
- No
- AI crawlers
- Lets them in
- Set up for phones
- Yes
- Real-visitor speed
- Passes Core Web Vitals
- Popularity
- Top 200,000 domain (Cloudflare)
- Google safety check
- No threats found
- Domain registered
- 2016
- Domain renews
- April 2027
Checked November 7, 2026 from the site’s own code and public records. See how the rest of the web compares in the NexURLs Internet Report.
Featured in
Quick answers
What is Nondeterminism in Futhark?
Nondeterminism in Futhark (futhark-lang.org): A Futhark blog post discussing where nondeterminism arises in the Futhark language and how it manifests. It explains which language constructs and floating-point behaviour can cause nondeterministic results and why some checks are omitted.
Who shared Nondeterminism in Futhark on NexURLs?
It was shared by NexURLs in November 2026. Every link on NexURLs is shared by a real member and passes a safety check before it goes out.
What are some sites like Nondeterminism in Futhark?
Members found these close to it: Defining division, Alias Propagation Solutions, Programming Language Fundamentals in Agda. The full list is on this page under Sites like Nondeterminism in Futhark.
Sites like Nondeterminism in Futhark
- Defining divisionfuthark-lang.org
A Futhark blog post explaining a subtle undefined-behaviour bug in signed integer division when compiling to C and how...
- Alias Propagation Solutionsfuthark-lang.org
This page discusses alias propagation in the Futhark type checker. It's useful for understanding type system design...
- Programming Language Fundamentals in Agdaplfa.github.io
An online book that teaches programming language theory using the Agda proof assistant. It guides readers through...
- Unikernels in OCamluniker.nl
- Show HN: Firenook - Firebase emulators in Rust: 40× faster writes, 10× less RAMfirenook.dev
Firenook is a drop-in replacement for the Firebase Local Emulator Suite that runs native emulators without Java, using...
- Flow Typing, A New Lens on Linearityjaredforsyth.com
A blog post summarizing and reflecting on the paper “Flow Typing: A New Lens on Linearity,” which presents a...
More Tech & AI finds
- Forwarded Without Question: How Web Frameworks Overtrust the Forwarded Headerlkoskela.fi
- I’m not a fan of Deno’s security model (2024)goldstein.lol
- Hacking South Korea's National Cyber Security Centerduti.dev
- Workflow dependency lockfilesdocs.github.com
- We know 15k websites are infected. how do we tell them?scotthelme.co.uk
- Amutable Foundations: A Technical Overviewamutable.com
Feeling lucky? Try the random website generator.
Where people went next
Nobody has added a next stop yet. Be the first.