Skip to content

Commit 8b2fc50

Browse files
committed
Merge branch 'main' of github.com:AI-Hypercomputer/maxtext into sujinesh/llama2_v6e_pw_long_running_test
2 parents e5114d4 + d01c2aa commit 8b2fc50

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

MaxText/train.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -963,12 +963,13 @@ def train_loop(config, state=None):
963963
# pytype: disable=attribute-error
964964
compiled = p_train_step.lower(state, example_batch, nextrng).compile()
965965
compiled_stats = compiled.memory_analysis()
966-
max_logging.log(
967-
f"Output size: {compiled_stats.output_size_in_bytes}, "
968-
f"temp size: {compiled_stats.temp_size_in_bytes}, "
969-
f"argument size: {compiled_stats.argument_size_in_bytes}, "
970-
f"host temp size: {compiled_stats.host_temp_size_in_bytes}, in bytes."
971-
)
966+
if compiled_stats is not None:
967+
max_logging.log(
968+
f"Output size: {compiled_stats.output_size_in_bytes}, "
969+
f"temp size: {compiled_stats.temp_size_in_bytes}, "
970+
f"argument size: {compiled_stats.argument_size_in_bytes}, "
971+
f"host temp size: {compiled_stats.host_temp_size_in_bytes}, in bytes."
972+
)
972973
return state
973974

974975

0 commit comments

Comments
 (0)