bitsandbytes
bitsandbytes copied to clipboard
is it work on Win platform?
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?
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?
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?
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.
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?
Any update on this?
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://github.com/TimDettmers/bitsandbytes however.
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).
I can furnish you with a Pro 10 license if it would help.
@noizu -- looks like the future repo is here: https://github.com/TimDettmers/bitsandbytes (according to his previous post).
Excuse me, does this repository support Windows now?
Excuse me, does this repository support Windows now?
Still not..
Excuse me, does this repository support Windows now?
Still not..
Okay, thanks.
Up. Windows support
Okay, thanks very much. I'll try it later.
I download the latest version which is 0.37.0, however, it does not support windows....
I have made a bitsandbytes-windows lib so it could work on windows 10
https://github.com/TimDettmers/bitsandbytes/issues/175#issuecomment-1488003048
Simply install it via pip install git+https://github.com/Keith-Hon/bitsandbytes-windows.git
Also this exists: https://github.com/DeXtmL/bitsandbytes-win-prebuilt