News for hackers. Stuff that matters.
Re:LLMs could be, but shouldn't be compilers by thwarted on Friday February 06, 2026 @10:55AM (#46914379)
No, deterministic means that given the same inputs—source code, target architecture, optimization level, memory and runtime limits (because if the optimizer has more space/time it might find better optimizations), etc—a compiler will produce the same exact output. This is what reproducible builds is about: tightly controlling the inputs so the same output is produced.

That a compiler might pick among different specific implementations in the same equivalency class is exactly what you want a multi-architecture optimizing compiler to do. You don't want it choosing randomly between different optimization choices within an optimization level, that would be non-deterministic at compile time and largely useless assuming that there is at most one most optimized equivalent. I always want the compiler to choose to xor a register with itself to clear it if that's faster than explicitly setting it to zero if that makes the most sense to do given the inputs/constraints.

Re:LLMs could be, but shouldn't be compilers by CGMthrowaway on Friday February 06, 2026 @11:22AM (#46914809)
Determinism may be required for some compiler use cases, such as reproducible builds, and several replies have pointed that out. My point isn't that determinism is unimportant, but that it isn't intrinsic to compilation itself.

There are legitimate compiler use cases e.g. search‑based optimization, superoptimization, diversification etc where reproducibility is not the main constraint. It's worth leaving conceptual space for those use cases rather than treating deterministic output as a defining property of all compilers

Re:LLMs could be, but shouldn't be compilers by thwarted on Friday February 06, 2026 @03:24PM (#46917684)
Given the same inputs, the desire for search-based optimization, superoptimization, or diversification should still be predictable and deterministic, even if it produces something that is initially unanticipated. It makes no sense that that a given superoptimization search would produce different output—would determine some other method is now more optimized than another—if the initial input and state is exactly the same. It is either the most optimal given the inputs and the state or it is not.

You are attempting to hedge and leave room for a non-deterministic compiler, presumably to argue that something like vibe-compilation is valuable. However, you've offered no real use cases for a non-deterministic compiler, and I assert that such a tool would largely be useless in the real world. There is already a huge gap between requirements gathering, the expression of those requirements, and their conversion into software. Adding even more randomness at the layer of translating high level programming languages into low level machine code would be a gross regression.

Re:LLMs could be, but shouldn't be compilers by sureglymop on Friday February 06, 2026 @11:07AM (#46914561)
Don't LLMs create the same outputs based on the same inputs if the temperature is 0? Maybe I'm just misunderstanding.
Re:LLMs could be, but shouldn't be compilers by AlotOfReading on Friday February 06, 2026 @12:30PM (#46915663)
Unfortunately not. Various implementation details like attention are usually non-deterministic. This is one of the better blog posts I'm aware of:

https://thinkingmachines.ai/blog/defeating-nondeterminism-in...

Re:LLMs could be, but shouldn't be compilers by 8note on Friday February 06, 2026 @09:50PM (#46920861)
i dont think theres anything that makes it essentiall that llms are non-deterministic though

if you rewrote the math to be all fixed point precision on big ints, i think you would still get the useful LLM results?

if somebody really wanted to make a compiler in an LLM, i dont think that nondetermism is problem

id really imagine an llm compiler being a set of specs, dependency versions, and test definitions to use though, and you'd introduce essential nondetermism by changing a version number, even if the only change was the version name from "experimental" to "lts"

Re:LLMs could be, but shouldn't be compilers by AlotOfReading on Saturday February 07, 2026 @04:18PM (#46928148)
They're not inherently non-deterministic, correct. And floating point is deterministic enough, as that blog post is demonstrating.
Re:LLMs could be, but shouldn't be compilers by h3lp on Tuesday February 10, 2026 @11:36AM (#46962412)
When they run on the deterministic hardware, yes. When they run on some large, parallel, varying-unpredictable-load-dependent-latency hardware, no.