conda-forge / bitsandbytes-feedstock

A conda-smithy repository for bitsandbytes.
BSD 3-Clause "New" or "Revised" License
1 stars 4 forks source link

The installed version of bitsandbytes was compiled without GPU support #14

Closed tvatter closed 1 month ago

tvatter commented 4 months ago

Solution to issue cannot be found in the documentation.

Issue

The following code errors with "The installed version of bitsandbytes was compiled without GPU support"

import torch
from transformers import AutoModelForCausalLM, BitsAndBytesConfig

quantization_config = BitsAndBytesConfig(
  load_in_4bit=True,
  bnb_4bit_compute_dtype=torch.float16,
  bnb_4bit_quant_type="nf4",
  bnb_4bit_use_double_quant=True,
)

model_4bit = AutoModelForCausalLM.from_pretrained(
  "facebook/opt-350m", quantization_config=quantization_config
)

To reproduce, here's an environment.yml:

name: test_env
channels:
  - nvidia
  - pytorch
  - conda-forge
dependencies:
  - python=3.10
  - pytorch
  - torchvision
  - torchaudio
  - pytorch-cuda=11.8
  - transformers
  - accelerate
  - bitsandbytes

Note that this corresponds essentially to creating + activating the environment with Python 3.10, and then:

conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
conda install transformers accelerate
conda install bitsandbytes

However, if the last line is instead replaced by pip install bitsandbytes, then everything works as expected.

Installed packages

