conda-forge / cupy-feedstock

A conda-smithy repository for cupy.
BSD 3-Clause "New" or "Revised" License
5 stars 23 forks source link

Create conflict with numpy2? #278

Closed hmaarrfk closed 2 months ago

hmaarrfk commented 2 months ago

Solution to issue cannot be found in the documentation.

Issue

It seems that cupy allows co-installation with numpy 2.

Should we create a conflict?

Installed packages

$ mamba create --name cp "cupy>=13" numpy=2 --channel conda-forge --override-channels

Looking for: ["cupy[version='>=13']", 'numpy=2']

conda-forge/linux-64                                        Using cache
conda-forge/noarch                                          Using cache
Transaction

  Prefix: /home/mark/miniforge3/envs/cp

  Updating specs:

   - cupy[version='>=13']
   - numpy=2

  Package               Version  Build                Channel           Size
──────────────────────────────────────────────────────────────────────────────
  Install:
──────────────────────────────────────────────────────────────────────────────

  + python_abi             3.12  4_cp312              conda-forge     Cached
  + _libgcc_mutex           0.1  conda_forge          conda-forge     Cached
  + ld_impl_linux-64       2.40  hf3520f5_7           conda-forge     Cached
  + ca-certificates    2024.7.4  hbcca054_0           conda-forge     Cached
  + libgomp              14.1.0  h77fa898_0           conda-forge     Cached
  + _openmp_mutex           4.5  2_gnu                conda-forge     Cached
  + libgcc-ng            14.1.0  h77fa898_0           conda-forge     Cached
  + libgfortran5         14.1.0  hc5f4f2c_0           conda-forge     Cached
  + openssl               3.3.1  h4bc722e_2           conda-forge     Cached
  + libxcrypt            4.4.36  hd590300_1           conda-forge     Cached
  + libffi                3.4.2  h7f98852_5           conda-forge     Cached
  + bzip2                 1.0.8  h4bc722e_7           conda-forge     Cached
  + libzlib               1.3.1  h4ab18f5_1           conda-forge     Cached
  + ncurses                 6.5  h59595ed_0           conda-forge     Cached
  + libuuid              2.38.1  h0b41bf4_0           conda-forge     Cached
  + libnsl                2.0.1  hd590300_0           conda-forge     Cached
  + libexpat              2.6.2  h59595ed_0           conda-forge     Cached
  + xz                    5.2.6  h166bdaf_0           conda-forge     Cached
  + libstdcxx-ng         14.1.0  hc0a3c3a_0           conda-forge     Cached
  + libgfortran-ng       14.1.0  h69a702a_0           conda-forge     Cached
  + tk                   8.6.13  noxft_h4845f30_101   conda-forge     Cached
  + libsqlite            3.46.0  hde9e2c9_0           conda-forge     Cached
  + readline                8.2  h8228510_1           conda-forge     Cached
  + libopenblas          0.3.27  pthreads_hac2b453_1  conda-forge     Cached
  + libblas               3.9.0  23_linux64_openblas  conda-forge       15kB
  + libcblas              3.9.0  23_linux64_openblas  conda-forge       15kB
  + liblapack             3.9.0  23_linux64_openblas  conda-forge       15kB
  + cuda-version           12.5  hd4f0392_3           conda-forge     Cached
  + tzdata                2024a  h0c530f3_0           conda-forge     Cached
  + libnvjitlink        12.5.82  he02047a_0           conda-forge     Cached
  + libcurand         10.3.6.82  he02047a_0           conda-forge     Cached
  + libcufft          11.2.3.61  he02047a_0           conda-forge     Cached
  + cuda-nvrtc          12.5.82  he02047a_0           conda-forge     Cached
  + python               3.12.4  h194c7f8_0_cpython   conda-forge     Cached
  + libcusparse        12.5.1.3  he02047a_0           conda-forge     Cached
  + libcublas          12.5.3.2  he02047a_0           conda-forge     Cached
  + libcusolver       11.6.3.83  he02047a_0           conda-forge     Cached
  + wheel                0.43.0  pyhd8ed1ab_1         conda-forge     Cached
  + setuptools           72.1.0  pyhd8ed1ab_0         conda-forge        1MB
  + pip                    24.2  pyhd8ed1ab_0         conda-forge        1MB
  + fastrlock             0.8.2  py312h30efb56_2      conda-forge       38kB
  + numpy                 2.0.1  py312h1103770_0      conda-forge        8MB
  + cupy-core            13.2.0  py312hd074ebb_1      conda-forge       41MB
  + cupy                 13.2.0  py312had87585_1      conda-forge      356kB

  Summary:

  Install: 44 packages

  Total download: 53MB

──────────────────────────────────────────────────────────────────────────────

Confirm changes: [Y/n]

Environment info

conda info

     active environment : None
            shell level : 0
       user config file : /home/mark/.condarc
 populated config files : /home/mark/miniforge3/.condarc
                          /home/mark/.condarc
          conda version : 24.5.0
    conda-build version : 24.5.1
         python version : 3.10.14.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=zen
                          __conda=24.5.0=0
                          __cuda=12.4=0
                          __glibc=2.35=0
                          __linux=6.5.0=0
                          __unix=0=0
       base environment : /home/mark/miniforge3  (writable)
      conda av data dir : /home/mark/miniforge3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /home/mark/miniforge3/pkgs
                          /home/mark/.conda/pkgs
       envs directories : /home/mark/miniforge3/envs
                          /home/mark/.conda/envs
               platform : linux-64
             user-agent : conda/24.5.0 requests/2.32.3 CPython/3.10.14 Linux/6.5.0-44-generic ubuntu/22.04.4 glibc/2.35 solver/libmamba conda-libmamba-solver/24.1.0 libmambapy/1.5.8
                UID:GID : 1003:1003
             netrc file : None
           offline mode : False
hmaarrfk commented 2 months ago

xref: https://github.com/conda-forge/cupy-feedstock/pull/272

leofang commented 2 months ago

The limitation was lifted by v13.2.0. https://github.com/cupy/cupy/releases/tag/v13.2.0 The ongoing work is to iron out some behaviors inconsistent with NumPy 2.

jakirkham commented 2 months ago

Yes CuPy 13.3.0, which is in the works ( https://github.com/cupy/cupy/issues/7555 ), will fix a few bugs that were uncovered with NumPy 2

Could you please try the dev packages in PR ( https://github.com/conda-forge/cupy-feedstock/pull/272 ) and let us know if you still encounter issues? Some details on setup in issue ( https://github.com/conda-forge/conda-forge.github.io/issues/1424 ) and comment ( https://github.com/conda-forge/cupy-feedstock/pull/272#issuecomment-2249637674 )

Edit: If you still see problems, please raise upstream issues and cc us on them

hmaarrfk commented 2 months ago

Ok, i can't really recreate too easily (sorry this seems to be a little dependent on our optional dependencies as well) but i'll open if i can recreate the failing behavior again.