conda-forge / jax-feedstock

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

Dependency mismatch: Outdated cuDNN installation makes CUDA backend fail to initialize #149

Closed sergiovaneg closed 1 week ago

sergiovaneg commented 1 month ago

Solution to issue cannot be found in the documentation.

Issue

Steps to reproduce

  1. Install the latest JAX and Keras versions with GPU support from conda-forge
  2. Instantiate a Keras model in Python making sure to use JAX as the backend
  3. Call the model (or use the fit/predict methods) so the execution graph gets compiled

Expected result

The model runs on GPU.

Actual result

The model falls back to running on CPU and throws the following error:

CUDA backend failed to initialize: Unable to use CUDA because of the following issues with CUDA components:
Outdated cuDNN installation found.
Version JAX was built against: 8907
Minimum supported: 9100
Installed version: 8907
The local installation version must be no lower than 9100..(Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)

Visual Proof

image

Severity

Medium: the code still runs, and this can be temporarily remediated by pinning the JAX version as jax<=0.4.29

Suggested course of action

Pin cuDNN 9.1 as the minimum version for jax 0.4.31 and wait for the cuDNN conda-forge maintainer to update the module.

Installed packages

# packages in environment at /home/sergiovaneg/miniforge3/envs/keras_jax:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
_sysroot_linux-64_curr_repodata_hack 3                   h69a702a_16    conda-forge
absl-py                   2.1.0              pyhd8ed1ab_0    conda-forge
alembic                   1.13.2             pyhd8ed1ab_0    conda-forge
annotated-types           0.7.0              pyhd8ed1ab_0    conda-forge
asttokens                 2.4.1              pyhd8ed1ab_0    conda-forge
atk-1.0                   2.38.0               h04ea711_2    conda-forge
aws-c-auth                0.7.22              hbd3ac97_10    conda-forge
aws-c-cal                 0.7.1                h87b94db_1    conda-forge
aws-c-common              0.9.23               h4ab18f5_0    conda-forge
aws-c-compression         0.2.18               he027950_7    conda-forge
aws-c-event-stream        0.4.2               h7671281_15    conda-forge
aws-c-http                0.8.2                he17ee6b_6    conda-forge
aws-c-io                  0.14.10              h826b7d6_1    conda-forge
aws-c-mqtt                0.10.4               hcd6a914_8    conda-forge
aws-c-s3                  0.6.0                h365ddd8_2    conda-forge
aws-c-sdkutils            0.1.16               he027950_3    conda-forge
aws-checksums             0.1.18               he027950_7    conda-forge
aws-crt-cpp               0.27.3               hda66527_2    conda-forge
aws-sdk-cpp               1.11.329             h46c3b66_9    conda-forge
azure-core-cpp            1.13.0               h935415a_0    conda-forge
azure-identity-cpp        1.8.0                hd126650_2    conda-forge
azure-storage-blobs-cpp   12.12.0              hd2e3451_0    conda-forge
azure-storage-common-cpp  12.7.0               h10ac4d7_1    conda-forge
azure-storage-files-datalake-cpp 12.11.0              h325d260_1    conda-forge
binutils_impl_linux-64    2.40                 ha1999f0_7    conda-forge
binutils_linux-64         2.40                 hb3c18ed_9    conda-forge
bokeh                     3.5.1              pyhd8ed1ab_0    conda-forge
bottle                    0.12.23            pyhd8ed1ab_0    conda-forge
brotli                    1.1.0                hd590300_1    conda-forge
brotli-bin                1.1.0                hd590300_1    conda-forge
brotli-python             1.1.0           py312h30efb56_1    conda-forge
bzip2                     1.0.8                h4bc722e_7    conda-forge
c-ares                    1.32.3               h4bc722e_0    conda-forge
ca-certificates           2024.7.4             hbcca054_0    conda-forge
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
cairo                     1.18.0               hebfffa5_3    conda-forge
certifi                   2024.7.4           pyhd8ed1ab_0    conda-forge
cffi                      1.16.0          py312hf06ca03_0    conda-forge
click                     8.1.7           unix_pyh707e725_0    conda-forge
cloudpickle               3.0.0              pyhd8ed1ab_0    conda-forge
cmaes                     0.11.0             pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
colorlog                  6.8.2           py312h7900ff3_0    conda-forge
comm                      0.2.2              pyhd8ed1ab_0    conda-forge
contourpy                 1.2.1           py312h8572e83_0    conda-forge
cuda-cccl_linux-64        12.6.37              ha770c72_0    conda-forge
cuda-crt-dev_linux-64     12.6.20              ha770c72_0    conda-forge
cuda-crt-tools            12.6.20              ha770c72_0    conda-forge
cuda-cudart               12.6.37              he02047a_0    conda-forge
cuda-cudart-dev           12.6.37              he02047a_0    conda-forge
cuda-cudart-dev_linux-64  12.6.37              h85509e4_0    conda-forge
cuda-cudart-static        12.6.37              he02047a_0    conda-forge
cuda-cudart-static_linux-64 12.6.37              h85509e4_0    conda-forge
cuda-cudart_linux-64      12.6.37              h85509e4_0    conda-forge
cuda-cupti                12.6.37              he02047a_0    conda-forge
cuda-driver-dev_linux-64  12.6.37              h85509e4_0    conda-forge
cuda-nvcc                 12.6.20              hcdd1206_0    conda-forge
cuda-nvcc-dev_linux-64    12.6.20              he91c749_0    conda-forge
cuda-nvcc-impl            12.6.20              h85509e4_0    conda-forge
cuda-nvcc-tools           12.6.20              he02047a_0    conda-forge
cuda-nvcc_linux-64        12.6.20              h8a487aa_0    conda-forge
cuda-nvrtc                12.6.20              he02047a_0    conda-forge
cuda-nvtx                 12.6.37              he02047a_0    conda-forge
cuda-nvvm-dev_linux-64    12.6.20              ha770c72_0    conda-forge
cuda-nvvm-impl            12.6.20              he02047a_0    conda-forge
cuda-nvvm-tools           12.6.20              he02047a_0    conda-forge
cuda-version              12.6                 h7480c83_3    conda-forge
cudnn                     8.9.7.29             h092f7fd_3    conda-forge
cycler                    0.12.1             pyhd8ed1ab_0    conda-forge
cytoolz                   0.12.3          py312h98912ed_0    conda-forge
dask                      2024.8.0           pyhd8ed1ab_0    conda-forge
dask-core                 2024.8.0           pyhd8ed1ab_0    conda-forge
dask-expr                 1.1.10             pyhd8ed1ab_0    conda-forge
debugpy                   1.8.5           py312hca68cad_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
distributed               2024.8.0           pyhd8ed1ab_0    conda-forge
exceptiongroup            1.2.2              pyhd8ed1ab_0    conda-forge
executing                 2.0.1              pyhd8ed1ab_0    conda-forge
expat                     2.6.2                h59595ed_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 h77eed37_2    conda-forge
fontconfig                2.14.2               h14ed4e7_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fonttools                 4.53.1          py312h41a817b_0    conda-forge
freetype                  2.12.1               h267a509_2    conda-forge
fribidi                   1.0.10               h36c2ea0_0    conda-forge
fsspec                    2024.6.1           pyhff2d567_0    conda-forge
gcc_impl_linux-64         13.2.0              h9eb54c0_13    conda-forge
gcc_linux-64              13.2.0               h50dba11_9    conda-forge
gdk-pixbuf                2.42.12              hb9ae30d_0    conda-forge
gettext                   0.22.5               h59595ed_2    conda-forge
gettext-tools             0.22.5               h59595ed_2    conda-forge
gflags                    2.2.2             he1b5a44_1004    conda-forge
giflib                    5.2.2                hd590300_0    conda-forge
glog                      0.7.1                hbabe93e_0    conda-forge
graphite2                 1.3.13            h59595ed_1003    conda-forge
graphviz                  12.0.0               hba01fac_0    conda-forge
greenlet                  3.0.3           py312h30efb56_0    conda-forge
gtk2                      2.24.33              h6470451_5    conda-forge
gts                       0.7.6                h977cf35_4    conda-forge
gxx_impl_linux-64         13.2.0              h2a599c4_13    conda-forge
gxx_linux-64              13.2.0               h4ebd915_9    conda-forge
h2                        4.1.0              pyhd8ed1ab_0    conda-forge
h5py                      3.11.0          nompi_py312hb7ab980_102    conda-forge
harfbuzz                  9.0.0                hda332d3_1    conda-forge
hdf5                      1.14.3          nompi_hdf9ad27_105    conda-forge
hpack                     4.0.0              pyh9f0ad1d_0    conda-forge
hyperframe                6.0.1              pyhd8ed1ab_0    conda-forge
icu                       75.1                 he02047a_0    conda-forge
importlib-metadata        8.2.0              pyha770c72_0    conda-forge
importlib_metadata        8.2.0                hd8ed1ab_0    conda-forge
importlib_resources       6.4.0              pyhd8ed1ab_0    conda-forge
ipykernel                 6.29.5             pyh3099207_0    conda-forge
ipympl                    0.9.4              pyhd8ed1ab_0    conda-forge
ipython                   8.26.0             pyh707e725_0    conda-forge
ipython_genutils          0.2.0              pyhd8ed1ab_1    conda-forge
ipywidgets                8.1.3              pyhd8ed1ab_0    conda-forge
jax                       0.4.31             pyhd8ed1ab_0    conda-forge
jaxlib                    0.4.31          cuda120py312h4008524_200    conda-forge
jedi                      0.19.1             pyhd8ed1ab_0    conda-forge
jinja2                    3.1.4              pyhd8ed1ab_0    conda-forge
joblib                    1.4.2              pyhd8ed1ab_0    conda-forge
jupyter_client            8.6.2              pyhd8ed1ab_0    conda-forge
jupyter_core              5.7.2           py312h7900ff3_0    conda-forge
jupyterlab_widgets        3.0.11             pyhd8ed1ab_0    conda-forge
keras                     3.4.1              pyhd8ed1ab_2    conda-forge
kernel-headers_linux-64   4.18.0               he073ed8_2    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
kiwisolver                1.4.5           py312h8572e83_1    conda-forge
krb5                      1.21.3               h659f571_0    conda-forge
lcms2                     2.16                 hb7c19ff_0    conda-forge
ld_impl_linux-64          2.40                 hf3520f5_7    conda-forge
lerc                      4.0.0                h27087fc_0    conda-forge
libabseil                 20240116.2      cxx17_he02047a_1    conda-forge
libaec                    1.1.3                h59595ed_0    conda-forge
libarrow                  17.0.0           h4b47046_3_cpu    conda-forge
libarrow-acero            17.0.0           he02047a_3_cpu    conda-forge
libarrow-dataset          17.0.0           he02047a_3_cpu    conda-forge
libarrow-substrait        17.0.0           hc9a23c6_3_cpu    conda-forge
libasprintf               0.22.5               h661eb56_2    conda-forge
libasprintf-devel         0.22.5               h661eb56_2    conda-forge
libblas                   3.9.0           23_linux64_openblas    conda-forge
libbrotlicommon           1.1.0                hd590300_1    conda-forge
libbrotlidec              1.1.0                hd590300_1    conda-forge
libbrotlienc              1.1.0                hd590300_1    conda-forge
libcblas                  3.9.0           23_linux64_openblas    conda-forge
libcrc32c                 1.1.2                h9c3ff4c_0    conda-forge
libcublas                 12.6.0.22            he02047a_0    conda-forge
libcufft                  11.2.6.28            he02047a_0    conda-forge
libcurand                 10.3.7.37            he02047a_0    conda-forge
libcurl                   8.9.1                hdb1bdb2_0    conda-forge
libcusolver               11.6.4.38            he02047a_0    conda-forge
libcusparse               12.5.2.23            he02047a_0    conda-forge
libdeflate                1.21                 h4bc722e_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 hd590300_2    conda-forge
libevent                  2.1.12               hf998b51_1    conda-forge
libexpat                  2.6.2                h59595ed_0    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-devel_linux-64     13.2.0             hdb50d1a_113    conda-forge
libgcc-ng                 14.1.0               h77fa898_0    conda-forge
libgd                     2.3.3               hd3e95f3_10    conda-forge
libgettextpo              0.22.5               h59595ed_2    conda-forge
libgettextpo-devel        0.22.5               h59595ed_2    conda-forge
libgfortran-ng            14.1.0               h69a702a_0    conda-forge
libgfortran5              14.1.0               hc5f4f2c_0    conda-forge
libglib                   2.80.3               h8a4344b_1    conda-forge
libgomp                   14.1.0               h77fa898_0    conda-forge
libgoogle-cloud           2.26.0               h26d7fe4_0    conda-forge
libgoogle-cloud-storage   2.26.0               ha262f82_0    conda-forge
libgrpc                   1.62.2               h15f2491_0    conda-forge
libiconv                  1.17                 hd590300_2    conda-forge
libjpeg-turbo             3.0.0                hd590300_1    conda-forge
liblapack                 3.9.0           23_linux64_openblas    conda-forge
libnghttp2                1.58.0               h47da74e_1    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libnvjitlink              12.6.20              he02047a_0    conda-forge
libopenblas               0.3.27          pthreads_hac2b453_1    conda-forge
libparquet                17.0.0           h9e5060d_3_cpu    conda-forge
libpng                    1.6.43               h2797004_0    conda-forge
libprotobuf               4.25.3               h08a7969_0    conda-forge
libre2-11                 2023.09.01           h5a48ba9_2    conda-forge
librsvg                   2.58.2               h9564881_1    conda-forge
libsanitizer              13.2.0              h6ddb7a1_13    conda-forge
libsodium                 1.0.18               h36c2ea0_1    conda-forge
libsqlite                 3.46.0               hde9e2c9_0    conda-forge
libssh2                   1.11.0               h0841786_0    conda-forge
libstdcxx-devel_linux-64  13.2.0             hdb50d1a_113    conda-forge
libstdcxx-ng              14.1.0               hc0a3c3a_0    conda-forge
libthrift                 0.19.0               hb90f79a_1    conda-forge
libtiff                   4.6.0                h46a8edc_4    conda-forge
libutf8proc               2.8.0                h166bdaf_0    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libwebp                   1.4.0                h2c329e2_0    conda-forge
libwebp-base              1.4.0                hd590300_0    conda-forge
libxcb                    1.16                 hd590300_0    conda-forge
libxcrypt                 4.4.36               hd590300_1    conda-forge
libxml2                   2.12.7               he7c6b58_4    conda-forge
libzlib                   1.3.1                h4ab18f5_1    conda-forge
locket                    1.0.0              pyhd8ed1ab_0    conda-forge
lz4                       4.3.3           py312h03f37cb_0    conda-forge
lz4-c                     1.9.4                hcb278e6_0    conda-forge
mako                      1.3.5              pyhd8ed1ab_0    conda-forge
markdown-it-py            3.0.0              pyhd8ed1ab_0    conda-forge
markupsafe                2.1.5           py312h98912ed_0    conda-forge
matplotlib-base           3.9.1           py312h854627b_2    conda-forge
matplotlib-inline         0.1.7              pyhd8ed1ab_0    conda-forge
mdurl                     0.1.2              pyhd8ed1ab_0    conda-forge
ml_dtypes                 0.4.0           py312h1d6d2e6_1    conda-forge
msgpack-python            1.0.8           py312h2492b07_0    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
namex                     0.0.8              pyhd8ed1ab_0    conda-forge
nccl                      2.22.3.1             hbc370b7_1    conda-forge
ncurses                   6.5                  h59595ed_0    conda-forge
nest-asyncio              1.6.0              pyhd8ed1ab_0    conda-forge
numpy                     2.0.1           py312h1103770_0    conda-forge
openjpeg                  2.5.2                h488ebb8_0    conda-forge
openssl                   3.3.1                h4bc722e_2    conda-forge
opt-einsum                3.3.0                hd8ed1ab_2    conda-forge
opt_einsum                3.3.0              pyhc1e730c_2    conda-forge
optree                    0.12.1          py312h3402730_0    conda-forge
optuna                    3.6.1              pyhd8ed1ab_0    conda-forge
optuna-dashboard          0.15.1             pyhd8ed1ab_0    conda-forge
orc                       2.0.1                h17fec99_1    conda-forge
packaging                 24.1               pyhd8ed1ab_0    conda-forge
pandas                    2.2.2           py312h1d6d2e6_1    conda-forge
pango                     1.54.0               h4c5309f_1    conda-forge
parso                     0.8.4              pyhd8ed1ab_0    conda-forge
partd                     1.4.2              pyhd8ed1ab_0    conda-forge
patsy                     0.5.6              pyhd8ed1ab_0    conda-forge
pcre2                     10.44                h0f59acf_0    conda-forge
pexpect                   4.9.0              pyhd8ed1ab_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    10.4.0          py312h287a98d_0    conda-forge
pip                       24.2               pyhd8ed1ab_0    conda-forge
pixman                    0.43.2               h59595ed_0    conda-forge
platformdirs              4.2.2              pyhd8ed1ab_0    conda-forge
polars                    1.2.1           py312h7285250_0    conda-forge
prompt-toolkit            3.0.47             pyha770c72_0    conda-forge
psutil                    6.0.0           py312h9a8786e_0    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pure_eval                 0.2.3              pyhd8ed1ab_0    conda-forge
pyarrow                   17.0.0          py312h9cebb41_1    conda-forge
pyarrow-core              17.0.0          py312h9cafe31_1_cpu    conda-forge
pyarrow-hotfix            0.6                pyhd8ed1ab_0    conda-forge
pycparser                 2.22               pyhd8ed1ab_0    conda-forge
pydantic                  2.8.2              pyhd8ed1ab_0    conda-forge
pydantic-core             2.20.1          py312hf008fa9_0    conda-forge
pydot                     3.0.1           py312h7900ff3_0    conda-forge
pygments                  2.18.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.1.2              pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.12.4          h194c7f8_0_cpython    conda-forge
python-dateutil           2.9.0              pyhd8ed1ab_0    conda-forge
python-tzdata             2024.1             pyhd8ed1ab_0    conda-forge
python_abi                3.12                    4_cp312    conda-forge
pytz                      2024.1             pyhd8ed1ab_0    conda-forge
pyyaml                    6.0.1           py312h98912ed_1    conda-forge
pyzmq                     26.1.0          py312h7ab5c7e_0    conda-forge
qhull                     2020.2               h434a139_5    conda-forge
re2                       2023.09.01           h7f4b329_2    conda-forge
readline                  8.2                  h8228510_1    conda-forge
rich                      13.7.1             pyhd8ed1ab_0    conda-forge
s2n                       1.4.17               he19d79f_0    conda-forge
scikit-learn              1.5.1           py312h775a589_0    conda-forge
scipy                     1.14.0          py312hc2bc53b_1    conda-forge
seaborn                   0.13.2               hd8ed1ab_2    conda-forge
seaborn-base              0.13.2             pyhd8ed1ab_2    conda-forge
setuptools                72.1.0             pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.2.1                ha2e4443_0    conda-forge
sortedcontainers          2.4.0              pyhd8ed1ab_0    conda-forge
sqlalchemy                2.0.32          py312h41a817b_0    conda-forge
stack_data                0.6.2              pyhd8ed1ab_0    conda-forge
statsmodels               0.14.2          py312h085067d_0    conda-forge
sysroot_linux-64          2.28                 he073ed8_2    conda-forge
tblib                     3.0.0              pyhd8ed1ab_0    conda-forge
threadpoolctl             3.5.0              pyhc1e730c_0    conda-forge
tk                        8.6.13          noxft_h4845f30_101    conda-forge
toolz                     0.12.1             pyhd8ed1ab_0    conda-forge
tornado                   6.4.1           py312h9a8786e_0    conda-forge
tqdm                      4.66.5             pyhd8ed1ab_0    conda-forge
traitlets                 5.14.3             pyhd8ed1ab_0    conda-forge
typing-extensions         4.12.2               hd8ed1ab_0    conda-forge
typing_extensions         4.12.2             pyha770c72_0    conda-forge
tzdata                    2024a                h0c530f3_0    conda-forge
urllib3                   2.2.2              pyhd8ed1ab_1    conda-forge
wcwidth                   0.2.13             pyhd8ed1ab_0    conda-forge
wheel                     0.44.0             pyhd8ed1ab_0    conda-forge
widgetsnbextension        4.0.11             pyhd8ed1ab_0    conda-forge
xorg-kbproto              1.0.7             h7f98852_1002    conda-forge
xorg-libice               1.1.1                hd590300_0    conda-forge
xorg-libsm                1.2.4                h7391055_0    conda-forge
xorg-libx11               1.8.9                hb711507_1    conda-forge
xorg-libxau               1.0.11               hd590300_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xorg-libxext              1.3.4                h0b41bf4_2    conda-forge
xorg-libxrender           0.9.11               hd590300_0    conda-forge
xorg-renderproto          0.11.1            h7f98852_1002    conda-forge
xorg-xextproto            7.3.0             h0b41bf4_1003    conda-forge
xorg-xproto               7.0.31            h7f98852_1007    conda-forge
xyzservices               2024.6.0           pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
yaml                      0.2.5                h7f98852_2    conda-forge
zeromq                    4.3.5                h75354e8_4    conda-forge
zict                      3.0.0              pyhd8ed1ab_0    conda-forge
zipp                      3.19.2             pyhd8ed1ab_0    conda-forge
zlib                      1.3.1                h4ab18f5_1    conda-forge
zstandard                 0.23.0          py312h3483029_0    conda-forge
zstd                      1.5.6                ha6fb4c9_0    conda-forge

