difference between TF_XLA_FLAGS=--tf_xla_auto_jit=2 and tf.config.optimizer.set_jit(True)

643 views
Skip to first unread message

t kevin

unread,
Nov 25, 2021, 6:06:05 AM11/25/21
to XLA development
Hi Folks,

What's the difference between these two methods to enable XLA?
Are they identical? Please let me know which piece of code should I look into if not.

This page said nothing about tf.config

and this page has a weird deprecation warning.

Thanks
Kevin

George Karpenkov

unread,
Nov 30, 2021, 6:13:48 PM11/30/21
to t kevin, XLA development
Hi Kevin,

They are identical and they both enable autoclustering. TF_XLA_FLAGS=--tf_xla_auto_jit=2 is preferred, as optimizer.set_jit has some weird caching behavior, and non-obvious non-local effects.
In general, jit_compile=True is preferred if possible.

--
You received this message because you are subscribed to the Google Groups "XLA development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xla-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xla-dev/cd9d2760-962a-473c-a7da-ed752adeb2f9n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages