Hey, thank you for your question. In fact it is not one CPU program driving thousands of GPUs but rather the opposite: independent processes, each driving one GPU, and all running the same program on different data. The host process (CPU) is just moving the data to the GPU and driving the network. The tensor (sub)tiles are allocated to individual nodes.
I also want to be clear and I hope I was upfront enough about it in the post: I haven't validated any of this at scale myself. Phobos is a learning project, and the numbers in the post are single-GPU. This is my understanding of how the big clusters work, not something I've run as I do not have access to a large cluster.
With Java, and any other VM that doesn't specify an exact GC algorithm, it always depends.
IIRC the train algorithm used in some JVMs improves locality. Most GCs use a pointer-bump scheme anyways, leading to pretty good locality for objects that have been created together.
So yes, the JVM _may_ have some pretty cool mechanisms to minimize those. I would be also interested in G1s behavior and whether or not it improves locality somehow.
Absolutely. See [1] for instance. Superoptimization has been around since the 80s and at the first superoptimizer by Alexia Massalin targeted the 68000 instruction set.
I know it's a shameless plug, but if you want to convert any Java bytecode with less semantic differences than scala.js and full reflection support you might want to give https://www.defrac.com/ a try.
[ my public key: https://keybase.io/joa; my proof: https://keybase.io/joa/sigs/XIuyRObYDr46LCgYLIWJt5DKlYIBq3DYbjRIOqUzocE ]