Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix path in prof.export_chrome_trace() from pretrain_gpt_alcf.py #15

Merged
merged 1 commit into from
May 20, 2024
Merged
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
11 changes: 8 additions & 3 deletions pretrain_gpt_alcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

"""Pretrain GPT"""

from pathlib import Path
from mpi4py import MPI
import os
from rich import print
Expand Down Expand Up @@ -581,9 +582,13 @@ def main():
data_post_process=data_post_process
)
args = get_args()
prof.export_chrome_trace(
f"{args.tensorboard_dir}"
"/torch-trace-{RANK}-of-{WORLD_SIZE}.json"
assert args is not None
trace_output = Path(f"{args.tensorboard_dir}").joinpath(
f"torch-trace-{RANK}-of-{WORLD_SIZE}.json"
)
prof.export_chrome_trace(trace_output.as_posix())
log.info(
f'Saved trace output to: {trace_output.as_posix()}'
)
else:
model = pretrain(
Expand Down