<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.21.0/tensorflow/python/compiler/mlir/mlir.py#L170-L178) |

Writes an MLIR module out as bytecode.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.mlir.experimental.write_bytecode`](https://www.tensorflow.org/api_docs/python/tf/mlir/experimental/write_bytecode)

<br />

    tf.mlir.experimental.write_bytecode(
        filename, mlir_txt
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `filename` | The filename to write to. |
| `mlir_txt` | The MLIR module in textual format. |

<br />