title: Could not find registered compiler for platform CUDA
body: <p>I have tensorflow installed, cuda installed, my program can successfully run on GPU:</p>
  <pre><code>I tensorflow/core/common_runtime/gpu/gpu_device.cc:1525] Created device
  /job:localhost/replica:0/task:0/device:GPU:0 with 30655 MB memory:
   -&gt; device: 0, name: Tesla V100-SXM3-32GB, pci bus id: 0000:0c:00.0, compute capability: 7.0
  </code></pre>
  <p>(If it matters, I've restricted tensorflow to use just one GPU by writing the following: <code>os.environ[&quot;CUDA_VISIBLE_DEVICES&quot;] = &quot;7&quot;</code>)</p>
  <p>I've ben trying to optimize GPU performance in hope of achieving faster fitting speeds. I was going to follow <a href="https://www.tensorflow.org/xla?hl=en" rel="nofollow noreferrer">this guide on enabling XLA</a>, i.e. to define each tf.function with <code>jit_compile=True</code>:</p>
  <pre><code>@tf.function(jit_compile=True)
  def ...
  </code></pre>
  <p>however I'm stuck with this error:</p>
  <pre><code>2022-05-29 18:59:56.268562: W tensorflow/core/framework/op_kernel.cc:1745] OP_REQUIRES failed at xla_ops.cc:248 :
    UNIMPLEMENTED: Could not find compiler for platform CUDA:
       NOT_FOUND: could not find registered compiler for platform CUDA -- check target linkage
       (hint: try adding tensorflow/compiler/jit:xla_gpu_jit as a dependency)
  </code></pre>
  <p>I'm not sure how it's possible that tensorflow can't find a compiler for CUDA, since without XLA everything works okay.</p>
  <p>Also, I'm not really experienced in this area, so I couldn't make any sense of the &quot;hint&quot; (see above in the error message)</p>
  <p><sup>Before you ask me how's it possible that I'm noob in ML but has this powerful GPU - I don't own it, I'm just working with the Nvidia DGX machine provided by my university</sup></p>