Environment info

active environment : keras_jax
    active env location : /home/sergiovaneg/miniforge3/envs/keras_jax
            shell level : 2
       user config file : /home/sergiovaneg/.condarc
 populated config files : /home/sergiovaneg/miniforge3/.condarc
          conda version : 24.7.1
    conda-build version : not installed
         python version : 3.12.3.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=skylake
                          __conda=24.7.1=0
                          __cuda=12.5=0
                          __glibc=2.39=0
                          __linux=5.15.153.1=0
                          __unix=0=0
       base environment : /home/sergiovaneg/miniforge3  (writable)
      conda av data dir : /home/sergiovaneg/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/sergiovaneg/miniforge3/pkgs
                          /home/sergiovaneg/.conda/pkgs
       envs directories : /home/sergiovaneg/miniforge3/envs
                          /home/sergiovaneg/.conda/envs
               platform : linux-64
             user-agent : conda/24.7.1 requests/2.32.3 CPython/3.12.3 Linux/5.15.153.1-microsoft-standard-WSL2 opensuse-tumbleweed/20240806 glibc/2.39 solver/libmamba conda-libmamba-solver/24.7.0 libmambapy/1.5.8
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False
traversaro commented 1 month ago

Xref related issue: https://github.com/conda-forge/jaxlib-feedstock/issues/277 .

