8000 TST: fix cupy `to_device` test on multiple devices by crusaderky · Pull Request #326 · data-apis/array-api-compat · GitHub
[go: up one dir, main page]

Skip to content

TST: fix cupy to_device test on multiple devices #326

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 4 commits into from
May 15, 2025

Conversation

crusaderky
Copy link
Contributor

Fix to_device test for cupy when there are multiple devices.
UNTESTED, as I don't have multiple GPUs to try this on.
Partially fixes #324.

@Copilot Copilot AI review requested due to automatic review settings May 15, 2025 08:02
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the cupy to_device test so that it runs correctly on multiple devices. The key changes include replacing direct stream instantiation with lambda functions to lazily create stream objects within the device context and updating the loop variable name to reflect its callable nature.

Comments suppressed due to low confidence (1)

tests/test_cupy.py:20

  • [nitpick] Consider renaming 'stream_gen' to 'stream_factory' to better reflect its purpose as a callable that returns a new stream instance.
for stream_gen in streams:

@ev-br
Copy link
Member
ev-br commented May 15, 2025

Thanks. I'll retest it later today.
NB if you need a multi-gpu setup, I am using the qgpu3 QS machine

@ev-br
Copy link
Member
ev-br commented May 15, 2025

Actually, gave it a spin now:

$ ARRAY_API_TESTS_MODULE=array_api_compat.cupy pytest tests/test_cupy.py -v
=========================================================================================== test session starts ===========================================================================================
platform linux -- Python 3.13.3, pytest-8.3.5, pluggy-1.5.0 -- /home/ev-br/.conda/envs/scipy-dev2/bin/python3.13
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase(PosixPath('/home/ev-br/repos/array-api-compat/.hypothesis/examples'))
rootdir: /home/ev-br/repos/array-api-compat
configfile: pyproject.toml
plugins: hypothesis-6.131.15, timeout-2.4.0, anyio-4.9.0, xdist-3.6.1, cov-6.1.1
collected 5 items                                                                                                                                                                                         

tests/test_cupy.py::test_to_device_with_stream[<lambda>0] PASSED                                                                                                                                    [ 20%]
tests/test_cupy.py::test_to_device_with_stream[<lambda>1] PASSED                                                                                                                                    [ 40%]
tests/test_cupy.py::test_to_device_with_stream[<lambda>2] PASSED                                                                                                                                    [ 60%]
tests/test_cupy.py::test_to_device_with_stream[<lambda>3] PASSED                                                                                                                                    [ 80%]
tests/test_cupy.py::test_to_device_with_stream[<lambda>4] Fatal Python error: Segmentation fault

Current thread 0x000070e6a3e7b740 (most recent call first):
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/cupy/_creation/from_data.py", line 88 in asarray
  File "/home/ev-br/repos/array-api-compat/array_api_compat/common/_helpers.py", line 799 in _cupy_to_device
  File "/home/ev-br/repos/array-api-compat/array_api_compat/common/_helpers.py", line 870 in to_device
  File "/home/ev-br/repos/array-api-compat/tests/test_cupy.py", line 29 in test_to_device_with_stream
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/_pytest/python.py", line 159 in pytest_pyfunc_call
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/_pytest/python.py", line 1627 in runtest
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/_pytest/runner.py", line 174 in pytest_runtest_call
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/_pytest/runner.py", line 242 in <lambda>
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/_pytest/runner.py", line 341 in from_call
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/_pytest/runner.py", line 241 in call_and_report
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/_pytest/runner.py", line 132 in runtestprotocol
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/_pytest/runner.py", line 113 in pytest_runtest_protocol
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/_pytest/main.py", line 362 in pytest_runtestloop
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/_pytest/main.py", line 337 in _main
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/_pytest/main.py", line 283 in wrap_session
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/_pytest/main.py", line 330 in pytest_cmdline_main
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/_pytest/config/__init__.py", line 175 in main
  File "/home/ev-br/.conda/envs/scipy-dev2/lib/python3.13/site-packages/_pytest/config/__init__.py", line 201 in console_main
  File "/home/ev-br/.conda/envs/scipy-dev2/bin/pytest", line 10 in <module>

Extension modules: numpy._core._multiarray_umath, numpy.linalg._umath_linalg, cupy_backends.cuda._softlink, cupy_backends.cuda.api._runtime_enum, cupy_backends.cuda.api.runtime, cupy._util, cupy.cuda.device, fastrlock.rlock, cupy.cuda.memory_hook, cupy_backends.cuda.stream, cupy.cuda.graph, cupy.cuda.stream, cupy_backends.cuda.api._driver_enum, cupy_backends.cuda.api.driver, cupy.cuda.memory, cupy._core.internal, cupy._core._carray, cupy.cuda.texture, cupy.cuda.function, cupy_backends.cuda.libs.nvrtc, cupy.cuda.pinned_memory, cupy.cuda.common, cupy.cuda.cub, cupy_backends.cuda.libs.nvtx, cupy.cuda.thrust, cupy._core._dtype, cupy._core._scalar, cupy._core._accelerator, cupy._core._memory_range, cupy._core._fusion_thread_local, cupy._core._kernel, cupy._core._routines_manipulation, cupy._core._routines_binary, cupy._core._optimize_config, cupy._core._cub_reduction, cupy._core._reduction, cupy._core._routines_math, cupy._core._routines_indexing, cupy._core._routines_linalg, cupy._core._routines_logic, cupy._core._routines_sorting, cupy._core._routines_statistics, cupy._core.dlpack, cupy._core.flags, cupy._core.core, cupy._core._fusion_variable, cupy._core._fusion_trace, cupy._core._fusion_kernel, cupy._core.new_fusion, cupy._core.fusion, cupy._core.raw, cython.cimports.libc.math, scipy._lib._ccallback_c, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, scipy.sparse._sparsetools, _csparsetools, scipy.sparse._csparsetools, scipy.linalg._fblas, scipy.linalg._flapack, scipy.linalg.cython_lapack, scipy.linalg._cythonized_array_utils, scipy.linalg._solve_toeplitz, scipy.linalg._decomp_lu_cython, scipy.linalg._matfuncs_sqrtm_triu, scipy.linalg._matfuncs_expm, scipy.linalg._linalg_pythran, scipy.linalg.cython_blas, scipy.linalg._decomp_update, scipy.sparse.linalg._dsolve._superlu, scipy.sparse.linalg._eigen.arpack._arpack, scipy.sparse.linalg._propack._spropack, scipy.sparse.linalg._propack._dpropack, scipy.sparse.linalg._propack._cpropack, scipy.sparse.linalg._propack._zpropack, scipy.sparse.csgraph._tools, scipy.sparse.csgraph._shortest_path, scipy.sparse.csgraph._traversal, scipy.sparse.csgraph._min_spanning_tree, scipy.sparse.csgraph._flow, scipy.sparse.csgraph._matching, scipy.sparse.csgraph._reordering, cupy.fft._cache, cupy.fft._callback, cupy.random._bit_generator, scipy._lib._uarray._uarray, scipy.special._ufuncs_cxx, scipy.special._ufuncs, scipy.special._specfun, scipy.special._comb, scipy.special._ellip_harm_2, cupy.lib._polynomial (total: 99)
Segmentation fault (core dumped)

@crusaderky
Copy link
Contributor Author

@ev-br please try now

@ev-br
Copy link
Member
ev-br commented May 15, 2025
$ ARRAY_API_TESTS_MODULE=array_api_compat.cupy pytest tests/ -v
=========================================================================================== test session starts ===========================================================================================
platform linux -- Python 3.11.0, pytest-8.3.4, pluggy-1.5.0 -- /home/ev-br/.conda/envs/array-api/bin/python3.11
cachedir: .pytest_cache
metadata: {'Python': '3.11.0', 'Platform': 'Linux-6.8.0-51-generic-x86_64-with-glibc2.39', 'Packages': {'pytest': '8.3.4', 'pluggy': '1.5.0'}, 'Plugins': {'metadata': '3.1.1', 'json-report': '1.5.0', 'hypothesis': '6.127.2'}}
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase(PosixPath('/home/ev-br/repos/array-api-compat/.hypothesis/examples'))
rootdir: /home/ev-br/repos/array-api-compat
configfile: pyproject.toml
plugins: metadata-3.1.1, json-report-1.5.0, hypothesis-6.127.2
collected 486 items                                                                                                                                                                                       

tests/test_all.py::test_all[common] PASSED                                                                                                                                                          [  0%]
tests/test_all.py::test_all[numpy] PASSED                                                                                                                                                           [  0%]
tests/test_all.py::test_all[cupy] PASSED                                                                                                                                                            [  0%]
tests/test_all.py::test_all[torch] PASSED                                                                                                                                                           [  0%]
tests/test_all.py::test_all[dask.array] PASSED                                                                                                                                                      [  1%]
tests/test_array_namespace.py::test_array_namespace[numpy-None-True] PASSED                                                                                                                         [  1%]
tests/test_array_namespace.py::test_array_namespace[numpy-None-False] PASSED                                                                                                                        [  1%]
tests/test_array_namespace.py::test_array_namespace[numpy-None-None] PASSED                                                                                                                         [  1%]
tests/test_array_namespace.py::test_array_namespace[numpy-2021.12-True] PASSED                                                                                                                      [  1%]
tests/test_array_namespace.py::test_array_namespace[numpy-2021.12-False] PASSED                                                                                                                     [  2%]
tests/test_array_namespace.py::test_array_namespace[numpy-2021.12-None] PASSED                                                                                                                      [  2%]
tests/test_array_namespace.py::test_array_namespace[numpy-2022.12-True] PASSED                                                                                                                      [  2%]
tests/test_array_namespace.py::test_array_namespace[numpy-2022.12-False] PASSED                                                                                                                     [  2%]
tests/test_array_namespace.py::test_array_namespace[numpy-2022.12-None] PASSED                                                                                                                      [  2%]
tests/test_array_namespace.py::test_array_namespace[numpy-2023.12-True] PASSED                                                                                                                      [  3%]
tests/test_array_namespace.py::test_array_namespace[numpy-2023.12-False] PASSED                                                                                                                     [  3%]
tests/test_array_namespace.py::test_array_namespace[numpy-2023.12-None] PASSED                                                                                                                      [  3%]
tests/test_array_namespace.py::test_array_namespace[cupy-None-True] PASSED                                                                                                                          [  3%]
tests/test_array_namespace.py::test_array_namespace[cupy-None-False] PASSED                                                                                                                         [  3%]
tests/test_array_namespace.py::test_array_namespace[cupy-None-None] PASSED                                                                                                                          [  4%]
tests/test_array_namespace.py::test_array_namespace[cupy-2021.12-True] PASSED                                                                                                                       [  4%]
tests/test_array_namespace.py::test_array_namespace[cupy-2021.12-False] PASSED                                                                                                                      [  4%]
tests/test_array_namespace.py::test_array_namespace[cupy-2021.12-None] PASSED                                                                                                                       [  4%]
tests/test_array_namespace.py::test_array_namespace[cupy-2022.12-True] PASSED                                                                                                                       [  4%]
tests/test_array_namespace.py::test_array_namespace[cupy-2022.12-False] PASSED                                                                                                                      [  5%]
tests/test_array_namespace.py::test_array_namespace[cupy-2022.12-None] PASSED                                                                                                                       [  5%]
tests/test_array_namespace.py::test_array_namespace[cupy-2023.12-True] PASSED                                                                                                                       [  5%]
tests/test_array_namespace.py::test_array_namespace[cupy-2023.12-False] PASSED                                                                                                                      [  5%]
tests/test_array_namespace.py::test_array_namespace[cupy-2023.12-None] PASSED                                                                                                                       [  5%]
tests/test_array_namespace.py::test_array_namespace[torch-None-True] PASSED                                                                                                                         [  6%]
tests/test_array_namespace.py::test_array_namespace[torch-None-False] PASSED                                                                                                                        [  6%]
tests/test_array_namespace.py::test_array_namespace[torch-None-None] PASSED                                                                                                                         [  6%]
tests/test_array_namespace.py::test_array_namespace[torch-2021.12-True] PASSED                                                                                                                      [  6%]
tests/test_array_namespace.py::test_array_namespace[torch-2021.12-False] PASSED                                                                                                                     [  6%]
tests/test_array_namespace.py::test_array_namespace[torch-2021.12-None] PASSED                                                                                                                      [  7%]
tests/test_array_namespace.py::test_array_namespace[torch-2022.12-True] PASSED                                                                                                                      [  7%]
tests/test_array_namespace.py::test_array_namespace[torch-2022.12-False] PASSED                                                                                                                     [  7%]
tests/test_array_namespace.py::test_array_namespace[torch-2022.12-None] PASSED                                                                                                                      [  7%]
tests/test_array_namespace.py::test_array_namespace[torch-2023.12-True] PASSED                                                                                                                      [  8%]
tests/test_array_namespace.py::test_array_namespace[torch-2023.12-False] PASSED                                                                                                                     [  8%]
tests/test_array_namespace.py::test_array_namespace[torch-2023.12-None] PASSED                                                                                                                      [  8%]
tests/test_array_namespace.py::test_array_namespace[dask.array-None-True] PASSED                                                                                                                    [  8%]
tests/test_array_namespace.py::test_array_namespace[dask.array-None-False] PASSED                                                                                                                   [  8%]
tests/test_array_namespace.py::test_array_namespace[dask.array-None-None] PASSED                                                                                                                    [  9%]
tests/test_array_namespace.py::test_array_namespace[dask.array-2021.12-True] PASSED                                                                                                                 [  9%]
tests/test_array_namespace.py::test_array_namespace[dask.array-2021.12-False] PASSED                                                                                                                [  9%]
tests/test_array_namespace.py::test_array_namespace[dask.array-2021.12-None] PASSED                                                                                                                 [  9%]
tests/test_array_namespace.py::test_array_namespace[dask.array-2022.12-True] PASSED                                                                                                                 [  9%]
tests/test_array_namespace.py::test_array_namespace[dask.array-2022.12-False] PASSED                                                                                                                [ 10%]
tests/test_array_namespace.py::test_array_namespace[dask.array-2022.12-None] PASSED                                                                                                                 [ 10%]
tests/test_array_namespace.py::test_array_namespace[dask.array-2023.12-True] PASSED                                                                                                                 [ 10%]
tests/test_array_namespace.py::test_array_namespace[dask.array-2023.12-False] PASSED                                                                                                                [ 10%]
tests/test_array_namespace.py::test_array_namespace[dask.array-2023.12-None] PASSED                                                                                                                 [ 10%]
tests/test_array_namespace.py::test_array_namespace[array_api_strict-None-True] PASSED                                                                                                              [ 11%]
tests/test_array_namespace.py::test_array_namespace[array_api_strict-None-False] PASSED                                                                                                             [ 11%]
tests/test_array_namespace.py::test_array_namespace[array_api_strict-None-None] PASSED                                                                                                              [ 11%]
tests/test_array_namespace.py::test_array_namespace[array_api_strict-2021.12-True] PASSED                                                                                                           [ 11%]
tests/test_array_namespace.py::test_array_namespace[array_api_strict-2021.12-False] PASSED                                                                                                          [ 11%]
tests/test_array_namespace.py::test_array_namespace[array_api_strict-2021.12-None] PASSED                                                                                                           [ 12%]
tests/test_array_namespace.py::test_array_namespace[array_api_strict-2022.12-True] PASSED                                                                                                           [ 12%]
tests/test_array_namespace.py::test_array_namespace[array_api_strict-2022.12-False] PASSED                                                                                                          [ 12%]
tests/test_array_namespace.py::test_array_namespace[array_api_strict-2022.12-None] PASSED                                                                                                           [ 12%]
tests/test_array_namespace.py::test_array_namespace[array_api_strict-2023.12-True] PASSED                                                                                                           [ 12%]
tests/test_array_namespace.py::test_array_namespace[array_api_strict-2023.12-False] PASSED                                                                                                          [ 13%]
tests/test_array_namespace.py::test_array_namespace[array_api_strict-2023.12-None] PASSED                                                                                                           [ 13%]
tests/test_array_namespace.py::test_array_namespace[jax.numpy-None-True] PASSED                                                                                                                     [ 13%]
tests/test_array_namespace.py::test_array_namespace[jax.numpy-None-False] PASSED                                                                                                                    [ 13%]
tests/test_array_namespace.py::test_array_namespace[jax.numpy-None-None] PASSED                                                                                                                     [ 13%]
tests/test_array_namespace.py::test_array_namespace[jax.numpy-2021.12-True] PASSED                                                                                                                  [ 14%]
tests/test_array_namespace.py::test_array_namespace[jax.numpy-2021.12-False] PASSED                                                                                                                 [ 14%]
tests/test_array_namespace.py::test_array_namespace[jax.numpy-2021.12-None] PASSED                                                                                                                  [ 14%]
tests/test_array_namespace.py::test_array_namespace[jax.numpy-2022.12-True] PASSED                                                                                                                  [ 14%]
tests/test_array_namespace.py::test_array_namespace[jax.numpy-2022.12-False] PASSED                                                                                                                 [ 15%]
tests/test_array_namespace.py::test_array_namespace[jax.numpy-2022.12-None] PASSED                                                                                                                  [ 15%]
tests/test_array_namespace.py::test_array_namespace[jax.numpy-2023.12-True] PASSED                                                                                                                  [ 15%]
tests/test_array_namespace.py::test_array_namespace[jax.numpy-2023.12-False] PASSED                                                                                                                 [ 15%]
tests/test_array_namespace.py::test_array_namespace[jax.numpy-2023.12-None] PASSED                                                                                                                  [ 15%]
tests/test_array_namespace.py::test_array_namespace[ndonnx-None-True] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                 [ 16%]
tests/test_array_namespace.py::test_array_namespace[ndonnx-None-False] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                [ 16%]
tests/test_array_namespace.py::test_array_namespace[ndonnx-None-None] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                 [ 16%]
tests/test_array_namespace.py::test_array_namespace[ndonnx-2021.12-True] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                              [ 16%]
tests/test_array_namespace.py::test_array_namespace[ndonnx-2021.12-False] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                             [ 16%]
tests/test_array_namespace.py::test_array_namespace[ndonnx-2021.12-None] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                              [ 17%]
tests/test_array_namespace.py::test_array_namespace[ndonnx-2022.12-True] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                              [ 17%]
tests/test_array_namespace.py::test_array_namespace[ndonnx-2022.12-False] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                             [ 17%]
tests/test_array_namespace.py::test_array_namespace[ndonnx-2022.12-None] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                              [ 17%]
tests/test_array_namespace.py::test_array_namespace[ndonnx-2023.12-True] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                              [ 17%]
tests/test_array_namespace.py::test_array_namespace[ndonnx-2023.12-False] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                             [ 18%]
tests/test_array_namespace.py::test_array_namespace[ndonnx-2023.12-None] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                              [ 18%]
tests/test_array_namespace.py::test_array_namespace[sparse-None-True] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                            [ 18%]
tests/test_array_namespace.py::test_array_namespace[sparse-None-False] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                           [ 18%]
tests/test_array_namespace.py::test_array_namespace[sparse-None-None] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                            [ 18%]
tests/test_array_namespace.py::test_array_namespace[sparse-2021.12-True] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                         [ 19%]
tests/test_array_namespace.py::test_array_namespace[sparse-2021.12-False] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                        [ 19%]
tests/test_array_namespace.py::test_array_namespace[sparse-2021.12-None] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                         [ 19%]
tests/test_array_namespace.py::test_array_namespace[sparse-2022.12-True] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                         [ 19%]
tests/test_array_namespace.py::test_array_namespace[sparse-2022.12-False] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                        [ 19%]
tests/test_array_namespace.py::test_array_namespace[sparse-2022.12-None] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                         [ 20%]
tests/test_array_namespace.py::test_array_namespace[sparse-2023.12-True] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                         [ 20%]
tests/test_array_namespace.py::test_array_namespace[sparse-2023.12-False] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                        [ 20%]
tests/test_array_namespace.py::test_array_namespace[sparse-2023.12-None] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                         [ 20%]
tests/test_array_namespace.py::test_jax_zero_gradient PASSED                                                                                                                                        [ 20%]
tests/test_array_namespace.py::test_array_namespace_errors PASSED                                                                                                                                   [ 21%]
tests/test_array_namespace.py::test_array_namespace_errors_torch PASSED                                                                                                                             [ 21%]
tests/test_array_namespace.py::test_api_version_torch PASSED                                                                                                                                        [ 21%]
tests/test_array_namespace.py::test_get_namespace PASSED                                                                                                                                            [ 21%]
tests/test_array_namespace.py::test_python_scalars PASSED                                                                                                                                           [ 22%]
tests/test_common.py::test_is_xp_array[is_numpy_array-numpy] PASSED                                                                                                                                 [ 22%]
tests/test_common.py::test_is_xp_array[is_numpy_array-cupy] PASSED                                                                                                                                  [ 22%]
tests/test_common.py::test_is_xp_array[is_numpy_array-torch] PASSED                                                                                                                                 [ 22%]
tests/test_common.py::test_is_xp_array[is_numpy_array-dask.array] PASSED                                                                                                                            [ 22%]
tests/test_common.py::test_is_xp_array[is_numpy_array-jax.numpy] PASSED                                                                                                                             [ 23%]
tests/test_common.py::test_is_xp_array[is_numpy_array-sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                                    [ 23%]
tests/test_common.py::test_is_xp_array[is_numpy_array-ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                         [ 23%]
tests/test_common.py::test_is_xp_array[is_cupy_array-numpy] PASSED                                                                                                                                  [ 23%]
tests/test_common.py::test_is_xp_array[is_cupy_array-cupy] PASSED                                                                                                                                   [ 23%]
tests/test_common.py::test_is_xp_array[is_cupy_array-torch] PASSED                                                                                                                                  [ 24%]
tests/test_common.py::test_is_xp_array[is_cupy_array-dask.array] PASSED                                                                                                                             [ 24%]
tests/test_common.py::test_is_xp_array[is_cupy_array-jax.numpy] PASSED                                                                                                                              [ 24%]
tests/test_common.py::test_is_xp_array[is_cupy_array-sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                                     [ 24%]
tests/test_common.py::test_is_xp_array[is_cupy_array-ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                          [ 24%]
tests/test_common.py::test_is_xp_array[is_torch_array-numpy] PASSED                                                                                                                                 [ 25%]
tests/test_common.py::test_is_xp_array[is_torch_array-cupy] PASSED                                                                                                                                  [ 25%]
tests/test_common.py::test_is_xp_array[is_torch_array-torch] PASSED                                                                                                                                 [ 25%]
tests/test_common.py::test_is_xp_array[is_torch_array-dask.array] PASSED                                                                                                                            [ 25%]
tests/test_common.py::test_is_xp_array[is_torch_array-jax.numpy] PASSED                                                                                                                             [ 25%]
tests/test_common.py::test_is_xp_array[is_torch_array-sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                                    [ 26%]
tests/test_common.py::test_is_xp_array[is_torch_array-ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                         [ 26%]
tests/test_common.py::test_is_xp_array[is_dask_array-numpy] PASSED                                                                                                                                  [ 26%]
tests/test_common.py::test_is_xp_array[is_dask_array-cupy] PASSED                                                                                                                                   [ 26%]
tests/test_common.py::test_is_xp_array[is_dask_array-torch] PASSED                                                                                                                                  [ 26%]
tests/test_common.py::test_is_xp_array[is_dask_array-dask.array] PASSED                                                                                                                             [ 27%]
tests/test_common.py::test_is_xp_array[is_dask_array-jax.numpy] PASSED                                                                                                                              [ 27%]
tests/test_common.py::test_is_xp_array[is_dask_array-sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                                     [ 27%]
tests/test_common.py::test_is_xp_array[is_dask_array-ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                          [ 27%]
tests/test_common.py::test_is_xp_array[is_jax_array-numpy] PASSED                                                                                                                                   [ 27%]
tests/test_common.py::test_is_xp_array[is_jax_array-cupy] PASSED                                                                                                                                    [ 28%]
tests/test_common.py::test_is_xp_array[is_jax_array-torch] PASSED                                                                                                                                   [ 28%]
tests/test_common.py::test_is_xp_array[is_jax_array-dask.array] PASSED                                                                                                                              [ 28%]
tests/test_common.py::test_is_xp_array[is_jax_array-jax.numpy] PASSED                                                                                                                               [ 28%]
tests/test_common.py::test_is_xp_array[is_jax_array-sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                                      [ 29%]
tests/test_common.py::test_is_xp_array[is_jax_array-ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                           [ 29%]
tests/test_common.py::test_is_xp_array[is_pydata_sparse_array-numpy] PASSED                                                                                                                         [ 29%]
tests/test_common.py::test_is_xp_array[is_pydata_sparse_array-cupy] PASSED                                                                                                                          [ 29%]
tests/test_common.py::test_is_xp_array[is_pydata_sparse_array-torch] PASSED                                                                                                                         [ 29%]
tests/test_common.py::test_is_xp_array[is_pydata_sparse_array-dask.array] PASSED                                                                                                                    [ 30%]
tests/test_common.py::test_is_xp_array[is_pydata_sparse_array-jax.numpy] PASSED                                                                                                                     [ 30%]
tests/test_common.py::test_is_xp_array[is_pydata_sparse_array-sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                            [ 30%]
tests/test_common.py::test_is_xp_array[is_pydata_sparse_array-ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                 [ 30%]
tests/test_common.py::test_is_xp_array[is_ndonnx_array-numpy] PASSED                                                                                                                                [ 30%]
tests/test_common.py::test_is_xp_array[is_ndonnx_array-cupy] PASSED                                                                                                                                 [ 31%]
tests/test_common.py::test_is_xp_array[is_ndonnx_array-torch] PASSED                                                                                                                                [ 31%]
tests/test_common.py::test_is_xp_array[is_ndonnx_array-dask.array] PASSED                                                                                                                           [ 31%]
tests/test_common.py::test_is_xp_array[is_ndonnx_array-jax.numpy] PASSED                                                                                                                            [ 31%]
tests/test_common.py::test_is_xp_array[is_ndonnx_array-sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                                   [ 31%]
tests/test_common.py::test_is_xp_array[is_ndonnx_array-ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                        [ 32%]
tests/test_common.py::test_is_xp_namespace[is_numpy_namespace-numpy] PASSED                                                                                                                         [ 32%]
tests/test_common.py::test_is_xp_namespace[is_numpy_namespace-cupy] PASSED                                                                                                                          [ 32%]
tests/test_common.py::test_is_xp_namespace[is_numpy_namespace-torch] PASSED                                                                                                                         [ 32%]
tests/test_common.py::test_is_xp_namespace[is_numpy_namespace-dask.array] PASSED                                                                                                                    [ 32%]
tests/test_common.py::test_is_xp_namespace[is_numpy_namespace-jax.numpy] PASSED                                                                                                                     [ 33%]
tests/test_common.py::test_is_xp_namespace[is_numpy_namespace-sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                            [ 33%]
tests/test_common.py::test_is_xp_namespace[is_numpy_namespace-array_api_strict] PASSED                                                                                                              [ 33%]
tests/test_common.py::test_is_xp_namespace[is_numpy_namespace-ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                 [ 33%]
tests/test_common.py::test_is_xp_namespace[is_cupy_namespace-numpy] PASSED                                                                                                                          [ 33%]
tests/test_common.py::test_is_xp_namespace[is_cupy_namespace-cupy] PASSED                                                                                                                           [ 34%]
tests/test_common.py::test_is_xp_namespace[is_cupy_namespace-torch] PASSED                                                                                                                          [ 34%]
tests/test_common.py::test_is_xp_namespace[is_cupy_namespace-dask.array] PASSED                                                                                                                     [ 34%]
tests/test_common.py::test_is_xp_namespace[is_cupy_namespace-jax.numpy] PASSED                                                                                                                      [ 34%]
tests/test_common.py::test_is_xp_namespace[is_cupy_namespace-sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                             [ 34%]
tests/test_common.py::test_is_xp_namespace[is_cupy_namespace-array_api_strict] PASSED                                                                                                               [ 35%]
tests/test_common.py::test_is_xp_namespace[is_cupy_namespace-ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                  [ 35%]
tests/test_common.py::test_is_xp_namespace[is_torch_namespace-numpy] PASSED                                                                                                                         [ 35%]
tests/test_common.py::test_is_xp_namespace[is_torch_namespace-cupy] PASSED                                                                                                                          [ 35%]
tests/test_common.py::test_is_xp_namespace[is_torch_namespace-torch] PASSED                                                                                                                         [ 36%]
tests/test_common.py::test_is_xp_namespace[is_torch_namespace-dask.array] PASSED                                                                                                                    [ 36%]
tests/test_common.py::test_is_xp_namespace[is_torch_namespace-jax.numpy] PASSED                                                                                                                     [ 36%]
tests/test_common.py::test_is_xp_namespace[is_torch_namespace-sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                            [ 36%]
tests/test_common.py::test_is_xp_namespace[is_torch_namespace-array_api_strict] PASSED                                                                                                              [ 36%]
tests/test_common.py::test_is_xp_namespace[is_torch_namespace-ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                 [ 37%]
tests/test_common.py::test_is_xp_namespace[is_dask_namespace-numpy] PASSED                                                                                                                          [ 37%]
tests/test_common.py::test_is_xp_namespace[is_dask_namespace-cupy] PASSED                                                                                                                           [ 37%]
tests/test_common.py::test_is_xp_namespace[is_dask_namespace-torch] PASSED                                                                                                                          [ 37%]
tests/test_common.py::test_is_xp_namespace[is_dask_namespace-dask.array] PASSED                                                                                                                     [ 37%]
tests/test_common.py::test_is_xp_namespace[is_dask_namespace-jax.numpy] PASSED                                                                                                                      [ 38%]
tests/test_common.py::test_is_xp_namespace[is_dask_namespace-sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                             [ 38%]
tests/test_common.py::test_is_xp_namespace[is_dask_namespace-array_api_strict] PASSED                                                                                                               [ 38%]
tests/test_common.py::test_is_xp_namespace[is_dask_namespace-ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                  [ 38%]
tests/test_common.py::test_is_xp_namespace[is_jax_namespace-numpy] PASSED                                                                                                                           [ 38%]
tests/test_common.py::test_is_xp_namespace[is_jax_namespace-cupy] PASSED                                                                                                                            [ 39%]
tests/test_common.py::test_is_xp_namespace[is_jax_namespace-torch] PASSED                                                                                                                           [ 39%]
tests/test_common.py::test_is_xp_namespace[is_jax_namespace-dask.array] PASSED                                                                                                                      [ 39%]
tests/test_common.py::test_is_xp_namespace[is_jax_namespace-jax.numpy] PASSED                                                                                                                       [ 39%]
tests/test_common.py::test_is_xp_namespace[is_jax_namespace-sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                              [ 39%]
tests/test_common.py::test_is_xp_namespace[is_jax_namespace-array_api_strict] PASSED                                                                                                                [ 40%]
tests/test_common.py::test_is_xp_namespace[is_jax_namespace-ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                   [ 40%]
tests/test_common.py::test_is_xp_namespace[is_pydata_sparse_namespace-numpy] PASSED                                                                                                                 [ 40%]
tests/test_common.py::test_is_xp_namespace[is_pydata_sparse_namespace-cupy] PASSED                                                                                                                  [ 40%]
tests/test_common.py::test_is_xp_namespace[is_pydata_sparse_namespace-torch] PASSED                                                                                                                 [ 40%]
tests/test_common.py::test_is_xp_namespace[is_pydata_sparse_namespace-dask.array] PASSED                                                                                                            [ 41%]
tests/test_common.py::test_is_xp_namespace[is_pydata_sparse_namespace-jax.numpy] PASSED                                                                                                             [ 41%]
tests/test_common.py::test_is_xp_namespace[is_pydata_sparse_namespace-sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                    [ 41%]
tests/test_common.py::test_is_xp_namespace[is_pydata_sparse_namespace-array_api_strict] PASSED                                                                                                      [ 41%]
tests/test_common.py::test_is_xp_namespace[is_pydata_sparse_namespace-ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                         [ 41%]
tests/test_common.py::test_is_xp_namespace[is_array_api_strict_namespace-numpy] PASSED                                                                                                              [ 42%]
tests/test_common.py::test_is_xp_namespace[is_array_api_strict_namespace-cupy] PASSED                                                                                                               [ 42%]
tests/test_common.py::test_is_xp_namespace[is_array_api_strict_namespace-torch] PASSED                                                                                                              [ 42%]
tests/test_common.py::test_is_xp_namespace[is_array_api_strict_namespace-dask.array] PASSED                                                                                                         [ 42%]
tests/test_common.py::test_is_xp_namespace[is_array_api_strict_namespace-jax.numpy] PASSED                                                                                                          [ 43%]
tests/test_common.py::test_is_xp_namespace[is_array_api_strict_namespace-sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                 [ 43%]
tests/test_common.py::test_is_xp_namespace[is_array_api_strict_namespace-array_api_strict] PASSED                                                                                                   [ 43%]
tests/test_common.py::test_is_xp_namespace[is_array_api_strict_namespace-ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                      [ 43%]
tests/test_common.py::test_is_xp_namespace[is_ndonnx_namespace-numpy] PASSED                                                                                                                        [ 43%]
tests/test_common.py::test_is_xp_namespace[is_ndonnx_namespace-cupy] PASSED                                                                                                                         [ 44%]
tests/test_common.py::test_is_xp_namespace[is_ndonnx_namespace-torch] PASSED                                                                                                                        [ 44%]
tests/test_common.py::test_is_xp_namespace[is_ndonnx_namespace-dask.array] PASSED                                                                                                                   [ 44%]
tests/test_common.py::test_is_xp_namespace[is_ndonnx_namespace-jax.numpy] PASSED                                                                                                                    [ 44%]
tests/test_common.py::test_is_xp_namespace[is_ndonnx_namespace-sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                           [ 44%]
tests/test_common.py::test_is_xp_namespace[is_ndonnx_namespace-array_api_strict] PASSED                                                                                                             [ 45%]
tests/test_common.py::test_is_xp_namespace[is_ndonnx_namespace-ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                [ 45%]
tests/test_common.py::test_xp_is_array_generics[numpy] PASSED                                                                                                                                       [ 45%]
tests/test_common.py::test_xp_is_array_generics[cupy] PASSED                                                                                                                                        [ 45%]
tests/test_common.py::test_xp_is_array_generics[torch] PASSED                                                                                                                                       [ 45%]
tests/test_common.py::test_xp_is_array_generics[dask.array] PASSED                                                                                                                                  [ 46%]
tests/test_common.py::test_xp_is_array_generics[array_api_strict] PASSED                                                                                                                            [ 46%]
tests/test_common.py::test_xp_is_array_generics[jax.numpy] PASSED                                                                                                                                   [ 46%]
tests/test_common.py::test_xp_is_array_generics[ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                               [ 46%]
tests/test_common.py::test_xp_is_array_generics[sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                                          [ 46%]
tests/test_common.py::test_is_writeable_array[numpy] PASSED                                                                                                                                         [ 47%]
tests/test_common.py::test_is_writeable_array[cupy] PASSED                                                                                                                                          [ 47%]
tests/test_common.py::test_is_writeable_array[torch] PASSED                                                                                                                                         [ 47%]
tests/test_common.py::test_is_writeable_array[dask.array] PASSED                                                                                                                                    [ 47%]
tests/test_common.py::test_is_writeable_array[array_api_strict] PASSED                                                                                                                              [ 47%]
tests/test_common.py::test_is_writeable_array[jax.numpy] PASSED                                                                                                                                     [ 48%]
tests/test_common.py::test_is_writeable_array[ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                                 [ 48%]
tests/test_common.py::test_is_writeable_array[sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                                            [ 48%]
tests/test_common.py::test_is_writeable_array_numpy PASSED                                                                                                                                          [ 48%]
tests/test_common.py::test_size[numpy] PASSED                                                                                                                                                       [ 48%]
tests/test_common.py::test_size[cupy] PASSED                                                                                                                                                        [ 49%]
tests/test_common.py::test_size[torch] PASSED                                                                                                                                                       [ 49%]
tests/test_common.py::test_size[dask.array] PASSED                                                                                                                                                  [ 49%]
tests/test_common.py::test_size[array_api_strict] PASSED                                                                                                                                            [ 49%]
tests/test_common.py::test_size[jax.numpy] PASSED                                                                                                                                                   [ 50%]
tests/test_common.py::test_size[ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                                               [ 50%]
tests/test_common.py::test_size[sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                                                          [ 50%]
tests/test_common.py::test_size_none[numpy] PASSED                                                                                                                                                  [ 50%]
tests/test_common.py::test_size_none[cupy] PASSED                                                                                                                                                   [ 50%]
tests/test_common.py::test_size_none[torch] PASSED                                                                                                                                                  [ 51%]
tests/test_common.py::test_size_none[dask.array] PASSED                                                                     
57AE
                                                                        [ 51%]
tests/test_common.py::test_size_none[array_api_strict] PASSED                                                                                                                                       [ 51%]
tests/test_common.py::test_size_none[jax.numpy] PASSED                                                                                                                                              [ 51%]
tests/test_common.py::test_size_none[ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                                          [ 51%]
tests/test_common.py::test_size_none[sparse] SKIPPED (No arange(); no indexing by sparse arrays)                                                                                                    [ 52%]
tests/test_common.py::test_is_lazy_array[numpy] PASSED                                                                                                                                              [ 52%]
tests/test_common.py::test_is_lazy_array[cupy] PASSED                                                                                                                                               [ 52%]
tests/test_common.py::test_is_lazy_array[torch] PASSED                                                                                                                                              [ 52%]
tests/test_common.py::test_is_lazy_array[dask.array] PASSED                                                                                                                                         [ 52%]
tests/test_common.py::test_is_lazy_array[array_api_strict] PASSED                                                                                                                                   [ 53%]
tests/test_common.py::test_is_lazy_array[jax.numpy] PASSED                                                                                                                                          [ 53%]
tests/test_common.py::test_is_lazy_array[ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                                      [ 53%]
tests/test_common.py::test_is_lazy_array[sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                                                 [ 53%]
tests/test_common.py::test_is_lazy_array_nan_size[shape0] PASSED                                                                                                                                    [ 53%]
tests/test_common.py::test_is_lazy_array_nan_size[shape1] PASSED                                                                                                                                    [ 54%]
tests/test_common.py::test_is_lazy_array_nan_size[shape2] PASSED                                                                                                                                    [ 54%]
tests/test_common.py::test_is_lazy_array_nan_size[shape3] PASSED                                                                                                                                    [ 54%]
tests/test_common.py::test_is_lazy_array_bool_raises[TypeError] PASSED                                                                                                                              [ 54%]
tests/test_common.py::test_is_lazy_array_bool_raises[AssertionError] PASSED                                                                                                                         [ 54%]
tests/test_common.py::test_is_array_any_object[is_numpy_array] PASSED                                                                                                                               [ 55%]
tests/test_common.py::test_is_array_any_object[is_cupy_array] PASSED                                                                                                                                [ 55%]
tests/test_common.py::test_is_array_any_object[is_torch_array] PASSED                                                                                                                               [ 55%]
tests/test_common.py::test_is_array_any_object[is_dask_array] PASSED                                                                                                                                [ 55%]
tests/test_common.py::test_is_array_any_object[is_jax_array] PASSED                                                                                                                                 [ 55%]
tests/test_common.py::test_is_array_any_object[is_pydata_sparse_array] PASSED                                                                                                                       [ 56%]
tests/test_common.py::test_is_array_any_object[is_ndonnx_array] PASSED                                                                                                                              [ 56%]
tests/test_common.py::test_is_array_any_object[is_array_api_obj] PASSED                                                                                                                             [ 56%]
tests/test_common.py::test_is_array_any_object[is_lazy_array] PASSED                                                                                                                                [ 56%]
tests/test_common.py::test_is_array_any_object[is_writeable_array] PASSED                                                                                                                           [ 56%]
tests/test_common.py::test_device_to_device[numpy] PASSED                                                                                                                                           [ 57%]
tests/test_common.py::test_device_to_device[cupy] PASSED                                                                                                                                            [ 57%]
tests/test_common.py::test_device_to_device[torch] PASSED                                                                                                                                           [ 57%]
tests/test_common.py::test_device_to_device[dask.array] PASSED                                                                                                                                      [ 57%]
tests/test_common.py::test_device_to_device[array_api_strict] PASSED                                                                                                                                [ 58%]
tests/test_common.py::test_device_to_device[jax.numpy] PASSED                                                                                                                                       [ 58%]
tests/test_common.py::test_device_to_device[ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                                   [ 58%]
tests/test_common.py::test_device_to_device[sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                                              [ 58%]
tests/test_common.py::test_to_device_host[numpy] PASSED                                                                                                                                             [ 58%]
tests/test_common.py::test_to_device_host[cupy] PASSED                                                                                                                                              [ 59%]
tests/test_common.py::test_to_device_host[torch] PASSED                                                                                                                                             [ 59%]
tests/test_common.py::test_to_device_host[dask.array] PASSED                                                                                                                                        [ 59%]
tests/test_common.py::test_asarray_cross_library[numpy-numpy] PASSED                                                                                                                                [ 59%]
tests/test_common.py::test_asarray_cross_library[numpy-cupy] PASSED                                                                                                                                 [ 59%]
tests/test_common.py::test_asarray_cross_library[numpy-torch] PASSED                                                                                                                                [ 60%]
tests/test_common.py::test_asarray_cross_library[numpy-dask.array] PASSED                                                                                                                           [ 60%]
tests/test_common.py::test_asarray_cross_library[numpy-jax.numpy] PASSED                                                                                                                            [ 60%]
tests/test_common.py::test_asarray_cross_library[numpy-sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                                   [ 60%]
tests/test_common.py::test_asarray_cross_library[numpy-ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                        [ 60%]
tests/test_common.py::test_asarray_cross_library[cupy-numpy] SKIPPED (cupy does not support implicit conversion to CPU)                                                                             [ 61%]
tests/test_common.py::test_asarray_cross_library[cupy-cupy] PASSED                                                                                                                                  [ 61%]
tests/test_common.py::test_asarray_cross_library[cupy-torch] SKIPPED (cupy does not support implicit conversion to CPU)                                                                             [ 61%]
tests/test_common.py::test_asarray_cross_library[cupy-dask.array] SKIPPED (cupy does not support implicit conversion to CPU)                                                                        [ 61%]
tests/test_common.py::test_asarray_cross_library[cupy-jax.numpy] SKIPPED (cupy does not support implicit conversion to CPU)                                                                         [ 61%]
tests/test_common.py::test_asarray_cross_library[cupy-sparse] SKIPPED (cupy does not support implicit conversion to CPU)                                                                            [ 62%]
tests/test_common.py::test_asarray_cross_library[cupy-ndonnx] SKIPPED (cupy does not support implicit conversion to CPU)                                                                            [ 62%]
tests/test_common.py::test_asarray_cross_library[torch-numpy] PASSED                                                                                                                                [ 62%]
tests/test_common.py::test_asarray_cross_library[torch-cupy] PASSED                                                                                                                                 [ 62%]
tests/test_common.py::test_asarray_cross_library[torch-torch] PASSED                                                                                                                                [ 62%]
tests/test_common.py::test_asarray_cross_library[torch-dask.array] PASSED                                                                                                                           [ 63%]
tests/test_common.py::test_asarray_cross_library[torch-jax.numpy] PASSED                                                                                                                            [ 63%]
tests/test_common.py::test_asarray_cross_library[torch-sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                                   [ 63%]
tests/test_common.py::test_asarray_cross_library[torch-ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                        [ 63%]
tests/test_common.py::test_asarray_cross_library[dask.array-numpy] PASSED                                                                                                                           [ 63%]
tests/test_common.py::test_asarray_cross_library[dask.array-cupy] PASSED                                                                                                                            [ 64%]
tests/test_common.py::test_asarray_cross_library[dask.array-torch] XFAIL (Bug in dask raising error on conversion)                                                                                  [ 64%]
tests/test_common.py::test_asarray_cross_library[dask.array-dask.array] PASSED                                                                                                                      [ 64%]
tests/test_common.py::test_asarray_cross_library[dask.array-jax.numpy] PASSED                                                                                                                       [ 64%]
tests/test_common.py::test_asarray_cross_library[dask.array-sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                              [ 65%]
tests/test_common.py::test_asarray_cross_library[dask.array-ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                   [ 65%]
tests/test_common.py::test_asarray_cross_library[jax.numpy-numpy] PASSED                                                                                                                            [ 65%]
tests/test_common.py::test_asarray_cross_library[jax.numpy-cupy] PASSED                                                                                                                             [ 65%]
tests/test_common.py::test_asarray_cross_library[jax.numpy-torch] XFAIL (casts int to float)                                                                                                        [ 65%]
tests/test_common.py::test_asarray_cross_library[jax.numpy-dask.array] PASSED                                                                                                                       [ 66%]
tests/test_common.py::test_asarray_cross_library[jax.numpy-jax.numpy] PASSED                                                                                                                        [ 66%]
tests/test_common.py::test_asarray_cross_library[jax.numpy-sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                               [ 66%]
tests/test_common.py::test_asarray_cross_library[jax.numpy-ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                    [ 66%]
tests/test_common.py::test_asarray_cross_library[sparse-numpy] SKIPPED (`sparse` does not allow implicit densification)                                                                             [ 66%]
tests/test_common.py::test_asarray_cross_library[sparse-cupy] SKIPPED (`sparse` does not allow implicit densification)                                                                              [ 67%]
tests/test_common.py::test_asarray_cross_library[sparse-torch] SKIPPED (`sparse` does not allow implicit densification)                                                                             [ 67%]
tests/test_common.py::test_asarray_cross_library[sparse-dask.array] SKIPPED (`sparse` does not allow implicit densification)                                                                        [ 67%]
tests/test_common.py::test_asarray_cross_library[sparse-jax.numpy] SKIPPED (`sparse` does not allow implicit densification)                                                                         [ 67%]
tests/test_common.py::test_asarray_cross_library[sparse-sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                                  [ 67%]
tests/test_common.py::test_asarray_cross_library[sparse-ndonnx] SKIPPED (`sparse` does not allow implicit densification)                                                                            [ 68%]
tests/test_common.py::test_asarray_cross_library[ndonnx-numpy] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                        [ 68%]
tests/test_common.py::test_asarray_cross_library[ndonnx-cupy] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                         [ 68%]
tests/test_common.py::test_asarray_cross_library[ndonnx-torch] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                        [ 68%]
tests/test_common.py::test_asarray_cross_library[ndonnx-dask.array] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                   [ 68%]
tests/test_common.py::test_asarray_cross_library[ndonnx-jax.numpy] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                    [ 69%]
tests/test_common.py::test_asarray_cross_library[ndonnx-sparse] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                       [ 69%]
tests/test_common.py::test_asarray_cross_library[ndonnx-ndonnx] SKIPPED (could not import 'ndonnx': No module named 'ndonnx')                                                                       [ 69%]
tests/test_common.py::test_asarray_copy[numpy] PASSED                                                                                                                                               [ 69%]
tests/test_common.py::test_asarray_copy[cupy] FAILED                                                                                                                                                [ 69%]
tests/test_common.py::test_asarray_copy[torch] PASSED                                                                                                                                               [ 70%]
tests/test_common.py::test_asarray_copy[dask.array] PASSED                                                                                                                                          [ 70%]
tests/test_common.py::test_clip_out[numpy] PASSED                                                                                                                                                   [ 70%]
tests/test_common.py::test_clip_out[cupy] PASSED                                                                                                                                                    [ 70%]
tests/test_common.py::test_clip_out[torch] PASSED                                                                                                                                                   [ 70%]
tests/test_cupy.py::test_to_device_with_stream[<lambda>0] PASSED                                                                                                                                    [ 71%]
tests/test_cupy.py::test_to_device_with_stream[<lambda>1] PASSED                                                                                                                                    [ 71%]
tests/test_cupy.py::test_to_device_with_stream[<lambda>2] PASSED                                                                                                                                    [ 71%]
tests/test_cupy.py::test_to_device_with_stream[<lambda>3] PASSED                                                                                                                                    [ 71%]
tests/test_cupy.py::test_to_device_with_dlpack_stream PASSED                                                                                                                                        [ 72%]
tests/test_dask.py::test_assert_no_compute PASSED                                                                                                                                                   [ 72%]
tests/test_dask.py::test_unary_ops_no_compute PASSED                                                                                                                                                [ 72%]
tests/test_dask.py::test_matmul_tensordot_no_compute PASSED                                                                                                                                         [ 72%]
tests/test_dask.py::test_asarray_no_compute PASSED                                                                                                                                                  [ 72%]
tests/test_dask.py::test_astype_no_compute[True] PASSED                                                                                                                                             [ 73%]
tests/test_dask.py::test_astype_no_compute[False] PASSED                                                                                                                                            [ 73%]
tests/test_dask.py::test_clip_no_compute PASSED                                                                                                                                                     [ 73%]
tests/test_dask.py::test_sort_argsort_nocompute[5] PASSED                                                                                                                                           [ 73%]
tests/test_dask.py::test_sort_argsort_nocompute[10] PASSED                                                                                                                                          [ 73%]
tests/test_da
B41A
sk.py::test_generators_are_lazy PASSED                                                                                                                                                 [ 74%]
tests/test_dask.py::test_sort_argsort_chunks[sort-0] PASSED                                                                                                                                         [ 74%]
tests/test_dask.py::test_sort_argsort_chunks[sort-1] PASSED                                                                                                                                         [ 74%]
tests/test_dask.py::test_sort_argsort_chunks[argsort-0] PASSED                                                                                                                                      [ 74%]
tests/test_dask.py::test_sort_argsort_chunks[argsort-1] PASSED                                                                                                                                      [ 74%]
tests/test_dask.py::test_sort_argsort_chunk_size[sort-shape0-auto] PASSED                                                                                                                           [ 75%]
tests/test_dask.py::test_sort_argsort_chunk_size[sort-shape1-auto] PASSED                                                                                                                           [ 75%]
tests/test_dask.py::test_sort_argsort_chunk_size[sort-shape2-chunks2] PASSED                                                                                                                        [ 75%]
tests/test_dask.py::test_sort_argsort_chunk_size[argsort-shape0-auto] PASSED                                                                                                                        [ 75%]
tests/test_dask.py::test_sort_argsort_chunk_size[argsort-shape1-auto] PASSED                                                                                                                        [ 75%]
tests/test_dask.py::test_sort_argsort_chunk_size[argsort-shape2-chunks2] PASSED                                                                                                                     [ 76%]
tests/test_dask.py::test_sort_argsort_meta[sort] PASSED                                                                                                                                             [ 76%]
tests/test_dask.py::test_sort_argsort_meta[argsort] PASSED                                                                                                                                          [ 76%]
tests/test_isdtype.py::test_isdtype_spec_dtypes[numpy] PASSED                                                                                                                                       [ 76%]
tests/test_isdtype.py::test_isdtype_spec_dtypes[cupy] PASSED                                                                                                                                        [ 76%]
tests/test_isdtype.py::test_isdtype_spec_dtypes[torch] PASSED                                                                                                                                       [ 77%]
tests/test_isdtype.py::test_isdtype_spec_dtypes[dask.array] PASSED                                                                                                                                  [ 77%]
tests/test_isdtype.py::test_isdtype_additional_dtypes[float16-numpy] PASSED                                                                                                                         [ 77%]
tests/test_isdtype.py::test_isdtype_additional_dtypes[float16-cupy] PASSED                                                                                                                          [ 77%]
tests/test_isdtype.py::test_isdtype_additional_dtypes[float16-torch] PASSED                                                                                                                         [ 77%]
tests/test_isdtype.py::test_isdtype_additional_dtypes[float16-dask.array] PASSED                                                                                                                    [ 78%]
tests/test_isdtype.py::test_isdtype_additional_dtypes[float128-numpy] PASSED                                                                                                                        [ 78%]
tests/test_isdtype.py::test_isdtype_additional_dtypes[float128-cupy] PASSED                                                                                                                         [ 78%]
tests/test_isdtype.py::test_isdtype_additional_dtypes[float128-torch] PASSED                                                                                                                        [ 78%]
tests/test_isdtype.py::test_isdtype_additional_dtypes[float128-dask.array] PASSED                                                                                                                   [ 79%]
tests/test_isdtype.py::test_isdtype_additional_dtypes[complex256-numpy] PASSED                                                                                                                      [ 79%]
tests/test_isdtype.py::test_isdtype_additional_dtypes[complex256-cupy] PASSED                                                                                                                       [ 79%]
tests/test_isdtype.py::test_isdtype_additional_dtypes[complex256-torch] PASSED                                                                                                                      [ 79%]
tests/test_isdtype.py::test_isdtype_additional_dtypes[complex256-dask.array] PASSED                                                                                                                 [ 79%]
tests/test_isdtype.py::test_isdtype_additional_dtypes[bfloat16-numpy] PASSED                                                                                                                        [ 80%]
tests/test_isdtype.py::test_isdtype_additional_dtypes[bfloat16-cupy] PASSED                                                                                                                         [ 80%]
tests/test_isdtype.py::test_isdtype_additional_dtypes[bfloat16-torch] PASSED                                                                                                                        [ 80%]
tests/test_isdtype.py::test_isdtype_additional_dtypes[bfloat16-dask.array] PASSED                                                                                                                   [ 80%]
tests/test_jax.py::test_device_jit[<lambda>0] PASSED                                                                                                                                                [ 80%]
tests/test_jax.py::test_device_jit[<lambda>1] PASSED                                                                                                                                                [ 81%]
tests/test_jax.py::test_device_jit[<lambda>2] PASSED                                                                                                                                                [ 81%]
tests/test_jax.py::test_device_jit[<lambda>3] PASSED                                                                                                                                                [ 81%]
tests/test_jax.py::test_device_jit[<lambda>4] PASSED                                                                                                                                                [ 81%]
tests/test_jax.py::test_device_jit[<lambda>5] PASSED                                                                                                                                                [ 81%]
tests/test_no_dependencies.py::test_numpy_dependency[cupy] PASSED                                                                                                                                   [ 82%]
tests/test_no_dependencies.py::test_numpy_dependency[numpy] PASSED                                                                                                                                  [ 82%]
tests/test_no_dependencies.py::test_numpy_dependency[torch] PASSED                                                                                                                                  [ 82%]
tests/test_no_dependencies.py::test_numpy_dependency[dask.array] PASSED                                                                                                                             [ 82%]
tests/test_no_dependencies.py::test_numpy_dependency[jax.numpy] PASSED                                                                                                                              [ 82%]
tests/test_no_dependencies.py::test_numpy_dependency[sparse] SKIPPED (could not import 'sparse': Numba needs NumPy 2.1 or less. Got NumPy 2.2.)                                                     [ 83%]
tests/test_no_dependencies.py::test_numpy_dependency[array_api_strict] PASSED                                                                                                                       [ 83%]
tests/test_torch.py::TestResultType::test_empty PASSED                                                                                                                                              [ 83%]
tests/test_torch.py::TestResultType::test_one_arg PASSED                                                                                                                                            [ 83%]
tests/test_torch.py::TestResultType::test_two_args PASSED                                                                                                                                           [ 83%]
tests/test_torch.py::TestResultType::test_multi_arg PASSED                                                                                                                                          [ 84%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b0-dtype_a0-float32] PASSED                                                                                                                  [ 84%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b0-dtype_a0-float64] PASSED                                                                                                                  [ 84%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b0-dtype_a1-float32] PASSED                                                                                                                  [ 84%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b0-dtype_a1-float64] PASSED                                                                                                                  [ 84%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b0-dtype_a2-float32] PASSED                                                                                                                  [ 85%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b0-dtype_a2-float64] PASSED                                                                                                                  [ 85%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b0-dtype_a3-float32] PASSED                                                                                                                  [ 85%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b0-dtype_a3-float64] PASSED                                                                                                                  [ 85%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b0-dtype_a4-float32] PASSED                                                                                                                  [ 86%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b0-dtype_a4-float64] PASSED                                                                                                                  [ 86%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b0-dtype_a5-float32] PASSED                                                                                                                  [ 86%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b0-dtype_a5-float64] PASSED                                                                                                                  [ 86%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b1-dtype_a0-float32] PASSED                                                                                                                  [ 86%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b1-dtype_a0-float64] PASSED                                                                                                                  [ 87%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b1-dtype_a1-float32] PASSED                                                                                                                  [ 87%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b1-dtype_a1-float64] PASSED                                                                                                                  [ 87%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b1-dtype_a2-float32] PASSED                                                                                                                  [ 87%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b1-dtype_a2-float64] PASSED                                                                                                                  [ 87%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b1-dtype_a3-float32] PASSED                                                                                                                  [ 88%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b1-dtype_a3-float64] PASSED                                                                                                                  [ 88%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b1-dtype_a4-float32] PASSED                                                                                                                  [ 88%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b1-dtype_a4-float64] PASSED                                                                                                                  [ 88%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b1-dtype_a5-float32] PASSED                                                                                                                  [ 88%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b1-dtype_a5-float64] PASSED                                                                                                                  [ 89%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b2-dtype_a0-float32] PASSED                                                                                                                  [ 89%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b2-dtype_a0-float64] PASSED                                                                                                                  [ 89%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b2-dtype_a1-float32] PASSED                                                                                                                  [ 89%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b2-dtype_a1-float64] PASSED                                                                                                                  [ 89%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b2-dtype_a2-float32] PASSED                                                                                                                  [ 90%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b2-dtype_a2-float64] PASSED                                                                                                                  [ 90%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b2-dtype_a3-float32] PASSED                                                                                                                  [ 90%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b2-dtype_a3-float64] PASSED                                                                                                                  [ 90%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b2-dtype_a4-float32] PASSED                                                                                                                  [ 90%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b2-dtype_a4-float64] PASSED                                                                                                                  [ 91%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b2-dtype_a5-float32] PASSED                                                                                                                  [ 91%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b2-dtype_a5-float64] PASSED                                                                                                                  [ 91%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b3-dtype_a0-float32] PASSED                                                                                                                  [ 91%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b3-dtype_a0-float64] PASSED                                                                                                                  [ 91%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b3-dtype_a1-float32] PASSED                                                                                                                  [ 92%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b3-dtype_a1-float64] PASSED                                                                                                                  [ 92%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b3-dtype_a2-float32] PASSED                                                                                                                  [ 92%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b3-dtype_a2-float64] PASSED                                                                                                                  [ 92%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b3-dtype_a3-float32] PASSED                                                                                                                  [ 93%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b3-dtype_a3-float64] PASSED                                                                                                                  [ 93%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b3-dtype_a4-float32] PASSED                                                                                                                  [ 93%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b3-dtype_a4-float64] PASSED                                                                                                                  [ 93%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b3-dtype_a5-float32] PASSED                                                                                                                  [ 93%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b3-dtype_a5-float64] PASSED                                                                                                                  [ 94%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b4-dtype_a0-float32] PASSED                                                                                                                  [ 94%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b4-dtype_a0-float64] PASSED                                                                                                                  [ 94%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b4-dtype_a1-float32] PASSED                                                                                                                  [ 94%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b4-dtype_a1-float64] PASSED                                                                                                                  [ 94%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b4-dtype_a2-float32] PASSED                                                                                                                  [ 95%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b4-dtype_a2-float64] PASSED                                                                                                                  [ 95%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b4-dtype_a3-float32] PASSED                                                                                                                  [ 95%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b4-dtype_a3-float64] PASSED                                                                                                                  [ 95%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b4-dtype_a4-float32] PASSED                                                                                                                  [ 95%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b4-dtype_a4-float64] PASSED                                                                                                                  [ 96%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b4-dtype_a5-float32] PASSED                                                                                                                  [ 96%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b4-dtype_a5-float64] PASSED                                                                                                                  [ 96%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b5-dtype_a0-float32] PASSED                                                                                                                  [ 96%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b5-dtype_a0-float64] PASSED                                                                                                                  [ 96%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b5-dtype_a1-float32] PASSED                                                                                                                  [ 97%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b5-dtype_a1-float64] PASSED                                                                                                                  [ 97%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b5-dtype_a2-float32] PASSED                                                                                                                  [ 97%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b5-dtype_a2-float64] PASSED                                                                                                                  [ 97%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b5-dtype_a3-float32] PASSED                                                                                                                  [ 97%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b5-dtype_a3-float64] PASSED                                                                                                                  [ 98%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b5-dtype_a4-float32] PASSED                                                                                                                  [ 98%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b5-dtype_a4-float64] PASSED                                                                                                                  [ 98%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b5-dtype_a5-float32] PASSED                                                                                                                  [ 98%]
tests/test_torch.py::TestResultType::test_gh_273[dtype_b5-dtype_a5-float64] PASSED                                                                                                                  [ 98%]
tests/test_torch.py::test_meshgrid PASSED                                                                                                                                                           [ 99%]
tests/test_vendoring.py::test_vendoring_numpy PASSED                                                                                                                                                [ 99%]
tests/test_vendoring.py::test_vendoring_cupy PASSED                                                                                                                                                 [ 99%]
tests/test_vendoring.py::test_vendoring_torch PASSED                                                                                                                                                [ 99%]
tests/test_vendoring.py::test_vendoring_dask PASSED                                                                                                                                                 [100%]

================================================================================================ FAILURES =================================================================================================
_________________________________________________________________________________________ test_asarray_copy[cupy] _________________________________________________________________________________________

library = 'cupy'

    @pytest.mark.parametrize("library", wrapped_libraries)
    def test_asarray_copy(library):
        # Note, we have this test here because the test suite currently doesn't
        # test the copy flag to asarray() very rigorously. Once
        # https://github.com/data-apis/array-api-tests/issues/241 is fixed we
        # should be able to delete this.
        xp = import_(library, wrapper=True)
        asarray = xp.asarray
        is_lib_func = globals()[is_array_functions[library]]
        all = xp.all if library != 'dask.array' else lambda x: xp.all(x).compute()
    
        if library == 'cupy':
            supports_copy_false_other_ns = False
            supports_copy_false_same_ns = False
        elif library == 'dask.array':
            supports_copy_false_other_ns = False
            supports_copy_false_same_ns = True
        else:
            supports_copy_false_other_ns = True
            supports_copy_false_same_ns = True
    
        a = asarray([1])
        b = asarray(a, copy=True)
        assert is_lib_func(b)
        a[0] = 0
        assert all(b[0] == 1)
        assert all(a[0] == 0)
    
        a = asarray([1])
        if supports_copy_false_same_ns:
            b = asarray(a, copy=False)
            assert is_lib_func(b)
            a[0] = 0
            assert all(b[0] == 0)
        else:
>           pytest.raises(NotImplementedError, lambda: asarray(a, copy=False))
E           Failed: DID NOT RAISE <class 'NotImplementedError'>

tests/test_common.py:307: Failed
============================================================================================ warnings summary =============================================================================================
... <snip> ...
========================================================================================= short test summary info =========================================================================================
FAILED tests/test_common.py::test_asarray_copy[cupy] - Failed: DID NOT RAISE <class 'NotImplementedError'>
==================================================================== 1 failed, 388 passed, 95 skipped, 2 xfailed, 65 warnings in 9.72s ====================================================================
(array-api) ev-br@qgpu3:~/repos/array-api-compat$ 

@crusaderky
Copy link
Contributor Author

looks good to me. Outstanding error is fixed by #325.

@crusaderky
Copy link
Contributor Author

Test failure is unrelated

@ev-br ev-br merged commit 6c6bcf2 into data-apis:main May 15, 2025
22 of 23 checks passed
@ev-br
Copy link
Member
ev-br commented May 15, 2025

Merged, thanks.
Will test locally. Meanwhile, it seems like the segfault could be reported to CuPy itself?

@ev-br ev-br added this to the 1.12 milestone May 15, 2025
@crusaderky
Copy link
Contributor Author

Merged, thanks. Will test locally. Meanwhile, it seems like the segfault could be reported to CuPy itself?

No. As per both the CuPy and the Array API spec, it needs to be a stream pointer, whatever that means on the backend. On CUDA, that means it must have been returned by cudaStreamCreate. I'm unsure why 123 doesn't segfault on my machine.

@crusaderky crusaderky deleted the cupy_to_device branch May 15, 2025 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test errors with cupy==13.4.1
2 participants
0