4 ms·
I'm not the target audience but the GitHub and website getting started page feel so poorly explained. What the hell is a schedule?
by erdaniels 2y ago
I'm not the target audience but the GitHub and website getting started page feel so poorly explained. What the hell is a schedule?
- gnabgib 2y agoThis MIT article covers it a bit more (with a slightly too generic title) High-performance computing, with much less code https://news.mit.edu/2025/high-performance-computing-with-much-less-code-0313 https://news.mit.edu/2025/high-performance-computing-with-mu... (https://news.ycombinator.com/item?id=43357091 https://news.ycombinator.com/item?id=43357091)
- imtringued 2y agohttps://github.com/exo-lang/exo/blob/main/examples/avx2_matmul/README.md https://github.com/exo-lang/exo/blob/main/examples/avx2_matm... I personally am not convinced.
- lostmsu 2y agoAgreed. It looks like if you need to optimize it would be much easier to just modify the code directly. The result will also be more readable and therefore easier to support in the future.
- ajb 2y agoA schedule is the order in which machine instructions get executed. So, I've done this professionally (written assembler code, and then scheduled it manually to improve performance). Normally you don't need to do that these days, as even mobile CPUs use out-of-order cores which dynamically schedule at runtime. It's only going to be useful if you're writing code for some machine that doesn't do that (they give examples of TPU etc)
- almostgotcaught 2y ago> out-of-order cores which dynamically schedule at runtime. OOO architectures don't reschedule dynamically - that's impossible - they just have multiple instruction buffers that can issue the instructions. So scheduling is still important for OOO it's just at the level of DDG instead of literally linear order in the binary. Edit: just want to emphasize > It's only going to be useful if you're writing code for some machine that doesn't do that There is no architecture for which instruction scheduling isn't crucial.
- ajb 2y agoIf you're talking about modifying the DDG, I would not call that scheduling. Because then you need to do serious work to prove that your code is actually doing the same thing. But I haven't spent a lot of time in the compiler world, so maybe they do call it that. Perhaps you could give your definition?
- dzaima 2y agoNeeding to do serious work would correlate with Exo having multiple publications about its design. It's a broader sense of scheduling than "reorder trivially-independent instructions", but, if you remove the "trivially-" part and replace "instructions" with "operations", it's the same concept of doing transformations that only move around when certain things happen.
- achierius 2y ago> There is no architecture for which instruction scheduling isn't crucial. In my experience doing back-end compiler work, it's definitely last on the list of major concerns. Obviously you can't ignore it, but it's not where any significant gains are coming from, and anything 'fancy' you do there is likely to be picked up by future generations of hardware.
- almostgotcaught 2y ago> but it's not where any significant gains are coming from i have no clue what you're saying here - if your scheduler fucks up your pipelining you're gonna have a bad time (conversely if you're scheduler recognizes pipelining opportunities you're gonna have a good time). as usual anyone who says something like "in my experience it's not a big deal" simply does not have enough experience.
- ForTheKidz 2y agoYes, clearly we should have spent more time trying to coax our cpus into fucking up pipelining.
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]
- EVa5I7bHFq9mnYK 2y agoWord "schedule" is already taken for thread scheduling in the kernel, so reuse of that word is confusing. This is a code generator that operates on nested loops - allows to reorder and split them, replace instructions etc. All to maximize performance.