diff --git a/torch_xla/__init__.py b/torch_xla/__init__.py index 1112b299aec..be700ae917f 100644 --- a/torch_xla/__init__.py +++ b/torch_xla/__init__.py @@ -154,7 +154,7 @@ def _prepare_to_exit(): if int(os.environ.get('PT_XLA_DEBUG', '0')): _summarize_fn_tracker() except Exception as e: - print('Caught an exception in the atexit callback: ', e) + print('Caught an exception in the atexit callback: ', e, flush=True) os._exit(1)