Vengineerの戯言

人生は短いけど、長いです。人生を楽しみましょう!

MLIR、ソースコード公開


2月8日にブログに書いたC4ML
その中で一番注目した

"MLIR Primer: A Compiler Infrastructure for the End of Moore’s Law",
Chris Lattner, Jacques Pienaar, and everyone on the MLIR team, Google

ソースコードが公開されましたね。

Overviewからの引用
    Multi-Level Intermediate Representation Overview

    The MLIR project aims to define a common intermediate representation (IR) that will unify the infrastructure 
    required to execute high performance machine learning models in TensorFlow and similar ML frameworks. 

    This project will include the application of HPC techniques, along with integration of search algorithms 
    like reinforcement learning. This project aims to reduce the cost to bring up new hardware, 
    and improve usability for existing TensorFlow users.

    Note that this repository contains the core of the MLIR framework. 
    The TensorFlow compilers we are building on top of MLIR will be part of the main TensorFlow repository soon.

とあり、MLIRとは、Multi-Level Intermediate Representation ということ。

Multi-Level


そして、

    The TensorFlow compilers we are building on top of MLIR will be part of the main TensorFlow repository soon.

とありますので、TensorFlowのためにあり、TensorFlowのリポジトリで公開すると。

ということで、公開されましたね。

MLIRからLLVMIRへの変換は、ConverToLLVMDialectのLLVMLoweringPassを上手く使ってやっているみたいです。

今のところは、LLVMIRへのパスのみですね。XLA HLO, TF Lite, Swift SILも出てきますかね。。。