Skip to content

Commit

Permalink
1.3.0.1 Support ipex built with oneAPI 2025.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlGao4 committed Jan 13, 2025
1 parent 8e73db2 commit fa34a3d
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 18 deletions.
4 changes: 2 additions & 2 deletions GUI/GuiMain.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.3"
__version__ = "1.3.0.1"

LICENSE = f"""Demucs-GUI {__version__}
Copyright (C) 2022-2024 Demucs-GUI developers
Expand Down Expand Up @@ -551,7 +551,7 @@ def restart(self):

def ask_AOT(self, *, open_from_menu=True):
intel_gpus = []
ipex_version = separator.ipex.__version__.split("+", 1)[0] if separator.ipex is not None else None
ipex_version = separator.ipex.__version__ if separator.ipex is not None else None
if not find_device_win.ipex_version_available(ipex_version):
if open_from_menu:
self.m.warning(
Expand Down
118 changes: 107 additions & 11 deletions GUI/find_device_win.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

# These mappings are generated with ocloc.exe, I ran from 0x0000 to 0xFFFF and found all supported devices
PCI_Mappings = {
"2.1.10": {
"2.1.10+xpu": {
"12.0.0": {"9A40", "9A49", "9A59", "9A60", "9A68", "9A70", "9A78", "FF20"},
"12.1.0": {"4C80", "4C8A", "4C8B", "4C8C", "4C90", "4C9A"},
"12.2.0": {
Expand Down Expand Up @@ -81,7 +81,7 @@
"12.58.0": {"4F8C", "5698", "5699", "569A", "56A7", "56A8"},
"12.59.0": {"4F89", "56A9", "56AA"},
},
"2.1.30": {
"2.1.30+xpu": {
"12.0.0": {"9A40", "9A49", "9A59", "9A60", "9A68", "9A70", "9A78", "FF20"},
"12.1.0": {"4C80", "4C8A", "4C8B", "4C8C", "4C90", "4C9A"},
"12.2.0": {
Expand Down Expand Up @@ -151,7 +151,7 @@
"12.70.4": {"7D40", "7D45", "7D60", "7D67"},
"12.71.4": {"7D55", "7DD5"},
},
"2.1.40": {
"2.1.40+xpu": {
"12.0.0": {"9A40", "9A49", "9A59", "9A60", "9A68", "9A70", "9A78", "FF20"},
"12.1.0": {"4C80", "4C8A", "4C8B", "4C8C", "4C90", "4C9A"},
"12.2.0": {
Expand Down Expand Up @@ -247,15 +247,111 @@
"20.2.0": {"E220", "E221", "E222"},
"20.4.4": {"6420", "64A0", "64B0"},
},
"2.1.40+xpu.2025.0.1": {
"12.0.0": {"9A40", "9A49", "9A59", "9A60", "9A68", "9A70", "9A78"},
"12.1.0": {"4C80", "4C8A", "4C8B", "4C8C", "4C90", "4C9A"},
"12.2.0": {
"4680",
"4682",
"4688",
"468A",
"468B",
"4690",
"4692",
"4693",
"A780",
"A781",
"A782",
"A783",
"A788",
"A789",
"A78A",
"A78B",
},
"12.3.0": {
"4626",
"4628",
"462A",
"46A0",
"46A1",
"46A3",
"46A6",
"46A8",
"46AA",
"46B0",
"46B1",
"46B3",
"46C0",
"46C1",
"46C3",
"A720",
"A721",
"A7A0",
"A7A1",
"A7A8",
"A7A9",
"A7AA",
"A7AB",
"A7AC",
"A7AD",
},
"12.4.0": {"46D0", "46D1", "46D2", "46D3", "46D4"},
"12.10.0": {"4905", "4906", "4907", "4908", "4909"},
"12.55.8": {
"4F80",
"4F81",
"4F82",
"4F83",
"4F84",
"5690",
"5691",
"5692",
"56A0",
"56A1",
"56A2",
"56BE",
"56BF",
"56C0",
"56C2",
},
"12.56.5": {
"4F87",
"4F88",
"5693",
"5694",
"5695",
"56A5",
"56A6",
"56B0",
"56B1",
"56BA",
"56BB",
"56BC",
"56BD",
"56C1",
},
"12.57.0": {"4F85", "4F86", "5696", "5697", "56A3", "56A4", "56B2", "56B3"},
"12.60.1": {"0BD0"},
"12.60.7": {"0B69", "0B6E", "0BD5", "0BD6", "0BD7", "0BD8", "0BD9", "0BDA", "0BDB"},
"12.61.7": {"0BD4"},
"12.70.4": {"7D40", "7D41", "7D45", "7D67"},
"12.71.4": {"7D55", "7DD5"},
"12.74.4": {"7D51", "7DD1", "B640"},
"20.1.0": {"E202", "E20B", "E20C", "E20D", "E210", "E212", "E214", "E215", "E216", "E217"},
"20.2.0": {"E220", "E221", "E222", "E223"},
"20.4.4": {"6420", "64A0", "64B0"},
},
}

AOT_link_fmt = {
"2.1.10": "https://www.fosshub.com/Demucs-GUI-old.html?dwl={file}",
"2.1.30": "https://www.fosshub.com/Demucs-GUI-old.html?dwl={file}",
"2.1.40": "https://github.com/CarlGao4/ipex-wheel/releases/download/v2.1.40%2Bxpu-cp311/2.1.40+xpu-AOT.7z",
"2.1.10+xpu": "https://www.fosshub.com/Demucs-GUI-old.html?dwl={file}",
"2.1.30+xpu": "https://www.fosshub.com/Demucs-GUI-old.html?dwl={file}",
"2.1.40+xpu": "https://github.com/CarlGao4/ipex-wheel/releases/download/v2.1.40%2Bxpu-cp311/2.1.40+xpu-AOT.7z",
"2.1.40+xpu.2025.0.1": "https://github.com/CarlGao4/ipex-wheel/releases/download/"
"v2.1.40%2Bxpu.2025.0.1-cp311/2.1.40+xpu.2025.0.1-AOT.7z",
}
AOT_links = {
"2.1.10": {
"2.1.10+xpu": {
"12.0.0": "12.0.0_tgl_tgllp.7z",
"12.1.0": "12.1.0_rkl.7z",
"12.2.0": "12.2.0_adl-s.7z",
Expand All @@ -273,7 +369,7 @@
"12.58.0": "12.58.0_acm-g20_dg2-g20.7z",
"12.59.0": "12.59.0_acm-g21_dg2-g21.7z",
},
"2.1.30": {
"2.1.30+xpu": {
"12.0.0": "12.0.0_2.1.30.7z",
"12.1.0": "12.1.0_2.1.30.7z",
"12.2.0": "12.2.0_2.1.30.7z",
Expand Down Expand Up @@ -353,7 +449,7 @@
has_Intel = True


def is_intel_supported(vendor, device, ipex_version="2.1.10"):
def is_intel_supported(vendor, device, ipex_version="2.1.10+xpu"):
if vendor != "8086":
return
if ipex_version not in PCI_Mappings:
Expand All @@ -367,13 +463,13 @@ def is_intel_supported(vendor, device, ipex_version="2.1.10"):
return False


def get_download_link(version, ipex_version="2.1.10"):
def get_download_link(version, ipex_version="2.1.10+xpu"):
if ipex_version not in AOT_link_fmt:
return None
return AOT_link_fmt[ipex_version].format(file=AOT_links.get(ipex_version, {}).get(version, ""))


def ipex_version_available(ipex_version="2.1.10"):
def ipex_version_available(ipex_version="2.1.10+xpu"):
return ipex_version in PCI_Mappings


Expand Down
39 changes: 36 additions & 3 deletions MKL-AOT.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,47 @@

The official package of IPEX (Intel Extension for Pytorch) is not built with AOT (Ahead-Of-Time), with only JIT (Just-In-Time) support (Demucs-GUI release is also packed with this package). This means that the first separation operation each time you start Demucs-GUI will take a long time (normally more than 5 minutes) to compile the model if you use Intel GPU. Please note that if you restart Demucs-GUI, the model will be recompiled again. JIT may also fails sometimes. This is when you need to restart Demucs-GUI.

This is because AOT binaries have to be compiled separately for each GPU architecture, and including all architectures (actually, 16) will make the package too large (20GB+). But I've built the AOT binaries separately for each architecture and uploaded them to FossHUB.
This is because AOT binaries have to be compiled separately for each GPU architecture, and including all architectures will make the package too large (20GB+). But I've built the AOT binaries separately for each architecture and uploaded them to FossHUB.

I've built different versions of `intel_extension_for_pytorch`. The binaries are built for `Windows x86_64`, `Python 3.11`. Demucs-GUI 1.1a2 to 1.2a1 are packed with `torch 2.1.0a0+git7bcf7da` (patched by Intel), `intel_extension_for_pytorch 2.1.10+git45400a8`, while from 1.2b1 it will be packed with `torch 2.1.0` and `intel_extension_for_pytorch 2.1.30+xpu`, and from 1.3a1 it will be packed with `intel_extension_for_pytorch 2.1.40+xpu`. You can also install `2.1.30+xpu` and `2.1.40+xpu` from [my own redistribution GitHub repo](https://github.com/CarlGao4/ipex-wheel/releases). Support list of each version is shown below. Please note that the support list is not associated with the version of Demucs-GUI, but the version of `intel_extension_for_pytorch`. It just means that the version of Demucs-GUI is packed with the corresponding version of `intel_extension_for_pytorch`. If you are running from source code, you can actually use any version of `intel_extension_for_pytorch` as long as it is compatible with your GPU.
I've built different versions of `intel_extension_for_pytorch`. The binaries are built for `Windows x86_64`, `Python 3.11`. Demucs-GUI 1.1a2 to 1.2a1 are packed with `torch 2.1.0a0+git7bcf7da` (patched by Intel), `intel_extension_for_pytorch 2.1.10+git45400a8`, while from 1.2b1 it will be packed with `torch 2.1.0` and `intel_extension_for_pytorch 2.1.30+xpu`, and from 1.3a1 it will be packed with `intel_extension_for_pytorch 2.1.40+xpu`. You can also install `2.1.30+xpu` and `2.1.40+xpu` from [my own redistribution GitHub repo](https://github.com/CarlGao4/ipex-wheel/releases), then from 1.3.0.1 it will be packed with `intel_extension_for_pytorch 2.1.40+xpu.2025.0.1`. Support list of each version is shown below. Please note that the support list is not associated with the version of Demucs-GUI, but the version of `intel_extension_for_pytorch`. It just means that the version of Demucs-GUI is packed with the corresponding version of `intel_extension_for_pytorch`. If you are running from source code, you can actually use any version of `intel_extension_for_pytorch` as long as it is compatible with your GPU.

The table is generated by running `ocloc.exe` with argument device from 0x0000 to 0xFFFF. Theroetically, all these GPUs should be supported (even if they are not released yet) and even some unlisted GPUs can be supported.

## Install AOT enabled IPEX (Windows only, CPython 3.11) version 2.1.40+xpu.2025.0.1 (Demucs-GUI 1.3.0.1 and later)

## Install AOT enabled IPEX (Windows only, CPython 3.11) version 2.1.40+xpu (Demucs-GUI 1.3a1 and later)
1. Install Intel graphics driver greater than or equal to `31.0.101.4953` (Windows) from [official website](https://www.intel.com/content/www/us/en/download/785597/792980/intel-arc-iris-xe-graphics-windows.html).
2. Run Demucs-GUI greater than or equal to `1.3.0.1`. If any Intel GPU is detected, you will be able to see an option in the menu bar `About -> About AOT`. Click it and you will see a dialog asking you whether to download an AOT build or open the documentation (this page). If you started Demucs-GUI with IPEX enabled but with JIT only on Windows, the dialog will also appear. If the build doesn't have Intel GPU support, the dialog will show up with warning.
3. Just click on download button and your browser will download a 7z file from GitHub. Or, use this [direct link](https://github.com/CarlGao4/ipex-wheel/releases/download/v2.1.40%2Bxpu.2025.0.1-cp311/2.1.40+xpu.2025.0.1-AOT.7z). The file is about 319MB.
4. Do not extract the downloaded 7z file immediately because it would require 24.8GB of disk space and you don't need all of the files. Instead, look at the desire version in Demucs-GUI's About AOT dialog or look up the PCI ID of your GPU in the table below. Then extract the corresponding folder in the 7z file to `C:\Demucs-GUI\intel_extension_for_pytorch\bin`, replacing the existing `intel-ext-pt-gpu.dll` file. If multiple generations are listed, it means I can't determine the exact generation code from the device ID, so you will need to try them one by one.
5. Try separating again! The first-time separation will no longer take a long time. If it still takes a long time, please try other versions of AOT build.

Following GPUs are supported with `2.1.40+xpu.2025.0.1` (for details, please see [find_device_win.py](GUI/find_device_win.py)):
| PCI ID (Only the device part) | Codename | Architecture | Generation Code | Display Name |
| ----------------------------- | -------- | ------------ | --------------- | ------------ |
| `9A40` `9A49` `9A59` `9A60` `9A68` `9A70` `9A78` | Tiger Lake (`tgl` `tgllp`) | Xe | `12.0.0` | `Intel® UHD Graphics` `Intel® Iris® Xe Graphics` |
| `4C80` `4C8A` `4C8B` `4C8C` `4C90` `4C9A` | Rocket Lake (`rkl`) | Xe | `12.1.0` | `Intel® UHD Graphics` `Intel® UHD Graphics 750` `Intel® UHD Graphics 730` `Intel® UHD Graphics P750` |
| `4680` `4682` `4688` `468A` `468B` `4690` `4692` `4693` `A780` `A781` `A782` `A783` `A788` `A789` `A78A` `A78B` | Alder Lake-S (`adl-s`), Raptor Lake-S (`rpl-s`) | Xe | `12.2.0` | `Intel® UHD Graphics` `Intel® UHD Graphics 770` `Intel® UHD Graphics 730` `Intel® UHD Graphics 710` |
| `4626` `4628` `462A` `46A0` `46A1` `46A3` `46A6` `46A8` `46AA` `46B0` `46B1` `46B3` `46C0` `46C1` `46C3` `A720` `A721` `A7A0` `A7A1` `A7A8` `A7A9` `A7AA` `A7AB` `A7AC` `A7AD` | Alder Lake-P (`adl-p`), Raptor Lake-P (`rpl-p`) | Xe | `12.3.0` | `Intel® UHD Graphics` `Intel® Iris® Xe Graphics` `Intel® Graphics` |
| `46D0` `46D1` `46D2` `46D3` `46D4` | Alder Lake-N (`adl-n`) | Xe | `12.4.0` | `Intel® UHD Graphics` `Intel® Graphics` |
| `4905` `4906` `4907` `4908` `4909` | DG1 (`dg1`) | Xe | `12.10.0` | `Intel® Iris® Xe MAX Graphics` `Iris® Xe® Pod` `Intel Server GPU SG-18M` `Intel® Iris® Xe Graphics` `Intel® Iris® Xe MAX 100 Graphics` |
| `4F80` `4F81` `4F82` `4F83` `4F84` `5690` `5691` `5692` `56A0` `56A1` `56A2` `56BE` `56BF` `56C0` `56C2` | Alchemist (`acm-g10` `ats-m150` `dg2` `dg2-g10-a0` `dg2-g10-a1` `dg2-g10-b0` `dg2-g10-c0`) | Xe-HPG | `12.55.0` `12.55.1` `12.55.4` `12.55.8` | `Intel® Iris® Xe Graphics` `Intel® Arc™ A770M Graphics` `Intel® Arc™ A730M Graphics` `Intel® Arc™ A550M Graphics` `Intel® Arc™ A770 Graphics` `Intel® Arc™ A750 Graphics` `Intel® Arc ™ A580 Graphics` `Intel® Arc™ A750E Graphics` `Intel® Arc™ A580E Graphics` `Intel® Data Center GPU Flex 170` `Intel® Data Center GPU Flex 170V` |
| `4F87` `4F88` `5693` `5694` `5695` `56A5` `56A6` `56B0` `56B1` `56BA` `56BB` `56BC` `56BD` `56C1` | Alchemist (`acm-g11` `ats-m75` `dg2-g11` `dg2-g11-a0` `dg2-g11-b0` `dg2-g11-b1`) | Xe-HPG | `12.56.5` | `Intel® Iris® Xe Graphics` `Intel® Arc™ A370M Graphics` `Intel® Arc™ A350M Graphics` `Intel® Iris® Xe MAX A200M Graphics` `Intel® Arc™ A380 Graphics` `Intel® Arc™ A310 Graphics` `Intel® Arc™ Pro A30M Graphics` `Intel® Arc™ Pro A40/A50 Graphics` `Intel® Arc™ A380E Graphics` `Intel® Arc™ A310E Graphics` `Intel® Arc™ A370E Graphics` `Intel® Arc™ A350E Graphics` `Intel® Data Center GPU Flex 140` |
| `4F85` `4F86` `5696` `5697` `56A3` `56A4` `56B2` `56B3` | Alchemist (`acm-g12` `dg2-g12` `dg2-g12-a0`) | Xe-HPG | `12.57.0` | `Intel® Iris® Xe Graphics` `Intel® Arc™ A570M Graphics` `Intel® Arc™ A530M Graphics` `Intel® Arc™ Xe Graphics` `Intel® Arc ™ Pro A60M Graphics` `Intel® Arc ™ Pro A60 Graphics` |
| `0BD0` | Ponte Vecchio XL (`pvc-xl-a0` `pvc-sdv` `pvc-xl-a0p`) | Xe-HPC | `12.60.0` `12.60.1` | (Unknown) |
| `0B69` `0B6E` `0BD5` `0BD6` `0BD7` `0BD8` `0BD9` `0BDA` `0BDB` | Ponte Vecchio XT (`pvc` `pvc-xt-a0` `pvc-xt-b0` `pvc-xt-b1` `pvc-xt-c0`) | Xe-HPC | `12.60.3` `12.60.5` `12.60.6` `12.60.7` | `Intel® Data Center GPU Max 1450` `Intel® Data Center GPU Max 1100C` `Intel® Data Center GPU Max 1100` `Intel® Data Center GPU Max 1550` `Intel® Data Center GPU Max 1350` `Intel® Data Center GPU Max 1100` |
| `0BD4` | Ponte Vecchio XT (`pvc-vg` `pvc-xt-c0-vg`) | Xe-HPC | `12.61.7` | `Intel® Data Center GPU Max 1550VG` |
| `7D40` `7D41` `7D45` `7D67` | Meteor Lake, Arrow Lake (`arl-s` `arl-u` `mtl` `mtl-m` `mtl-u` `mtl-s` `mtl-u-a0` `mtl-u-b0`) | Xe-LPG | `12.70.0` `12.70.4` | `Intel® Graphics` |
| `7D55` `7DD5` | Meteor Lake (`mtl-h` `mtl-p` `mtl-h-a0` `mtl-h-b0`) | Xe-LPG | `12.71.0` `12.71.4` | `Intel® Arc™ Graphics` `Intel® Graphics` |
| `7D51` `7DD1` `B640` | Arrow Lake (`arl-h` `arl-h-a0` `arl-h-b0`) | Xe-LPG | `12.74.0` `12.74.4` | `Intel® Graphics` |
| `E202` `E20B` `E20C` `E20D` `E210` `E212` `E214` `E215` `E216` `E217` | Battlemage (`bmg` `bmg-g21` `bmg-g21-a0` `bmg-g21-a1` `bmg-g21-b0`) | Xe2 | `20.1.0` | `Intel® Graphics` `Intel® Arc™ B580 Graphics` `Intel® Arc™ B570 Graphics` |
| `E220` `E221` `E222` `E223` | (No acronym) | Xe2 | `20.2.0` | (Unknown) |
| `6420` `64A0` `64B0` | Lunar Lake (`lnl-m` `lnl-a0` `lnl-a1` `lnl-b0`) | Xe2 | `20.4.0` `20.4.1` `20.4.4` | `Intel® Graphics` `Intel® Arc™ Graphics` |

Display names above come from [Intel official documentation](https://dgpu-docs.intel.com/devices/hardware-table.html) and [The PCI ID Repository](https://admin.pci-ids.ucw.cz/read/PC/8086).

---

## Install AOT enabled IPEX (Windows only, CPython 3.11) version 2.1.40+xpu (Demucs-GUI 1.3a1 to 1.3)

1. Install Intel graphics driver greater than or equal to `31.0.101.4953` (Windows) from [official website](https://www.intel.com/content/www/us/en/download/785597/792980/intel-arc-iris-xe-graphics-windows.html).
2. Run Demucs-GUI greater than or equal to `1.3a1`. If any Intel GPU is detected, you will be able to see an option in the menu bar `About -> About AOT`. Click it and you will see a dialog asking you whether to download an AOT build or open the documentation (this page). If you started Demucs-GUI with IPEX enabled but with JIT only on Windows, the dialog will also appear. If the build doesn't have Intel GPU support, the dialog will show up with warning.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ For Windows: At least Windows 8

For Mac: At least macOS 10.15

For Linux: Any system that can install and run python 3.11 (Because I'll pack the binaries using python 3.11)
For Linux: Any system that can install and run python 3.11 (Because I'll pack the binaries using python 3.11). Requires at least glibc 2.27. If you are using xcb, you may need to install `libxcb-cursor0` (package name may vary on different distributions).

#### Hardware
Memory: About at least 8GB of total memory (physical and swap) would be required. The longer the track you want to separate, the more memory will be required.
Expand All @@ -44,7 +44,7 @@ GPU: Only NVIDIA GPUs (whose compute capability should be at least 3.5), Intel A
At least Python 3.10 is required. Other requirements please refer to [Installing binaries](#installing-binaries).

## Downloads
Binaries for download are available [here](https://github.com/CarlGao4/Demucs-Gui/releases).
Binaries for download are available on [GitHub Releases](https://github.com/CarlGao4/Demucs-Gui/releases) and [FossHub](https://www.fosshub.com/Demucs-GUI.html). Some files are too large to be uploaded to GitHub, so please refer to FossHub if you cannot find the file you need on GitHub.

## Update History

Expand Down
9 changes: 9 additions & 0 deletions history.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
Note: Versions in *italic* means that the release is a beta version.

### 1.3.0.1
Release date: Jan. 13, 2025

#### Updates
1. Added support for Intel Extension for PyTorch `2.1.40+xpu` built with oneAPI 2025.0.1

#### Fixes
1. Fixed an issue that on Linux log file can't be opened using the system file manager

### 1.3
Release date: Jan. 4, 2025

Expand Down

0 comments on commit fa34a3d

Please sign in to comment.