ngam commented 3 weeks ago

@traversaro please feel free to tag the conda-forge/jax and conda-forge/jaxlib teams in the future if you'd like quicker responses :)

I read both this issue and https://github.com/conda-forge/jaxlib-feedstock/issues/277. My understanding is that we never wanted to add cuda-related constraints in this jax feedstock, and I likely would've opted to merge https://github.com/conda-forge/jax-feedstock/pull/148 even if I knew ahead of time about these issues. I am not sure what the best course of action is. What's your recommendation?

My preference is that we instrument a fix in the jaxlib feedstock (I am maintainer there too). I can also work with the jax team to move the dependency from jax to jaxlib so that it is much clearer this is a backend (jaxlib) dependency and not a wrapper (jax) dependency.

Thoughts?

Now that the cudnn v9 PR is in, we should fix this and perhaps issue repodata patch soon

traversaro commented 3 weeks ago

@traversaro please feel free to tag the conda-forge/jax and conda-forge/jaxlib teams in the future if you'd like quicker responses :)

My bad, I kind of silently assumes maintainers watches their repo so I typically mentions teams only on related issue on different repos, but indeed a "Mentioned" notification typically get noticed more!

I read both this issue and https://github.com/conda-forge/jaxlib-feedstock/issues/277. My understanding is that we never wanted to add cuda-related constraints in this jax feedstock, and I likely would've opted to merge https://github.com/conda-forge/jax-feedstock/pull/148 even if I knew ahead of time about these issues. I am not sure what the best course of action is. What's your recommendation?

