Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

is it work on Win platform? #7

Open
Nehc opened this issue Oct 28, 2021 · 17 comments
Open

is it work on Win platform? #7

Nehc opened this issue Oct 28, 2021 · 17 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Nehc
Copy link

Nehc commented Oct 28, 2021

I am have OSError: [WinError 193] %1 is not a valid Win32 application in lib = ct.cdll.LoadLibrary(os.path.dirname(file) + '/libbitsandbytes.so') in functional.py. WAIDW?

@TimDettmers TimDettmers added bug Something isn't working help wanted Extra attention is needed labels Nov 15, 2021
@TimDettmers
Copy link
Contributor

Currently, Windows is not supported. I do not have access to Windows 10 and I am unable to help with this. It would be great to get help on this from someone on a Windows system. Would you be willing to help get bnb to work on Windows?

@jorahn
Copy link

jorahn commented Nov 24, 2021

I've taken a quick look at this e.g. here and here - but have not done such ports before. My initial thoughts are:

  • currently bitsandbytes loads libbitsandbytes.so which won't work on windows
  • under windows, this would need to be a .dll and likely to be provided in both 32bit and 64bit
  • the makefile / build system needs some changes to work under windows. e.g. nvcc and cuda might be fine, but gpp probably needs to be switched to visual studio and there are a couple of linux shell commands, that would need replacing.

I'm hesitant to investigate windows build systems from really huge projects (pytorch, sklearn, ...) because their scope seems way different. Are you aware of a project with similar scope as bitsandbytes and a working windows build system to use as an example?

@jorahn
Copy link

jorahn commented Nov 25, 2021

I've spent a bit more time looking at how DeepSpeed solves building on Windows. They make use of BuildExtension, CppExtension and CudaExtension from torch.utils.cpp_extension and this build process is run through python setup.py bdist_wheel, no Makefile.
Here is the Pytorch guide. Looking also at the Cuda Kernels in /csrc/*.cu his seems like a fit, but no idea if this is the best option.

@TimDettmers
Copy link
Contributor

Thanks @jorahn! What DeepSpeed is doing seems to be the canonical way to handle this. @TitusCornelius is currently working on a conda build and it might be useful to add this together with the conda build and fix at the same time Windows installation. @TitusCornelius any thoughts on how much work this would be?

@BrainSlugs83
Copy link

Any update on this?

@Titus-von-Koeller
Copy link

Hi @jorahn, hi all,

Hi all,
Sorry for the late reply, the first notification passed me by somehow.

Anyways, yes, I've spent some time on trying to automate the build, but so far it's just a repackaging of the pip package and that isn't even working due to two bugs in conda that I have yet to report.

Either way, I was planning to automate the Linux build as a parametrized Conda package (building everything from scratch), but Windows is not on my roadmap, unless I receive a contribution from one of you with a functioning Windows buildscript that I can then retool into the conda package install.

Let me know if you're interested in collaborating on this. I'll only start working on this again in three weeks though.

Kind regards,Titus

P.S. Thanks Jonathan, those seem like useful links for starting work on this, however, neither @TimDettmers nor I are planning to take the lead on the Windows build. Contributions, however, are highly appreciated and we'll try to support and get this implemented if we have your support.

P.P.S. Any future work will be done exclusively on https:/TimDettmers/bitsandbytes however.

@BrainSlugs83
Copy link

BrainSlugs83 commented Jul 20, 2022

I could try helping out in a week or so:

  • Either directly -- though I would need some guidance on what needs to be accomplished (and it would be kind of a "in my spare time" effort).

  • Or indirectly -- i.e. I could provide you with access to a Windows Machine (i.e. via VNC, RDP, or SSH -- pick your poison).

@noizu
Copy link

noizu commented Sep 1, 2022

I can furnish you with a Pro 10 license if it would help.

@BrainSlugs83
Copy link

@noizu -- looks like the future repo is here: https:/TimDettmers/bitsandbytes (according to his previous post).

@natureXD
Copy link

Excuse me, does this repository support Windows now?

@nikich340
Copy link

Excuse me, does this repository support Windows now?

Still not..

@natureXD
Copy link

Excuse me, does this repository support Windows now?

Still not..

Okay, thanks.

@whitepapercg
Copy link

Up. Windows support

@natureXD
Copy link

Okay, thanks very much. I'll try it later.

@ohUMR
Copy link

ohUMR commented Mar 24, 2023

I download the latest version which is 0.37.0, however, it does not support windows....

@Keith-Hon
Copy link

Keith-Hon commented Mar 31, 2023

I have made a bitsandbytes-windows lib so it could work on windows 10

bitsandbytes-foundation/bitsandbytes#175 (comment)

Simply install it via
pip install git+https:/Keith-Hon/bitsandbytes-windows.git

@BrainSlugs83
Copy link

Also this exists: https:/DeXtmL/bitsandbytes-win-prebuilt

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests