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

Fix CI failure with NumPy 1.25 & 1.26 #7946

Closed
kmaehashi opened this issue Oct 19, 2023 · 4 comments · Fixed by #7948
Closed

Fix CI failure with NumPy 1.25 & 1.26 #7946

kmaehashi opened this issue Oct 19, 2023 · 4 comments · Fixed by #7948
Assignees
Labels

Comments

@kmaehashi
Copy link
Member

Currently we are seeing test failures in NumPy 1.25/1.26 CI:
https://ci.preferred.jp/cupy.linux.cuda122/146077/#L23527

FAILED cupy_tests/creation_tests/test_ranges.py::TestRanges::test_logspace_array_start_stop_axis1

It seems logspace behavior has been changed in NumPy 1.25:

Reproducer:

import numpy as xp
start = xp.array([0, 2], dtype=xp.float16)
stop = xp.array([2, 0], dtype=xp.float16)
out = xp.logspace(start, stop, num=5, dtype=xp.float32, axis=1)

Output:

NumPy 1.24.4 or earlier:
[[  1.          3.1621094  10.         31.625     100.       ]
 [100.         31.625      10.          3.1621094   1.       ]]

NumPy 1.25 or 1.26:
[[  1.          3.1622777  10.         31.622776  100.       ]
 [100.         31.622776   10.          3.1622777   1.       ]]

I guess this PR is the cause of this difference.

https://github.com/numpy/numpy/pull/23275/files#diff-3b77932e973cdefc77a3face1640194019db54dc9c39b19c81027966dedce418R290

cc/ @seberg

@seberg
Copy link
Contributor

seberg commented Oct 19, 2023

Thanks for the ping, this is indeed a bug in that PR.

@kmaehashi
Copy link
Member Author

Thanks for your quick response! I'll skip the test in CuPy for now.

kmaehashi added a commit to kmaehashi/cupy that referenced this issue Oct 19, 2023
@kmaehashi kmaehashi self-assigned this Oct 20, 2023
emcastillo pushed a commit that referenced this issue Oct 20, 2023
skip logspace test in NumPy 1.25 & 1.26 (#7946)
chainer-ci pushed a commit to chainer-ci/cupy that referenced this issue Oct 20, 2023
kmaehashi added a commit that referenced this issue Oct 21, 2023
[backport] Skip logspace test in NumPy 1.25 & 1.26 (#7946)
@mhvk
Copy link

mhvk commented Mar 3, 2024

Should be fixed by numpy/numpy#25919

@kmaehashi
Copy link
Member Author

Thanks for letting us know, @mhvk!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants