Skip to content

Practical

trnsci: compile on a CPU host, run on Trainium. Neuron compile caches carry over

A feasibility test in trnsci#118 found that NEFFs compiled on a machine with no Neuron device are reused by a Trn2 box's persistent compile cache, with no neuronx-cc run, a fast first call and the same results. That works because the cache key is a pure function of the program and the compiler configuration, so compiling can move to cheaper CPUs ahead of a hardware window. The window that proved it also failed to keep most of its own cache, which is the practical half of this post. It is for anyone who pays for Trainium time and watches the first call compile.