# tf.config.optimizer.set_jit

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.13.1/tensorflow/python/framework/config.py#L161-L184) |

Configure JIT compilation. (deprecated argument values)

#### View aliases


**Compat aliases for migration**

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

[`tf.compat.v1.config.optimizer.set_jit`](https://www.tensorflow.org/api_docs/python/tf/config/optimizer/set_jit)

<br />

    tf.config.optimizer.set_jit(
        enabled: Union[bool, str]
    )

> [!WARNING]
> **Deprecated:** SOME ARGUMENT VALUES ARE DEPRECATED: `(jit_config=True)`. They will be removed in a future version. Instructions for updating: `True` setting is deprecated, use `autoclustering` instead.

> [!NOTE]
> **Note:** compilation is only applied to code that is compiled into a graph (in TF2 that's only a code inside [`tf.function`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/function)).

<br />

<br />

<br />

| ## Args ||
|---|---|
| `enabled` | JIT compilation configuration. Possible values: <br /> - `"autoclustering"` (`True` is a deprecated alias): perform [autoclustering](https://www.tensorflow.org/xla#auto-clustering) (automatically identify and compile clusters of nodes) on all graphs using [XLA](https://www.tensorflow.org/xla). - `False`: do not automatically compile any graphs. |