Skip to content

Commit

Permalink
Enable megacore_dense by default (#5520) (#5531)
Browse files Browse the repository at this point in the history
Summary:
This change enables megacore_dense by default to allow asynchorous cc
ops especailly for GSPMD.

Test Plan:
CI

Co-authored-by: Jiewen Tan <jwtan@google.com>
  • Loading branch information
2 people authored and will-cromar committed Sep 14, 2023
1 parent 9c62357 commit 2d7e92f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion torch_xla/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def _setup_default_env():
_set_missing_env('TPU_ML_PLATFORM', 'PyTorch/XLA')
if server_is_alive():
_set_missing_env('XRT_START_LOCAL_SERVER', '0')
_set_missing_env('TPU_MEGACORE', 'megacore_dense')


_fd, _tmp_fname = -1, ''
Expand Down Expand Up @@ -170,4 +171,4 @@ def _init_xla_lazy_backend():
# TODO @wonjoo come up with a long term fix in Dynamo.
torch._dynamo.config.automatic_dynamic_shapes = False

from .stablehlo import save_as_stablehlo, save_torch_model_as_stablehlo
from .stablehlo import save_as_stablehlo, save_torch_model_as_stablehlo

0 comments on commit 2d7e92f

Please sign in to comment.