My preference is that we instrument a fix in the jaxlib feedstock (I am maintainer there too).

The problem is that given that there is no strict version constraint between jaxlib and jax (if I am not wrong), so how can you translate the constraint that a given jax version has in the corresponding jaxlib version? At the moment the check is on the jax side, so the most natural way to capture it would be to have a run_constrained constrain on the cudnn version, what do you think? What is the rationale for not having any cuda constraint in jax, if there is literally a cuda constraint check in the jax code?

I can also work with the jax team to move the dependency from jax to jaxlib so that it is much clearer this is a backend (jaxlib) dependency and not a wrapper (jax) dependency.

I am not familiar enough with jax/jaxlib to provide an opinion on this, but if indeed the part that interacts with cudnn is jaxlib, it could make sense to have the check there.

Now that the cudnn v9 PR is in, we should fix this and perhaps issue repodata patch soon

If https://github.com/conda-forge/conda-forge-pinning-feedstock/pull/6310 is merged soonish, we can wait for the migration PR, otherwise we could bump the cudnn version manually in a jaxlib PR.

For what regards the repodata, the only thing I think it could make sense to repodata patch is to add a run_constrain cudnn>=9.1.0 version in jax 0.4.30 and 0.4.31, that would act as a proxy for "jaxlib that has been built at least with cuda>=9.1.0, as anyhow jaxlib will have a run dependency on the given version of cudnn against which it has been compiled.

