Closed tvatter closed 1 month 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.
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?
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.
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"
To reproduce, here's an
environment.yml
:Note that this corresponds essentially to creating + activating the environment with Python 3.10, and then:
However, if the last line is instead replaced by
pip install bitsandbytes
, then everything works as expected.Installed packages
Environment info