# packages in environment at /opt/conda/envs/test_env:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                  2_kmp_llvm    conda-forge
accelerate                0.31.0             pyhd8ed1ab_0    conda-forge
aiofiles                  23.2.1             pyhd8ed1ab_0    conda-forge
aiohttp                   3.9.5           py310h2372a71_0    conda-forge
aiosignal                 1.3.1              pyhd8ed1ab_0    conda-forge
aiostream                 0.5.2              pyhd8ed1ab_0    conda-forge
altair                    5.3.0              pyhd8ed1ab_0    conda-forge
annotated-types           0.7.0              pyhd8ed1ab_0    conda-forge
anyio                     4.4.0              pyhd8ed1ab_0    conda-forge
async-timeout             4.0.3              pyhd8ed1ab_0    conda-forge
attrs                     23.2.0             pyh71513ae_0    conda-forge
aws-c-auth                0.7.22               h96bc93b_2    conda-forge
aws-c-cal                 0.6.14               h88a6e22_1    conda-forge
aws-c-common              0.9.19               h4ab18f5_0    conda-forge
aws-c-compression         0.2.18               h83b837d_6    conda-forge
aws-c-event-stream        0.4.2               ha47c788_12    conda-forge
aws-c-http                0.8.1               h29d6fba_17    conda-forge
aws-c-io                  0.14.8               h21d4f22_5    conda-forge
aws-c-mqtt                0.10.4               h759edc4_4    conda-forge
aws-c-s3                  0.5.9                h594631b_3    conda-forge
aws-c-sdkutils            0.1.16               h83b837d_2    conda-forge
aws-checksums             0.1.18               h83b837d_6    conda-forge
aws-crt-cpp               0.26.9               he3a8b3b_0    conda-forge
aws-sdk-cpp               1.11.329             hba8bd5f_3    conda-forge
beautifulsoup4            4.12.3             pyha770c72_0    conda-forge
bitsandbytes              0.43.1          py310h8f3e6f0_0    conda-forge
blas                      1.0                         mkl    conda-forge
brotli                    1.1.0                hd590300_1    conda-forge
brotli-bin                1.1.0                hd590300_1    conda-forge
brotli-python             1.1.0           py310hc6cd4ac_1    conda-forge
bzip2                     1.0.8                hd590300_5    conda-forge
c-ares                    1.28.1               hd590300_0    conda-forge
ca-certificates           2024.6.2             hbcca054_0    conda-forge
catalogue                 2.0.10          py310hff52083_0    conda-forge
certifi                   2024.6.2           pyhd8ed1ab_0    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
click                     8.1.7           unix_pyh707e725_0    conda-forge
cloudpathlib              0.16.0             pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
confection                0.1.4           py310h17c5347_0    conda-forge
contourpy                 1.2.1           py310hd41b1e2_0    conda-forge
coverage                  7.5.3           py310hc51659f_0    conda-forge
cuda-cudart               11.8.89                       0    nvidia
cuda-cupti                11.8.87                       0    nvidia
cuda-libraries            11.8.0                        0    nvidia
cuda-nvrtc                11.8.89                       0    nvidia
cuda-nvtx                 11.8.86                       0    nvidia
cuda-runtime              11.8.0                        0    nvidia
cuda-version              12.5                 hd4f0392_3    conda-forge
cycler                    0.12.1             pyhd8ed1ab_0    conda-forge
cymem                     2.0.8           py310hc6cd4ac_1    conda-forge
cython-blis               0.7.10          py310h1f7b6fc_2    conda-forge
dataclasses-json          0.6.7              pyhd8ed1ab_0    conda-forge
datasets                  2.19.2             pyhd8ed1ab_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
deprecated                1.2.14             pyh1a96a4e_0    conda-forge
dill                      0.3.8              pyhd8ed1ab_0    conda-forge
dirtyjson                 1.0.8              pyhd8ed1ab_0    conda-forge
distro                    1.9.0              pyhd8ed1ab_0    conda-forge
exceptiongroup            1.2.0              pyhd8ed1ab_2    conda-forge
fastapi                   0.110.3            pyhd8ed1ab_0    conda-forge
ffmpeg                    4.3                  hf484d3e_0    pytorch
ffmpy                     0.3.0              pyhb6f538c_0    conda-forge
filelock                  3.14.0             pyhd8ed1ab_0    conda-forge
fonttools                 4.53.0          py310hc51659f_0    conda-forge
freetype                  2.12.1               h267a509_2    conda-forge
frozenlist                1.4.1           py310h2372a71_0    conda-forge
fsspec                    2024.3.1           pyhca7485f_0    conda-forge
gflags                    2.2.2             he1b5a44_1004    conda-forge
glog                      0.7.0                hed5481d_0    conda-forge
gmp                       6.3.0                h59595ed_1    conda-forge
gmpy2                     2.1.5           py310hc7909c9_1    conda-forge
gnutls                    3.6.13               h85f3911_1    conda-forge
gradio                    4.36.1             pyhd8ed1ab_0    conda-forge
gradio-client             1.0.1              pyhd8ed1ab_0    conda-forge
greenlet                  3.0.3           py310hc6cd4ac_0    conda-forge
h11                       0.14.0             pyhd8ed1ab_0    conda-forge
h2                        4.1.0              pyhd8ed1ab_0    conda-forge
hpack                     4.0.0              pyh9f0ad1d_0    conda-forge
httpcore                  1.0.5              pyhd8ed1ab_0    conda-forge
httpx                     0.27.0             pyhd8ed1ab_0    conda-forge
huggingface_hub           0.23.3             pyhd8ed1ab_0    conda-forge
hyperframe                6.0.1              pyhd8ed1ab_0    conda-forge
icu                       73.2                 h59595ed_0    conda-forge
idna                      3.7                pyhd8ed1ab_0    conda-forge
importlib-metadata        7.1.0              pyha770c72_0    conda-forge
importlib-resources       6.4.0              pyhd8ed1ab_0    conda-forge
importlib_resources       6.4.0              pyhd8ed1ab_0    conda-forge
iniconfig                 2.0.0              pyhd8ed1ab_0    conda-forge
jinja2                    3.1.4              pyhd8ed1ab_0    conda-forge
joblib                    1.4.2              pyhd8ed1ab_0    conda-forge
jpeg                      9e                   h166bdaf_2    conda-forge
jsonpath-ng               1.6.1              pyhd8ed1ab_0    conda-forge
jsonschema                4.22.0             pyhd8ed1ab_0    conda-forge
jsonschema-specifications 2023.12.1          pyhd8ed1ab_0    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
kiwisolver                1.4.5           py310hd41b1e2_1    conda-forge
krb5                      1.21.2               h659d440_0    conda-forge
lame                      3.100             h166bdaf_1003    conda-forge
langcodes                 3.4.0              pyhd8ed1ab_0    conda-forge
language-data             1.2.0              pyhd8ed1ab_0    conda-forge
lcms2                     2.15                 hfd0df8a_0    conda-forge
ld_impl_linux-64          2.40                 hf3520f5_3    conda-forge
lerc                      4.0.0                h27087fc_0    conda-forge
libabseil                 20240116.2      cxx17_h59595ed_0    conda-forge
libarrow                  16.1.0           hcb6531f_6_cpu    conda-forge
libarrow-acero            16.1.0           hac33072_6_cpu    conda-forge
libarrow-dataset          16.1.0           hac33072_6_cpu    conda-forge
libarrow-substrait        16.1.0           h7e0c224_6_cpu    conda-forge
libblas                   3.9.0            16_linux64_mkl    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            16_linux64_mkl    conda-forge
libcrc32c                 1.1.2                h9c3ff4c_0    conda-forge
libcublas                 11.11.3.6                     0    nvidia
libcufft                  10.9.0.58                     0    nvidia
libcufile                 1.10.0.4                      0    nvidia
libcurand                 10.3.6.39                     0    nvidia
libcurl                   8.8.0                hca28451_0    conda-forge
libcusolver               11.4.1.48                     0    nvidia
libcusparse               11.7.5.86                     0    nvidia
libdeflate                1.17                 h0b41bf4_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
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 13.2.0               h77fa898_7    conda-forge
libgfortran-ng            13.2.0               h69a702a_7    conda-forge
libgfortran5              13.2.0               hca663fb_7    conda-forge
libgoogle-cloud           2.24.0               h2736e30_0    conda-forge
libgoogle-cloud-storage   2.24.0               h3d9a0c8_0    conda-forge
libgrpc                   1.62.2               h15f2491_0    conda-forge
libhwloc                  2.10.0          default_h5622ce7_1001    conda-forge
libiconv                  1.17                 hd590300_2    conda-forge
libjpeg-turbo             2.0.0                h9bf148f_0    pytorch
liblapack                 3.9.0            16_linux64_mkl    conda-forge
libnghttp2                1.58.0               h47da74e_1    conda-forge
libnpp                    11.8.0.86                     0    nvidia
libnsl                    2.0.1                hd590300_0    conda-forge
libnvjpeg                 11.9.0.86                     0    nvidia
libparquet                16.1.0           h6a7eafb_6_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
libsqlite                 3.46.0               hde9e2c9_0    conda-forge
libssh2                   1.11.0               h0841786_0    conda-forge
libstdcxx-ng              13.2.0               hc0a3c3a_7    conda-forge
libthrift                 0.19.0               hb90f79a_1    conda-forge
libtiff                   4.5.0                h6adf6a1_2    conda-forge
libutf8proc               2.8.0                h166bdaf_0    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libwebp-base              1.4.0                hd590300_0    conda-forge
libxcb                    1.13              h7f98852_1004    conda-forge
libxcrypt                 4.4.36               hd590300_1    conda-forge
libxml2                   2.12.7               hc051c1a_1    conda-forge
libzlib                   1.2.13               h4ab18f5_6    conda-forge
llama-index               0.10.44            pyhecae5ae_0    conda-forge
llama-index-agent-openai  0.2.7              pyhd8ed1ab_0    conda-forge
llama-index-cli           0.1.11             pyhd8ed1ab_1    conda-forge
llama-index-core          0.10.44            pyhd8ed1ab_0    conda-forge
llama-index-embeddings-openai 0.1.10             pyhd8ed1ab_0    conda-forge
llama-index-indices-managed-llama-cloud 0.1.6              pyhd8ed1ab_0    conda-forge
llama-index-legacy        0.9.48             pyhd8ed1ab_0    conda-forge
llama-index-llms-openai   0.1.22             pyhd8ed1ab_0    conda-forge
llama-index-multi-modal-llms-openai 0.1.6              pyhd8ed1ab_0    conda-forge
llama-index-program-openai 0.1.6              pyhd8ed1ab_0    conda-forge
llama-index-question-gen-openai 0.1.3              pyhd8ed1ab_0    conda-forge
llama-index-readers-file  0.1.22             pyhd8ed1ab_0    conda-forge
llama-index-readers-llama-parse 0.1.4              pyhd8ed1ab_1    conda-forge
llama-parse               0.4.4              pyhd8ed1ab_0    conda-forge
llamaindex-py-client      0.1.19             pyhd8ed1ab_0    conda-forge
llvm-openmp               15.0.7               h0cdce71_0    conda-forge
lz4-c                     1.9.4                hcb278e6_0    conda-forge
marisa-trie               1.1.0           py310hc6cd4ac_1    conda-forge
markdown-it-py            3.0.0              pyhd8ed1ab_0    conda-forge
markupsafe                2.1.5           py310h2372a71_0    conda-forge
marshmallow               3.21.3             pyhd8ed1ab_0    conda-forge
matplotlib-base           3.8.4           py310hef631a5_2    conda-forge
mdurl                     0.1.2              pyhd8ed1ab_0    conda-forge
mkl                       2022.2.1         h84fe81f_16997    conda-forge
mpc                       1.3.1                hfe3b2da_0    conda-forge
mpfr                      4.2.1                h9458935_1    conda-forge
mpmath                    1.3.0              pyhd8ed1ab_0    conda-forge
multidict                 6.0.5           py310h2372a71_0    conda-forge
multiprocess              0.70.16         py310h2372a71_0    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
murmurhash                1.0.10          py310hc6cd4ac_1    conda-forge
mypy                      1.10.0          py310hc51659f_0    conda-forge
mypy_extensions           1.0.0              pyha770c72_0    conda-forge
ncurses                   6.5                  h59595ed_0    conda-forge
nest-asyncio              1.6.0              pyhd8ed1ab_0    conda-forge
nettle                    3.6                  he412f7d_0    conda-forge
networkx                  3.3                pyhd8ed1ab_1    conda-forge
nltk                      3.8.1              pyhd8ed1ab_0    conda-forge
numpy                     1.26.4          py310hb13e2d6_0    conda-forge
openai                    1.33.0             pyhd8ed1ab_0    conda-forge
openh264                  2.1.1                h780b84a_0    conda-forge
openjpeg                  2.5.0                hfec8fc6_2    conda-forge
openssl                   3.3.1                h4ab18f5_0    conda-forge
orc                       2.0.1                h17fec99_1    conda-forge
orjson                    3.10.4          py310he421c4c_0    conda-forge
packaging                 24.1               pyhd8ed1ab_0    conda-forge
pandas                    2.2.2           py310hf9f9076_1    conda-forge
pillow                    9.4.0           py310h023d228_1    conda-forge
pip                       24.0               pyhd8ed1ab_0    conda-forge
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_1    conda-forge
pluggy                    1.5.0              pyhd8ed1ab_0    conda-forge
ply                       3.11               pyhd8ed1ab_2    conda-forge
preshed                   3.0.9           py310hc6cd4ac_1    conda-forge
psutil                    5.9.8           py310h2372a71_0    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
pyarrow                   16.1.0          py310h17c5347_1    conda-forge
pyarrow-core              16.1.0          py310h6f79a3a_1_cpu    conda-forge
pyarrow-hotfix            0.6                pyhd8ed1ab_0    conda-forge
pydantic                  2.7.3              pyhd8ed1ab_0    conda-forge
pydantic-core             2.18.4          py310he421c4c_0    conda-forge
pydub                     0.25.1             pyhd8ed1ab_0    conda-forge
pygments                  2.18.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.1.2              pyhd8ed1ab_0    conda-forge
pypdf                     4.2.0              pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
pytest                    8.2.2              pyhd8ed1ab_0    conda-forge
pytest-cov                5.0.0              pyhd8ed1ab_0    conda-forge
python                    3.10.14         hd12c33a_0_cpython    conda-forge
python-dateutil           2.9.0              pyhd8ed1ab_0    conda-forge
python-dotenv             1.0.1              pyhd8ed1ab_0    conda-forge
python-multipart          0.0.9              pyhd8ed1ab_0    conda-forge
python-tzdata             2024.1             pyhd8ed1ab_0    conda-forge
python-xxhash             3.4.1           py310h2372a71_0    conda-forge
python_abi                3.10                    4_cp310    conda-forge
pytorch                   2.3.1           py3.10_cuda11.8_cudnn8.7.0_0    pytorch
pytorch-cuda              11.8                 h7e8668a_5    pytorch
pytorch-mutex             1.0                        cuda    pytorch
pytz                      2024.1             pyhd8ed1ab_0    conda-forge
pyyaml                    6.0.1           py310h2372a71_1    conda-forge
re2                       2023.09.01           h7f4b329_2    conda-forge
readline                  8.2                  h8228510_1    conda-forge
referencing               0.35.1             pyhd8ed1ab_0    conda-forge
regex                     2024.5.15       py310hc51659f_0    conda-forge
requests                  2.32.3             pyhd8ed1ab_0    conda-forge
rich                      13.7.1             pyhd8ed1ab_0    conda-forge
rpds-py                   0.18.1          py310he421c4c_0    conda-forge
ruff                      0.4.8           py310h9065425_0    conda-forge
s2n                       1.4.15               he19d79f_0    conda-forge
safetensors               0.4.3           py310hcb5633a_0    conda-forge
scipy                     1.13.1          py310h93e2701_0    conda-forge
semantic_version          2.10.0             pyhd8ed1ab_0    conda-forge
setuptools                70.0.0             pyhd8ed1ab_0    conda-forge
shellingham               1.5.4              pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
smart_open                6.4.0              pyhd8ed1ab_0    conda-forge
snappy                    1.2.0                hdb0a2a9_1    conda-forge
sniffio                   1.3.1              pyhd8ed1ab_0    conda-forge
soupsieve                 2.5                pyhd8ed1ab_1    conda-forge
spacy                     3.7.4           py310h256d06d_0    conda-forge
spacy-legacy              3.0.12             pyhd8ed1ab_0    conda-forge
spacy-loggers             1.0.5              pyhd8ed1ab_0    conda-forge
sqlalchemy                2.0.30          py310hc51659f_0    conda-forge
srsly                     2.4.8           py310hc6cd4ac_1    conda-forge
starlette                 0.37.2             pyhd8ed1ab_0    conda-forge
striprtf                  0.0.26             pyhd8ed1ab_0    conda-forge
sympy                     1.12            pypyh9d50eac_103    conda-forge
tbb                       2021.12.0            h297d8ca_1    conda-forge
tenacity                  8.3.0              pyhd8ed1ab_0    conda-forge
thinc                     8.2.3           py310h256d06d_0    conda-forge
tiktoken                  0.7.0           py310ha058ca7_0    conda-forge
tk                        8.6.13          noxft_h4845f30_101    conda-forge
tokenizers                0.19.1          py310h320607d_0    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tomlkit                   0.12.0             pyha770c72_0    conda-forge
toolz                     0.12.1             pyhd8ed1ab_0    conda-forge
torchaudio                2.3.1               py310_cu118    pytorch
torchtriton               2.3.1                     py310    pytorch
torchvision               0.18.1              py310_cu118    pytorch
tqdm                      4.66.4             pyhd8ed1ab_0    conda-forge
transformers              4.41.2             pyhd8ed1ab_0    conda-forge
typer                     0.9.4              pyhd8ed1ab_0    conda-forge
types-futures             3.3.8              pyhd8ed1ab_0    conda-forge
types-protobuf            4.25.0.20240417    pyhd8ed1ab_0    conda-forge
typing-extensions         4.12.2               hd8ed1ab_0    conda-forge
typing_extensions         4.12.2             pyha770c72_0    conda-forge
typing_inspect            0.9.0              pyhd8ed1ab_0    conda-forge
tzdata                    2024a                h0c530f3_0    conda-forge
unicodedata2              15.1.0          py310h2372a71_0    conda-forge
urllib3                   2.2.1              pyhd8ed1ab_0    conda-forge
uvicorn                   0.30.1          py310hff52083_0    conda-forge
wasabi                    1.1.2           py310hff52083_1    conda-forge
weasel                    0.3.4              pyhd8ed1ab_0    conda-forge
websockets                11.0.3          py310h2372a71_1    conda-forge
wheel                     0.43.0             pyhd8ed1ab_1    conda-forge
wrapt                     1.16.0          py310h2372a71_0    conda-forge
xorg-libxau               1.0.11               hd590300_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xxhash                    0.8.2                hd590300_0    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
yaml                      0.2.5                h7f98852_2    conda-forge
yarl                      1.9.4           py310h2372a71_0    conda-forge
zipp                      3.19.2             pyhd8ed1ab_0    conda-forge
zlib                      1.2.13               h4ab18f5_6    conda-forge
zstd                      1.5.6                ha6fb4c9_0    conda-forge

Environment info

active environment : test_env
    active env location : /opt/conda/envs/test_env
            shell level : 1
       user config file : /home/ec2-user/.condarc
 populated config files : /opt/conda/.condarc
                          /home/ec2-user/.condarc
          conda version : 22.11.1
    conda-build version : not installed
         python version : 3.10.9.final.0
       virtual packages : __archspec=1=x86_64
                          __cuda=12.2=0
                          __glibc=2.26=0
                          __linux=5.10.217=0
                          __unix=0=0
       base environment : /opt/conda  (writable)
      conda av data dir : /opt/conda/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://aws-ml-conda.s3.us-west-2.amazonaws.com/linux-64
                          https://aws-ml-conda.s3.us-west-2.amazonaws.com/noarch
                          https://conda.anaconda.org/nvidia/linux-64
                          https://conda.anaconda.org/nvidia/noarch
                          https://conda.anaconda.org/pytorch/linux-64
                          https://conda.anaconda.org/pytorch/noarch
          package cache : /opt/conda/pkgs
                          /home/ec2-user/.conda/pkgs
       envs directories : /opt/conda/envs
                          /home/ec2-user/.conda/envs
               platform : linux-64
             user-agent : conda/22.11.1 requests/2.28.2 CPython/3.10.9 Linux/5.10.217-205.860.amzn2.x86_64 amzn/2 glibc/2.26
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False
iamthebot commented 2 months ago

This is actually an issue even not using the nvidia channel. Purely using conda-forge we see:

mamba install pytorch transformers bitsandbytes
  + libtorch                                 2.3.1  cuda120_h2b0da52_300       conda-forge     Cached
  + pytorch                                  2.3.1  cuda120_py311hf6aebf0_300  conda-forge     Cached
  + bitsandbytes                            0.43.3  cpu_py311hd673f54_0        conda-forge     Cached

Oddly other packages respect CONDA_OVERRIDE_CUDA=12 but it doesn't seem to affect this one.

jayqi commented 1 month ago

Something seems to be wrong with the build process for this package.

We tried installing 0.43.3-cuda118_py310h43b5766_0 and got a similar error:

Could not find the bitsandbytes CUDA binary at PosixPath('/code_execution/.pixi/envs/gpu/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cuda118.so')

I went and manually downloaded the bitsandbytes-0.43.3-cuda118_py310h43b5766_0.conda package archive from the conda-forge repo on Anaconda (https://anaconda.org/conda-forge/bitsandbytes/files) and unarchived it:

❯ unzip bitsandbytes-0.43.3-cuda118_py310h43b5766_0.conda
Archive:  bitsandbytes-0.43.3-cuda118_py310h43b5766_0.conda
 extracting: metadata.json
 extracting: pkg-bitsandbytes-0.43.3-cuda118_py310h43b5766_0.tar.zst
 extracting: info-bitsandbytes-0.43.3-cuda118_py310h43b5766_0.tar.zst

❯ tar --zstd -xvf pkg-bitsandbytes-0.43.3-cuda118_py310h43b5766_0.tar.zst

and I see:

x lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so

So it seems like the CUDA packages are being built as CPU-only packages.

@xhochy I believe you're the maintainer of this feedstock. Can you please take a look at this?

iamthebot commented 1 month ago

OK, I can confirm the above PR fixes the error (at least on a Python 3.12 CUDA 12 build I tested locally) given @tvatter 's original code.