TST: make test_device_to_device resilient on a no_x64 device - #456
Merged
Conversation
In `-strict`, the "no_x64" device does not support int64, which is a default on the default device. Thus just use int32 explicitly, which is supported everywhere.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates a portability-focused test to avoid relying on the default integer dtype, which can be int64 on some backends/devices (notably array_api_strict’s "no_x64" device). By explicitly choosing int32, the test should behave consistently across devices that do not support 64-bit integers.
Changes:
- Set an explicit
dtype=xp.int32when creating the initial array intest_device_to_device.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
lucascolley
approved these changes
Jul 28, 2026
jax errors out otherwise, says taht only 2025.12 is supported.
ev-br
force-pushed
the
fix_test_device_to_device
branch
from
July 28, 2026 13:17
0ce549a to
6ae6b46
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Observed in gh-454:
The culprit is that in
-strict, the "no_x64" device does not support int64, which is a default on the default device. Thus just use int32 explicitly, which is supported everywhere.EDIT: while at it, skip testing
array_namespacewith api_version=2024.12 and jax.numpy : otherwise jax barfsthat only 2025.12 is supported on python 3.13 and 3.14.