Skip to content
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

Update XPU install #3516

Merged
merged 15 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 19 additions & 33 deletions docs/source/guide/get_started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,49 +76,35 @@ OpenVINO™ Training Extensions command line functionality.
Install OpenVINO™ Training Extensions for users (XPU devices)
*************************************************************

1. Follow the first two steps from above instructions
on cloning the repository and creating a virtual environment.
1. Install Intel Extensions for Pytorch & Requirements for training according to your system environment.

2. Install Intel Extensions For Pytorch (IPEX).
Follow the `official documentation <https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=gpu&version=v2.1.10%2Bxpu>`_ to install prerequisites such as OneAPI and proper drivers.

.. code-block:: shell

python -m pip install torch==2.1.0.post0 torchvision==0.16.0.post0 torchaudio==2.1.0.post0 intel-extension-for-pytorch==2.1.20+xpu oneccl_bind_pt==2.1.200+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/

3. Install MMCV.
It is required to install mmcv from source to properly build it with IPEX.

.. code-block:: shell

git clone https://github.com/open-mmlab/mmcv
cd mmcv
git checkout v2.1.0
MMCV_WITH_OPS=1 pip install -e .

4. Install OpenVINO™ Training Extensions
package from either:
.. tab-set::

* A local source in development mode
.. tab-item:: Minimum requirements

.. code-block:: shell
.. code-block:: shell

pip install -e .
pip install '.[xpu]' --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/

* PyPI
.. note::

.. code-block:: shell
Models from mmlab are not available for this environment. If you want to use mmlab models, you must install them with Full Requirements.
Also, some tasks may not be supported by minimum requirements.

pip install otx
.. tab-item:: Full Requirements
kprokofi marked this conversation as resolved.
Show resolved Hide resolved

5. Install requirements for training
excluding Pytorch.
.. code-block:: shell

.. code-block:: shell
git clone https://github.com/open-mmlab/mmcv
cd mmcv
git checkout v2.1.0
MMCV_WITH_OPS=1 pip install -e .
cd ..
otx install -v --do-not-install-torch

otx install -v --do-not-install-torch
[Optional] Refer to the `Intel® Extension for PyTorch documentation guide <https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=gpu&version=v2.1.10%2bxpu&os=linux%2fwsl2&package=pip>`_

6. Activate OneAPI environment
2. Activate OneAPI environment
and export required IPEX system variables

.. code-block:: shell
Expand All @@ -127,7 +113,7 @@ and export required IPEX system variables
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30
export IPEX_FP32_MATH_MODE=TF32

7. Once the package is installed in the virtual environment, you can use full
3. Once the package is installed in the virtual environment, you can use full
OpenVINO™ Training Extensions command line functionality.

.. code-block:: shell
Expand Down
16 changes: 16 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,22 @@ docs = [
"sphinxemoji",
"nbsphinx",
]
xpu = [
"torch==2.1.0.post0",
"torchvision==0.16.0.post0",
"intel-extension-for-pytorch==2.1.20+xpu",
kprokofi marked this conversation as resolved.
Show resolved Hide resolved
"oneccl_bind_pt==2.1.200+xpu",
"lightning==2.1.2",
"pytorchcv",
"timm",
"openvino==2024.0",
"openvino-dev==2024.0",
"openvino-model-api==0.2.0",
"onnx==1.16.0",
"onnxconverter-common==1.14.0",
"nncf==2.9.0",
"anomalib[core]==1.0.1",
]
base = [
"torch==2.1.1",
"lightning==2.1.2",
Expand Down
Loading