Skip to content

Commit 2967a61

Browse files
committed
Update
1 parent 076b03a commit 2967a61

4 files changed

Lines changed: 16 additions & 14 deletions

File tree

axlearn/cloud/gcp/jobset_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ def _build_pod(self) -> Nested[Any]:
635635
# TODO(samos123) support using reservation when using local launch
636636
# the local launch command automatically sets tier=disabled.
637637
logging.info("Found tier=%s in env. Using reservation=%s", tier, cfg.reservation)
638-
if tier == "0" and cfg.reservation is not None:
638+
if tier in ["0", "disabled"] and cfg.reservation is not None:
639639
logging.info("Found tier=%s in env. Using reservation=%s", tier, cfg.reservation)
640640
selector.update({"cloud.google.com/reservation-name": cfg.reservation})
641641
if cfg.reservation_project is not None:

axlearn/common/compiler_options.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,11 @@ def default_xla_options(
133133
# Many of the v7x flags are similar to v6e
134134
xla_tpu_dvfs_p_state=7,
135135
xla_tpu_scoped_vmem_limit_kib=65536,
136-
xla_tpu_enable_sparse_core_reduce_scatter_v2="true",
137-
xla_tpu_enable_sparse_core_collective_offload_all_gather="true",
138-
xla_tpu_enable_sparse_core_collective_offload_2d_all_gather="true",
139136
xla_tpu_enable_all_gather_offload_tracing="true",
140137
xla_tpu_enable_async_collective_fusion_fuse_all_gather="false",
141138
xla_enable_async_all_gather="true",
142139
xla_tpu_prefer_async_allgather_to_allreduce="true",
143-
xla_tpu_enable_sparse_core_collective_offload_all_reduce="true",
144-
xla_tpu_enable_sparse_core_collective_offload_reduce_scatter="true",
140+
xla_tpu_impure_enable_packed_bf16_math_ops="true",
145141
)
146142

147143
# Ensure pipelining is properly configured
@@ -153,11 +149,15 @@ def default_xla_options(
153149

154150
# v7x flags from MaxText, inclusing SparseCore configs
155151
options.update(
156-
xla_tpu_use_single_sparse_core_for_all_gather_offload="true",
152+
xla_tpu_enable_sparse_core_collective_offload_all_reduce="true",
153+
xla_tpu_enable_sparse_core_collective_offload_reduce_scatter="true",
154+
xla_tpu_enable_sparse_core_collective_offload_all_gather="true",
155+
xla_tpu_enable_sparse_core_collective_offload_2d_all_gather="true",
156+
xla_tpu_enable_sparse_core_reduce_scatter_v2="true",
157157
xla_tpu_enable_sparse_core_collective_offload_3d_all_gather="true",
158+
xla_tpu_use_single_sparse_core_for_all_gather_offload="true",
158159
xla_sc_disable_megacore_partitioning="true",
159160
xla_tpu_use_tc_device_shape_on_sc="true",
160-
xla_tpu_impure_enable_packed_bf16_math_ops="true",
161161
)
162162
if num_slices > 1:
163163
# Support multiple TPU slices connected over a data center network.

axlearn/common/trainer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ def run(
626626
)
627627
self.vlog(3, "Done step %s", self.step)
628628
num_steps += 1
629-
if num_steps % 100 == 0:
629+
if num_steps % 1 == 0:
630630
now = time.perf_counter()
631631
average_step_time = (now - start_time) / num_steps
632632
self._step_log("Average step time: %s seconds", average_step_time)
@@ -1338,6 +1338,7 @@ def _maybe_stop_or_start_tracing(
13381338
cfg.start_trace_process_indices == "all"
13391339
or jax.process_index() in cfg.start_trace_process_indices
13401340
)
1341+
self._step_log(f"{should_start_tracing=}")
13411342
if should_start_tracing:
13421343
self._step_log("Start profiler tracing")
13431344
jax.profiler.start_trace(self.summary_writer.config.dir)

axlearn/experiments/text/gpt/fuji.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -748,11 +748,12 @@ def get_trainer_kwargs(
748748
policy=config_for_function(
749749
save_and_offload_only_these_names_regex
750750
).set(
751-
names_which_can_be_saved="|".join(
752-
[
753-
RematRegexSavePatterns.QKV_PROJ.value
754-
]
755-
),
751+
# names_which_can_be_saved="|".join(
752+
# [
753+
# RematRegexSavePatterns.QKV_PROJ.value
754+
# ]
755+
# ),
756+
names_which_can_be_saved=None,
756757
names_which_can_be_offloaded="|".join(
757758
[
758759
RematRegexSavePatterns.INPUT.value,

0 commit comments

Comments
 (0)