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

Add default compiler options for v6e #887

Merged
merged 4 commits into from
Dec 12, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
use union
  • Loading branch information
samos123 committed Dec 12, 2024
commit 048180f00b294d232ebb87a6cb6d813c7c2977d9
4 changes: 2 additions & 2 deletions axlearn/common/compiler_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def default_xla_options(
if backend != "tpu":
raise NotImplementedError(backend)
version = infer_tpu_version(infer_tpu_type(instance_type))
options: Dict[str, int | str | bool] = dict(
options: Dict[str, Union[int, str, bool]] = dict(
xla_tpu_spmd_rng_bit_generator_unsafe=True, # SPMD partition-aware RngBitGenerator.
xla_tpu_enable_latency_hiding_scheduler="true", # Try to schedule ops efficiently.
xla_tpu_perform_spmd_cse_prevention="false",
Expand Down Expand Up @@ -130,7 +130,7 @@ def default_xla_options(
return options


def xla_flags_from_options(xla_options: dict[str, Union[str, bool]]) -> str:
def xla_flags_from_options(xla_options: dict[str, Union[str, bool, int]]) -> str:
"""Convert an XLA options dict suitable for
`jitted_fn.lower(...).compile(compiler_options=xla_options)`
to XLA flags suitable for the `XLA_FLAGS` environment variable.
Expand Down