traversaro commented 3 weeks ago

At the moment the check is on the jax side, so the most natural way to capture it would be to have a run_constrained constrain on the cudnn version, what do you think? What is the rationale for not having any cuda constraint in jax, if there is literally a cuda constraint check in the jax code?

Ah, I think I understood the problem here. If you had a run_constrained in jax for cudnn, you can't install it with a different cudnn, even if you are just interested in the cpu functionality.

ngam commented 3 weeks ago

I think run_constrained is potentially a nice workaround. If with a given jax version cudnn is requested to be installed, it will ensure it obeys the the run_constrained condition. It won't impact cpu builds.

Btw, we do have two separate constraints between jaxlib and jax in conda-forge:

traversaro commented 3 weeks ago

I think run_constrained is potentially a nice workaround. If with a given jax version cudnn is requested to be installed, it will ensure it obeys the the run_constrained condition. It won't impact cpu builds.

The scenario I was imagining is that someone could have an environment with jax 0.4.31 with jaxlib with just cpu support, and let's say pytorch with cuda support and cudnn==8. If we had the run_exports this environment would stop working, that may not be intuitive. However, if we are able to fix jax + 0.4.31 + cuda this may be more important, so it is always a tradeoff.

traversaro commented 3 weeks ago

Btw, we do have two separate constraints between jaxlib and jax in conda-forge:

