question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing Windows support

See original GitHub issue

Currently, the library uses precompiled Linux binaries. I am unsure how compatible these are with standard PyTorch installs on Windows. It might be that the binaries need to be compiled against mingw32/64 to create functional binaries for Windows.

The most helpful would be a case where a person is able to compile from source and use the library. This will require altering the Makefile file. If this works, we can add instructions on compiling for Windows as a first step before doing a full-scale Windows deployment of binaries on pip.

Since I do not have a Windows machine, any help is wanted on this!

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:17

github_iconTop GitHub Comments

18reactions
DeXtmLcommented, Sep 26, 2022

After some really tedious debugging and tackling various hidden problems, I managed to compile the whole module. This is the end result: https://github.com/DeXtmL/bitsandbytes-win-prebuilt

The binaries are compiled against CUDAToolkit 11.6 and Visual Studio 2022. I am able to make inferences nearly identical to “normal” fp16 version. So this is kind of a confirmation for “it works” shout-out. No vigorous testing was conducted though. @TimDettmers Finally, the “cuda_setup” part of the source code is entirely incompatible with Windows, there are loads of hardcoded routines; so I used a quick makeshift patch instead of making it proper, that’s also why I’m not posting my changes or making PR for now. If you are eager to test:

in cuda_setup/main.py:
make evaluate_cuda_setup() always return "libbitsandbytes_cuda116.dll"
in ./cextension.py:
change ct.cdll.LoadLibrary(binary_path) to ct.cdll.LoadLibrary(str(binary_path))

That should do the trick.

Hopefully this can help someone in the Windows territory; let’s hope the official windows support come fast.

2reactions
PinPointPingcommented, Nov 3, 2022

After some really tedious debugging and tackling various hidden problems, I managed to compile the whole module. This is the end result: https://github.com/DeXtmL/bitsandbytes-win-prebuilt The binaries are compiled against CUDAToolkit 11.6 and Visual Studio 2022. I am able to make inferences nearly identical to “normal” fp16 version. So this is kind of a confirmation for “it works” shout-out. No vigorous testing was conducted though. @TimDettmers Finally, the “cuda_setup” part of the source code is entirely incompatible with Windows, there are loads of hardcoded routines; so I used a quick makeshift patch instead of making it proper, that’s also why I’m not posting my changes or making PR for now. If you are eager to test:

in cuda_setup/main.py:
make evaluate_cuda_setup() always return "libbitsandbytes_cuda116.dll"
in ./cextension.py:
change ct.cdll.LoadLibrary(binary_path) to ct.cdll.LoadLibrary(str(binary_path))

That should do the trick. Hopefully this can help someone in the Windows territory; let’s hope the official windows support come fast.

Where do you put the pre-built file to activate adam?

You put them in site-packages\bitsandbytes

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use the System File Checker tool to repair missing or ...
Describes how to use the System File Checker tool to troubleshoot missing or corrupted system files in Windows 8.1, Windows 8, Windows 7...
Read more >
"Operating System Not Found" or "Missing ... - Microsoft Support
Describes issues that can cause your Windows XP-based computer not to start and advanced troubleshooting methods to resolve these issues.
Read more >
How do i fix Missing Services in Windows Service Integrity?
Method 1: The Article describes how to use the System File Checker tool (SFC.exe) to troubleshoot missing or corrupted system files on Windows...
Read more >
How to Fix Windows Update Service Missing in Windows 10
1. Download the Windows update . · 2. Double click on the downloaded . · 3. When prompted, click Yes, and OK. ·...
Read more >
Automatically get recommended drivers and updates for your ...
You can have Windows automatically download recommended drivers and detailed information for your hardware and devices. This is a good way to make...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found