How are TFLite models generated from the MLIR tfl dialect IR?

Skip to first unread message

Simon King

Aug 1, 2021, 4:49:06 PMAug 1
to TensorFlow Lite
Hi tflite team and friends,

I am working on a project of building TFLite models based on TFLite MLIR IR. According to one of your videos ( 1), TFLite converter can translate tfl dialect MLIR IR to TFLite models. Therefore, I assume that the converter has integrated the tool that I need.

My questions are: (1) if I have the TFLite dialect IR, could I generate the tflite flatbuf file? (2) if the answer for (1) is yes, is there any resource that I can leverage? I know the mlir part of tflite is hosted in But I don't know where to start.


Jaesung Chung

Aug 1, 2021, 7:59:31 PMAug 1
to Simon King, TensorFlow Lite
Hi Simon King,

If you have the TFLite dialect IR-based module op in the MLIR, you can convert it through the following method:


Also I would recommend looking at the flatbuffer_* files under the tensorflow/compiler/mlir/lite directory.

Best regards,

You received this message because you are subscribed to the Google Groups "TensorFlow Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Simon King

Aug 4, 2021, 2:54:54 PMAug 4
to TensorFlow Lite, Jaesung Chung, Simon King
Thanks for your information!
Reply all
Reply to author
0 new messages