Skip to content

Commit fb2d4e1

Browse files
authored
Disable open PJRT for xal2 if OS env disable flag is true (#7769)
1 parent 622f4f9 commit fb2d4e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

experimental/torch_xla2/torch_xla2/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
f'ml_framework_name:PyTorch/XLA2;ml_framework_version:{"v0.0.1"}'
2323
)
2424
xla_bridge._clear_backends()
25-
jax.devices() # open PJRT to see if it opens
25+
if os.environ.get("DISABLE_XLA2_PJRT_TEST") != "true":
26+
jax.devices() # open PJRT to see if it opens
2627
except RuntimeError:
2728
jax.config.update(
2829
'jax_pjrt_client_create_options', old_pjrt_options

0 commit comments

Comments
 (0)