r/Compilers • • 22d ago

projects for getting good at mlir (mid level, backend)

I'm an incoming intern at a startup that builds custom chips for AI inference. somehow (luckily!) I got matched to a team that works with MLIR. I have taken some courses related to compilers, briefly touched LLVM, and have basic familiarity with mid level compiler algorithms like SCCP, LICM, etc.

to have a successful internship, I need to be able to get things done. I need to try building my own passes for experience, learn how to break problems down, and thoroughly engage with the problem space. all of these things will help me ask good questions.

my previous internships were in backend web development. that felt more straightforward, and more tangible (the request works, we hit some SLA, etc). compilers feel more abstract and more intimidating. because of this, I have often procrastinated preparing for fear of looking like a beginner, but that can't happen anymore.

so, I would like your advice on engaging with compilers. I don't just want to read a textbook (i have a tendency to do that), I need to get things done and iterate.

in the interest of iterating fast and learning, I'd like to know - what are the highest ROI projects that I can do? I was lurking and someone suggested "What about getting into FPGA and write your own CPU for using as a target?".

and for the mid-level or backend compiler engineers here, if you could do it all over again, what would you do differently? how would you change your roadmap and what kind of ways to engage with material (maybe with a mentor, or something) would you leverage that maybe aren't obvious?

36 Upvotes

8 comments sorted by

1

u/nian2326076 19d ago

Building your own passes is a solid way to get hands-on experience with MLIR. Start with small, achievable goals, like modifying existing passes or writing simple ones. Engaging with the MLIR community can also help; consider finding a mentor or participating in forums.

You can use LandOffer to shortlist relevant roles in AI and compiler development, which may help you connect with opportunities that align with your internship goals.

1

u/cudalover919 19d ago

Astroturfing?

5

u/IlluminatiNotRealOr 22d ago

You are at an interesting stage where it is ridiculously easy to get onboarded with mlir wth claude. You will almost never have to read mlir, which imo is a good thing cause otherwise the learning curve is too high and you can focus on the actual compilation work.

That said it is not easy and if you are not bright enough you could easily just end up being the prompt guy who knows nothing beyond prompting. Use Claude generously and make sure to understand every single thing, and i mean every single thing. Ask your team for starter tasks like basic regressions, use claude and fix it. Claude will be able to do it in minutes but you should spend hours trying to understand how. Do this for a few days and you will be upto speed pretty quickly, much faster than your predecessors (again this relies on you being capable, it is not magic)

0

u/SoloLeveller07 22d ago

Hey could you recommend a fellow compiler-enthusiast how you started out learning compilers? I did try to find resources but got overwhelmed pretty quick, how did you find where to start?

1

u/MD90__ 22d ago

Crafting interpreters is where I started

2

u/SoloLeveller07 22d ago

Oh damn okayy thanks a lot!!