Skip to content

Commit

Permalink
fix flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Siyuan Liu committed May 10, 2024
1 parent 8fff517 commit 37facf1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions torch_xla/stablehlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,13 +347,13 @@ def _exported_program_to_stablehlo_bundle(exported_model,
if options.inline_all_constant:
# Inline all constants.
torch_xla._XLAC._set_xla_all_numbers_special_scalars(True)
if "XLA_HLO_DEBUG" in os.environ:
xla_hlo_debug_env = os.environ["XLA_HLO_DEBUG"]
else:
xla_hlo_debug_env = "0"
if options.export_node_metadata:
gm_serializer = GraphModuleSerializer(exported_model.graph_signature,
exported_model.module_call_graph)
if "XLA_HLO_DEBUG" in os.environ:
xla_hlo_debug_env = os.environ["XLA_HLO_DEBUG"]
else:
xla_hlo_debug_env = "0"
os.environ["XLA_HLO_DEBUG"] = "1"
else:
gm_serializer = None
Expand Down

0 comments on commit 37facf1

Please sign in to comment.