Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 7 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,13 @@ dask-core = ">=2025.12.0" # No distributed, tornado, etc.
sparse = ">=0.17.0"

[tool.pixi.feature.backends.target.linux-64.dependencies]
# On CPU use >=0.7.0
# On GPU, use 0.6.0 (0.6.2 and 0.7.0 both segfault); see jaxlib pin below.
jax = ">=0.6.0"
jax = ">=0.7.2"

[tool.pixi.feature.backends.target.osx-64.dependencies]
jax = ">=0.6.0"
jax = ">=0.7.2"

[tool.pixi.feature.backends.target.osx-arm64.dependencies]
jax = ">=0.6.0"
jax = ">=0.7.2"

[tool.pixi.feature.backends.target.win-64.dependencies]
# jax = "*" # unavailable
Expand All @@ -175,23 +173,17 @@ jax = ">=0.6.0"
[tool.pixi.feature.cuda-backends]
system-requirements = { cuda = "12" }

[tool.pixi.feature.cuda-backends.target.linux-64.dependencies]
[tool.pixi.feature.cuda-backends.target.linux.dependencies]
cupy = ">=13.6.0"
# JAX 0.6.2 and 0.7.0 segfault on CUDA
jaxlib = { version = ">=0.6.0,!=0.6.2,!=0.7.0", build = "cuda12*" }
jaxlib = { version = ">=0.7.2", build = "cuda12*" }
pytorch = { version = ">=2.9.1", build = "cuda12*" }

[tool.pixi.feature.cuda-backends.target.osx-64.dependencies]
[tool.pixi.feature.cuda-backends.target.osx.dependencies]
# cupy = "*" # unavailable
# jaxlib = { version = "*", build = "cuda12*" } # unavailable
# pytorch = { version = "*", build = "cuda12*" } # unavailable

[tool.pixi.feature.cuda-backends.target.osx-arm64.dependencies]
# cupy = "*" # unavailable
# jaxlib = { version = "*", build = "cuda12*" } # unavailable
# pytorch = { version = "*", build = "cuda12*" } # unavailable

[tool.pixi.feature.cuda-backends.target.win-64.dependencies]
[tool.pixi.feature.cuda-backends.target.win.dependencies]
cupy = ">=13.6.0"
# jaxlib = { version = "*", build = "cuda12*" } # unavailable
pytorch = { version = ">=2.9.1", build = "cuda12*" }
Expand Down
5 changes: 3 additions & 2 deletions tests/test_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ def test_complex(self, xp: ModuleType):
expect = xp.asarray([[1.0, -1.0j], [1.0j, 1.0]], dtype=xp.complex128)
xp_assert_close(actual, expect)

@pytest.mark.xfail_xp_backend(Backend.JAX_GPU, reason="jax#32296")
@pytest.mark.xfail_xp_backend(Backend.JAX, reason="jax#32296")
@pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="sparse#877")
def test_empty(self, xp: ModuleType):
Expand Down Expand Up @@ -989,14 +990,14 @@ def test_device(self, xp: ModuleType, device: Device, equal_nan: bool):
assert get_device(res) == device

def test_array_on_device_with_scalar(self, xp: ModuleType, device: Device):
a = xp.asarray([0.01, 0.5, 0.8, 0.9, 1.00001], device=device)
a = xp.asarray([0.01, 0.5, 0.8, 0.9, 1.00001], device=device, dtype=xp.float64)
b = 1
res = isclose(a, b)
assert get_device(res) == device
xp_assert_equal(res, xp.asarray([False, False, False, False, True]))

a = 0.1
b = xp.asarray([0.01, 0.5, 0.8, 0.9, 0.100001], device=device)
b = xp.asarray([0.01, 0.5, 0.8, 0.9, 0.100001], device=device, dtype=xp.float64)
res = isclose(a, b)
assert get_device(res) == device
xp_assert_equal(res, xp.asarray([False, False, False, False, True]))
Expand Down