-
Notifications
You must be signed in to change notification settings - Fork 652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issues/30 Windows Compiling #127
issues/30 Windows Compiling #127
Conversation
…mports Add missing imports to adam
[FIX] passing of sparse in StableEmbedding
…orts Remove unused imports, fix NotImplementedError
Add `device` and `dtype` parameters to `StableEmbedding`
Import missing warn function
Everything required to compile for windows with cmake.
Batch script
Update readme.md with link to support ticket
Thanks for getting the ball rolling, this is exciting! I've been using bitsandbytes precompiled for CUDA 11.6 for a while but with the newer Lovelace cards we need 11.8 working properly, so getting the builds working would be great. Following along your example Windows_Compile_Howto.bat, everything works up until the actual compilation for me and then I get failures still. Building pthread worked. Errors in kernels.cu it looks like:
Entire output from clean to build Environment:
|
I installed 11.8 - and 12.0 to try, and got the same results as you. |
Okay thanks to your comment I was able to take this all the way to the end. There are still a few ugly steps to get the glue back in place, but at least the separate parts are on the right track.
Then I was able to instantiate This is with nightly Pytorch 2.0.0, CUDA 11.8, and cuDNN 8.7 so all the newest of the new, looking good. |
Great to hear it's working! |
comment out conda environment base req. Left as might be useful reference. Add note on how to target specific cuda version.
Can you upload CUDA 11.7 and 11.8 precompiled for windows? |
I would love if we could merge this. |
Up, I tried to compile it myself, but to no avail |
I have a working version on my github but I am still unsure how to add the runtime dll dependencies of the final bitsandbytes dll other than copying them to the same folder EDIT fixed |
I have this compiled but I am not sure why it is not using gpu compute but cpu. Any assistance would help: |
Bitsandbytes was not supported windows before, but my method can support windows.(yuhuang) 3 J:\StableDiffusion\sdwebui\py310\python.exe -m pip uninstall bitsandbytes-windows 4 J:\StableDiffusion\sdwebui\py310\python.exe -m pip install https://github.com/jllllll/bitsandbytes-windows-webui/releases/download/wheels/bitsandbytes-0.41.1-py3-none-win_amd64.whl Replace your SD venv directory file(python.exe Folder) here(J:\StableDiffusion\sdwebui\py310) |
Summary:
Added cmake files
Rename pythonInterface.c to pythonInterface.cpp
Added template<I, T> struct InstrFloatTraits { typedef T vec_t; }
Added #ifndef _MSC_VER to not include unistd.h when MSVC is the compiler used
Added batch script to run all steps to build - including downloading pthread dependency and building it. The only thing it doesn't do by itself is launch the visual studio build environment.
Modified Makefile for pythonInterface.c->.cpp rename
The change in ops.cu isn't necessary, it just removes the warning when compiling in release mode because assert is ignored in windows on release so it yells that the variable is never used.
NEEDS TESTING! Creating pull request to gain awareness, hopefully someone else can verify it works(specifically the batch script. I ran it by hand and copied to the script after. I haven't run the script alone yet.). Also, unsure of if InstrFloatTraits should be defined as above, or the way it is in the #30 issue..