diff --git a/torch_xla/stablehlo.py b/torch_xla/stablehlo.py index 4bf7120ef3c..f825b7465e3 100644 --- a/torch_xla/stablehlo.py +++ b/torch_xla/stablehlo.py @@ -347,10 +347,7 @@ 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" + xla_hlo_debug_env = os.environ.get("XLA_HLO_DEBUG", "0") if options.export_node_metadata: gm_serializer = GraphModuleSerializer(exported_model.graph_signature, exported_model.module_call_graph)