3 ms·
I think they had a good dive here https://www.youtube.com/watch?v=SEwTjZvy8vw https://www.youtube.com/watch?v=SEwTjZvy8vw The gist is that MLIR (unlike LLVM) wa
by MohamedMabrouk 2mo ago
I think they had a good dive here
https://www.youtube.com/watch?v=SEwTjZvy8vw https://www.youtube.com/watch?v=SEwTjZvy8vw
The gist is that MLIR (unlike LLVM) was designed to be multithreaded so the whole stack above LLVM IR is parallel, and then LLVM is used as a per-function codegen tool in parallel, so although LLVM itself is single threaded there are multiple seperate contexts of it. also I think they wrote their own linker.
- pjmlp 2mo agoThat is hardly novel, here is the thesis for the Oberon multithreaded compiler from 2003. https://www.research-collection.ethz.ch/entities/publication/9d3ea231-9ad4-4ad8-b0ae-c5a4fd064022 https://www.research-collection.ethz.ch/entities/publication... C# compiler is also fully multithreaded since the Roslyn rewrite in 2016.
- melodyogonna 2mo agoThe novelty is in parrelizing LLVM, which is traditionally a single-thread code generator.
- pjmlp 2mo agoSo basically LLVM catching up with times.
- melodyogonna 2mo agoWell, LLVM itself is still single-threaded; they just designed Mojo's compiler in such a way that the code generation part can be parallelised, which is something you can do if you understand LLVM from top to bottom. As far as I can see, no other production-grade LLVM consumer has been able to make it parallel; the single-threaded nature remains a major performance bottleneck.
- ModernMech 2mo ago> Modular found ways to parralize LLVM code generation by introducing novel techniques > The novelty is in parrelizing LLVM, which is traditionally a single-thread code generator. You said they parallelized LLVM with novel techniques, but then claimed the novelty is the very act of parallelizing it. That's circular, you still haven't explained what are the novel techniques?
- melodyogonna 2mo agoHere is a presentation talking about the parallelization techniques, I skipped to the relevant part but the entire presentation is helpful in understanding how Mojo's compiler works: https://youtu.be/yuSBEXkjfEA?t=813&si=MlB7IsBDsj3o-PTX https://youtu.be/yuSBEXkjfEA?t=813&si=MlB7IsBDsj3o-PTX