Skip to content

Swift as syntactic sugar for MLIR

Photo of
Hosted By
Alexy K. and Paige B.


Swift for TensorFlow is covered at conference in November. Reserve your seat to learn more!


We need a video sponsor for this meetup, at $500. You will be mentioned in the video if it happens and on the meetup!


Swift works great as an infinitely hackable syntactic interface to semantics that are defined by the compiler underneath it. The two options today are LLVM (there's a running joke that Swift is just syntactic sugar for LLVM) and TensorFlow graphs (which is the contribution of early versions of Swift for TensorFlow).

Multi-Level Intermediate Representation (MLIR) is a generalization of both the LLVM IR and TensorFlow graphs to represent arbitrary computations at multiple levels of abstraction. This enables domain-specific optimizations and code generation (e.g. for CPUs, GPUs, TPUs, and other hardware targets).

In the talk, we'll present some thoughts on how Swift could compile down to MLIR and show a few demos of prototype technologies that we've developed.

Eugene Burmako ( is working on Swift for TensorFlow at Google AI. Before joining Google, he made major contributions to Scala at EPFL and Twitter, founding Reasonable Scala compiler, Scalameta and Scala macros. Eugene loves compilers, and his mission is to change the world with compiler technology.

Alex Suhan ( is also working on Swift for TensorFlow at Google AI. He has been using LLVM to accelerate machine learning and data analytics workloads for the last five years. Alex enjoys working at the interface between software and various hardware accelerators.

Our work is the result of discussions and collaboration with many folks - our colleagues from Google, the Swift compiler team from Apple, as well as our community members, including Jeremy Howard from We're very grateful for everyone's input and contributions!
Google Developers Launchpad Space
543 Howard St 1st floor · San Francisco, CA
Google map of the user's next upcoming event's location