Skip to content

Commit

Permalink
Add TPU verbose logging flags
Browse files Browse the repository at this point in the history
  • Loading branch information
tengyifei authored Feb 24, 2025
1 parent ed323d6 commit a749c1a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions torchprime/launcher/thunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
)
print(f"Dumping XLA compiler outputs to {xla_dump_path}", flush=True)

# Verbose logging flags to help debug TPU hardware issue
os.environ["TPU_VMODULE"] = "slice_configuration=1,real_program_continuator=1"
os.environ["TPU_STDERR_LOG_LEVEL"] = "0"
os.environ["TPU_MIN_LOG_LEVEL"] = "0"
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "0"

# Determine the profile dir
profile_dir = mounted_artifact_dir / jobset_name / "profile" / host_name
print(f"Profile output directory: {profile_dir}", flush=True)
Expand Down

0 comments on commit a749c1a

Please sign in to comment.