Skip to content

Commit 5a5b55d

Browse files
committed
More logging for XLA compile options
GitOrigin-RevId: 3fad67f
1 parent 91eb3f7 commit 5a5b55d

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

axlearn/common/compiler_options.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,14 @@ def infer_xla_performance_flags(
375375
*, mesh_shape: "MeshShape", mesh_axis_names: Sequence[str], device_kind: str
376376
) -> dict[str, str]:
377377
"""Performs automatic XLA flag tuning based on mesh shape and device kind."""
378+
379+
logging.info(
380+
"Inferring XLA flags for mesh %s (%s) and device %s",
381+
mesh_shape,
382+
mesh_axis_names,
383+
device_kind,
384+
)
385+
378386
if device_kind == "TPU v6 lite":
379387
device_kind = "TPU v6e"
380388

axlearn/common/trainer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,7 @@ def _get_compiled_train_step_fn(
10571057
options = infer_xla_performance_flags(
10581058
mesh_shape=cfg.mesh_shape, mesh_axis_names=cfg.mesh_axis_names, device_kind=device_kind
10591059
)
1060+
logging.log_first_n(logging.INFO, "Compiler options: %s", 1, options)
10601061
if not with_xsc:
10611062
self._maybe_record_event(
10621063
measurement.Event.START_CUSTOM_BADPUT_EVENT,

0 commit comments

Comments
 (0)