XPU Support #1072
Replies: 2 comments 4 replies
-
|
Are you planning to work on this? Or is this meant as a report that it doesn't work? |
Beta Was this translation helpful? Give feedback.
-
|
I have managed to make it work without breaking anything. should i create a pr? here is what i did -> XPU (Intel GPU) Integration Notes — ontrainer1. Clone IPEX bridge into module foldergit clone https://github.com/Disty0/ipex_to_cuda modules/ipex_to_cuda/
Make sure the path is: modules/ipex_to_cuda/src/ipex_to_cuda/init.py 2. Modify scripts/train_ui.pyAdd this block after importing torch, before any CUDA ops run: import torch
if [torch.xpu.is](http://torch.xpu.is/)_available():
from modules.ipex_to_cuda.src.ipex_to_cuda.__init__ import ipex_init
ipex_init()
print("✓ CUDA → XPU hijacking active")3. Fix modules/util/torch_util.pyFunction: def torch_gc(): Old code: if [torch.cuda.is](http://torch.cuda.is/)_available():
torch.cuda.empty_cache()
if torch_version > Version("2.6.0"):
torch._C._host_emptyCache()Replace with: if [torch.cuda.is](http://torch.cuda.is/)_available():
torch.cuda.empty_cache()
if torch_version > Version("2.6.0"):
# TODO: replace with a torch.cuda binding once that's available
if hasattr(torch._C, '_host_emptyCache'):
print("true")
torch._C._host_emptyCache()then i created conda environment with python3.11 and also installed then installed xpu with morei info at https://docs.pytorch.org/docs/main/notes/get_start_xpu.htmlWhy this matters:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This discussion is focused on tracking the progress for the implementation of XPU backend.
Testing platform:
Hardware
CPU AMD Ryzen 9 5900X x 24
RAM 32GB
GPU DG2 Intel ARC A770
Steps from Ubuntu 24.04 clean installation
Graphics Drivers & Compute Libraries Installation
https://dgpu-docs.intel.com/driver/client/overview.html
OneTrainer installation
Dependency needed
First Run
Dependency needed
Second Run
OneTrainer opens, model path and concepts configured for sd15.
Start Training
Beta Was this translation helpful? Give feedback.
All reactions