PyTorch: A Reference Language
Posted by matt_d 12 hours ago
Comments
Comment by ainch 1 hour ago
Comment by ansk 10 hours ago
Comment by ezyang 2 hours ago
But I also don't think compilers are pointless. In this post, which looks at the maximalist AI situation, the compiler resurrects itself as the verifier: the two types of systems do very similar things! You can also defend compilers on more banal grounds: not everyone has a ton of kernel engineers to hand optimize your kernels; token efficient ways of getting good baselines is useful; there's more to ML than transformer models and compiler leverage is really useful there. There's also a historical point which is that torch.compile... by all objective metrics, has really been quite successful!
I do agree it's hard to tell the future. These days, I ask myself, "Do I think this is likely to happen in six months." I don't think compilers die in six months. Ask me again in six months :)
Comment by ansk 10 minutes ago
But optimizing the global structure -- things like defining the boundaries between kernels, the lifetimes of allocations (or when/how to reuse buffers), and scheduling/parallelizing operations -- seems inextricably tied to the type of traditional program analysis used by compilers.
Even tiling/layout decisions, which you mentioned can be optimized by hand or by an LLM in the context of a single kernel, must be optimized in the broader context of the computation to minimize copies/relayouts between kernels.
I think part of the problem is that massive models make the compiler problem very uninteresting, since global program optimization reduces to local kernel-level optimization.
Comment by pjmlp 2 hours ago
I think many that don't follow compilers haven't yet grasp how much there is already there, from machine learning based optimisation passes, JIT compiler heuristics, and so on, which never have been deterministic to start with.
Comment by antonvs 8 hours ago
If what you’re looking for is a way to avoid having to get into the operational details of the targets, and just provide a high level description that somehow gets figured out, then an LLM-based solution is almost certainly going to be your best bet.
Comment by ofou 2 hours ago
Comment by insumanth 4 hours ago
Comment by madhu_ghalame 10 hours ago
Comment by dmzxnico 5 hours ago