Skip to content

pip install of preview wheel uninstalls XPU PyTorch and replaces it with CUDA PyTorch #1912

@jiqing-feng

Description

@jiqing-feng

System Info

Environment

  • OS: Linux x86_64 (Ubuntu 24.04)
  • Python: 3.12
  • PyTorch: 2.11+xpu (XPU build, installed from Intel index)
  • bitsandbytes wheel: bitsandbytes-1.33.7.preview-py3-none-manylinux_2_24_x86_64.whl from continuous-release_main

Describe the bug

Installing the latest preview wheel from GitHub releases with --force-reinstall silently uninstalls the user's XPU PyTorch and replaces it with CUDA PyTorch from PyPI.

pip install --force-reinstall \
  https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-manylinux_2_24_x86_64.whl

The wheel metadata declares:

Requires-Dist: torch<3,>=2.3

When pip resolves this dependency with --force-reinstall, it pulls torch from the default PyPI index, which only hosts CUDA builds. This overwrites the XPU-flavored PyTorch (e.g. torch==2.7.0+xpu installed from https://pytorch-extension.intel.com/release-whl/stable/xpu/us/) with the CUDA variant.

Reproduction

pip install --force-reinstall
https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-manylinux_2_24_x86_64.whl

Expected behavior

Installing the bitsandbytes wheel should not replace an already-installed XPU PyTorch with the CUDA build. Users on XPU environments should be able to install bitsandbytes without losing their PyTorch backend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions