Skip to content

Commit 1a92ce5

Browse files
committed
Merge branch 'helpers_compilation' into 'main'
call helpers makefile every run so we recompile if the code has changed See merge request ADLR/megatron-lm!215
2 parents 996aca6 + f023286 commit 1a92ce5

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

megatron/initialize.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,11 @@ def finish_mpu_init():
8080
_init_autoresume()
8181

8282
# Compile dataset C++ code.
83-
try:
84-
from megatron.data import helpers
85-
except:
86-
if torch.distributed.get_rank() == 0:
87-
from megatron.data.dataset_utils import compile_helper
88-
compile_helper()
89-
# Simple barrier
90-
torch.distributed.barrier()
83+
if torch.distributed.get_rank() == 0:
84+
from megatron.data.dataset_utils import compile_helper
85+
compile_helper()
86+
# Simple barrier
87+
torch.distributed.barrier()
9188

9289
# No continuation function
9390
return None

0 commit comments

Comments
 (0)