-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
IPEX update to PyTorch 2.1 and Bundle-in MKL & DPCPP #1772
Conversation
This one look really nice, I'm using an Intel Arc A770 XPU and this should run a lot faster without the need for all the libs (and without setting ld_library to the correct version of the libs). But when I try to train a lora, i get a runtime error: Traceback (most recent call last): Which is correct... 2023-12-19 21:59:26.719764: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used. What am I missing? |
As i stated in the PR, sd-scripts dev branch is required but it's not merged into kohya_ss yet. You can replace the library/ipex folder from the sd-script dev branch. |
Thanks for your comment, I habe copied over the library/ipex folder as you suggested. Stack Trace and Params: 22:08:46-494555 INFO Start training LoRA Standard ... [Subset 0 of Dataset 0] [Subset 1 of Dataset 0] [Dataset 0] LIBXSMM_VERSION: main_stable-1.17-3651 (25693763) |
Run the gui.sh like this:
|
Memory leak is a known issue and happens on Linux too. I couldn't figure out where it comes from. IPEX itself has this issue too. Ipexrun reduces the leaks but it can cause errors in some systems like you had. |
This should fix the memory leaks: #1858 You can replicate it with exporting |
Needs the dev branch of sd-scripts. (This PR is needed: kohya-ss/sd-scripts#1003)
Updates IPEX and PyTorch to 2.1.
Training a LoRa is ~%50 faster compared to PyTorch 2.0 with IPEX.
Bunles-in MKL & DPCPP so we don't have to manually install the whole OneAPI BaseKit. (Saves 20GB of disk space.)
If you get a file not found error after this update, run
setup.sh --use-ipex
or activate your system OneAPI manually withsource /opt/intel/oneapi/setvars.sh
.Also a side note;
IPEX 2.1 should have proper Windows support but i don't have a device with Windows installed and i don't have much experience with .bat scripting either.
It would be nice if someone else steps in for adding --use-ipex to gui.bat and setup.bat. I don't plan to install Windows in the near future.