Skip to content

Commit

Permalink
add some comment
Browse files Browse the repository at this point in the history
  • Loading branch information
vanbasten23 committed Feb 8, 2024
1 parent e89769d commit bf6686d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch_xla/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def _prepare_to_exit():
# Due to https://bugs.python.org/issue27035, simply raising an exception in the atexit callback does not set the exit code correctly. That is why we need to set the exit code explicitly.
# Using `exit(1)` does not set a correct exit code because it is useful for the interactive interpreter shell and should not be used in programs and it works by raising an exception. (https://docs.python.org/3/library/constants.html#exit)
# sys.exit(1) does not set a correct exit code because it also raises an exception.
exit(1)
os._exit(1)


def _init_xla_lazy_backend():
Expand Down

0 comments on commit bf6686d

Please sign in to comment.