I just read (here):
Deprecating XLA_CPU and XLA_GPU devices with this release. (TF 2.2.0)
Is XLA deprecated now? It is not used anymore? Is there an alternative? Or is this all automatically handled internally? What does this deprecation mean?
No, XLA is not being deprecated, in fact there are other release notes about it:
- XLA
- XLA now builds and works on windows. All prebuilt packages come with XLA available.
- XLA can be enabled for a
tf.function
with “compile or throw exception” semantics on CPU and GPU.
This note is actually related to the deprecation that you mention. What is being deprecated is using the strings XLA_CPU
and XLA_GPU
with tf.device
. See the deprecation warning message:
XLA_GPU and XLA_CPU devices are deprecated and will be
removed in subsequent releases. Instead, use either
@tf.function(experimental_compile=True) for must-compile
semantics, or run with TF_XLA_FLAGS=--tf_xla_auto_jit=2
for auto-clustering best-effort compilation.
That is what the other release note was talking about, which is mentioned in the XLA guide under Explicit compilation with tf.function.