Skip to content

s/torch_xla2/torchax #9353

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

Merged
merged 1 commit into from
Jun 28, 2025
Merged
Changes from all commits
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
16 changes: 8 additions & 8 deletions docs/source/features/stablehlo.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ for more details on how to use the MLIR code generated from it.
from torch.export import export
import torchvision
import torch
import torch_xla2 as tx
import torch_xla2.export
import torchax as tx
import torchax.export
import jax
import jax.numpy as jnp

Expand Down Expand Up @@ -111,10 +111,10 @@ import unittest
import torch
import torch.nn.functional as F
from torch.library import Library, impl, impl_abstract
import torch_xla2
import torch_xla2.export
from torch_xla2.ops import jaten
from torch_xla2.ops import jlibrary
import torchax
import torchax.export
from torchax.ops import jaten
from torchax.ops import jlibrary


# Create a `mylib` library which has a basic SDPA op.
Expand Down Expand Up @@ -163,7 +163,7 @@ class LibraryTest(unittest.TestCase):

def setUp(self):
torch.manual_seed(0)
torch_xla2.default_env().config.use_torch_native_for_cpu_tensor = False
torchax.default_env().config.use_torch_native_for_cpu_tensor = False

def test_basic_sdpa_library(self):

Expand All @@ -179,7 +179,7 @@ class LibraryTest(unittest.TestCase):
args = (arg, arg, arg, )

exported = torch.export.export(model, args=args)
stablehlo = torch_xla2.export.exported_program_to_stablehlo(exported)
stablehlo = torchax.export.exported_program_to_stablehlo(exported)
module_str = str(stablehlo.mlir_module())

## TODO Update this machinery from producing function calls to producing
Expand Down