Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions torchtitan/config/job_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,9 @@ class Comm:
save_traces_folder: str = "comm_traces"
"""Flight recorder trace files location"""

save_traces_file_prefix: str = "rank_"
"""Flight recorder trace files prefix"""


@dataclass
class MemoryEstimation:
Expand Down
5 changes: 3 additions & 2 deletions torchtitan/distributed/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def _get_distributed_backend(enable_cpu_backend):
return backend

TRACE_BUFFER_SIZE = "TORCH_FR_BUFFER_SIZE"
TRACE_FILE = "TORCH_NCCL_DEBUG_INFO_TEMP_FILE"
TRACE_FILE = "TORCH_FR_DUMP_TEMP_FILE"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TORCH_NCCL_DEBUG_INFO_TEMP_FILE is being deprecated

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think we should work on #1192

DUMP_ON_TIMEOUT = "TORCH_NCCL_DUMP_ON_TIMEOUT"
ASYNC_ERROR_HANDLING = "TORCH_NCCL_ASYNC_ERROR_HANDLING"
SKIP_CLEANUP = "3"
Expand All @@ -275,8 +275,9 @@ def _get_distributed_backend(enable_cpu_backend):
# dump on timeout by default if trace buffer is enabled
_warn_overwrite_env(DUMP_ON_TIMEOUT, "1")
dump_dir = os.path.join(base_folder, comm_config.save_traces_folder)
prefix = comm_config.save_traces_file_prefix
os.makedirs(dump_dir, exist_ok=True)
_warn_overwrite_env(TRACE_FILE, f"{dump_dir}/rank_")
_warn_overwrite_env(TRACE_FILE, f"{dump_dir}/{prefix}")

torch.distributed.init_process_group(
backend=_get_distributed_backend(enable_cpu_backend),
Expand Down
Loading