* in jax, we set a minimum (usually declared upstream) and more recently we started setting up a maximum that is equal to the jax version. These are _run_ dependencies, [link](https://github.com/conda-forge/jax-feedstock/blob/0228c9aeac76e8fa0193e818255a49c846aa25ba/recipe/meta.yaml#L32)

* in jaxlib, we set a run constraint on jax (which means, if jaxlib and jax are to be installed together, it must be obeyed), [link](https://github.com/conda-forge/jaxlib-feedstock/blob/3ddae8944376b1f0ececddac6d1298b1e790562d/recipe/meta.yaml#L89)

Cool, this makes the problem more clear, so the combination we need to worry that are affected by this are:

Due to the jax >= {{version}} run_constrained constrain in jaxlib, those jaxlib can't be installed with any other jax. So at this point the easiest thing is to mark those jaxlib cuda build (0.4.31 and 0.4.30) as broken? As they can only be used with jax==0.4.31, but jax requires cudnn >= 9.*, but the run constrain of those jaxlib constains cudnn >=8.9.7.29,<9.0a0 ?

We do not even need to wait for the cudnn==9 builds to mark those builds as broken, as already marking those as broken at least fixes the jax+cuda installation for people that install the matchspec jaxlib==*=*cuda*. I can open a PR to start doing that, we can continue the discussion there.

traversaro commented 3 weeks ago

I can open a PR to start doing that, we can continue the discussion there.

Done in https://github.com/conda-forge/admin-requests/pull/1050 . This will ensure that users that install jaxlib==*=*cuda* to get a cuda-enabled jax actually get a working jax+cuda. This will continue to install a cpu-only version of jax if one just installs conda install jax, to actually fix that we need instead to rebuild jaxlib with cudnn==9, see https://github.com/conda-forge/conda-forge-pinning-feedstock/pull/6310 .

ngam commented 1 week ago

@conda-forge-admin, please rerender feedstock

conda-forge-webservices[bot] commented 1 week ago

Hi! This is the friendly automated conda-forge-webservice.

I just wanted to let you know that I started rerendering the recipe in conda-forge/jax-feedstock#150.