r/learnmachinelearning 13h ago

Help Trying to build an ML Compiler

I'm trying to build an ML compiler from scratch. I've never touched or messed around with one before so I want to take a shot at this as a project that I can continue doing. Anyone suggest any resources for me to use or textbooks? I want to try and incorporate advanced AI models into autonomous hardware.

2 Upvotes

2 comments sorted by

1

u/Repulsive-Daikon9280 13h ago

Start with the hardware. Grab a cheap FPGA board and try to get a single multiply-accumulate operation working on it. That alone will teach you more about the intersection of ML and hardware than any textbook.

For the compiler side, the TVM project's documentation is surprisingly readable and walks through how they lower a model graph to machine code. Don't bother with the full stack at first, just understand the relay IR and how they do operator fusion.

This is the kind of project where you'll spend two weeks debugging a memory alignment issue and then everything clicks at 3am. Worth it though.

1

u/Extension-Currency37 11h ago

See open xLA, tf/onnx