Skip to content

Commit

Permalink
Fix "Not creating XLA devices, tf_xla_enable_xla_devices not set"
Browse files Browse the repository at this point in the history
  • Loading branch information
Fierralin committed May 3, 2022
1 parent 895f81d commit b2d4ae9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ def trainlog(s):
multi_gpu_device_ids.append("/GPU:" + str(int(piece)))
num_gpus_used = len(multi_gpu_device_ids)

# Fix for tensorflow 2.4: Not creating XLA devices, tf_xla_enable_xla_devices not set
os.environ['TF_XLA_FLAGS'] = '--tf_xla_enable_xla_devices'


# MODEL ----------------------------------------------------------------
printed_model_yet = False
Expand Down

0 comments on commit b2d4ae9

Please sign in to comment.