GPU install doc - add pip install oneAPI for windows (#10157)

* Add instructions for pip install oneAPI for windows

* Improve clarity

* Format fix

* Fix

* Fix in runtime configuration
This commit is contained in:
Cheen Hau, 俊豪 2024-02-19 14:46:08 +08:00 committed by GitHub
parent 23c91cdce6
commit 6952847f68

View file

@ -18,7 +18,25 @@ To apply Intel GPU acceleration, there're several prerequisite steps for tools i
* Step 2: Install or update to latest [GPU driver](https://www.intel.com/content/www/us/en/download/785597/intel-arc-iris-xe-graphics-windows.html) * Step 2: Install or update to latest [GPU driver](https://www.intel.com/content/www/us/en/download/785597/intel-arc-iris-xe-graphics-windows.html)
* Step 3: Install [Intel® oneAPI Base Toolkit](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html) 2024.0 * Step 3: Install Intel® oneAPI Base Toolkit 2024.0
Intel® oneAPI Base Toolkit 2024.0 installation methods:
```eval_rst
.. tabs::
.. tab:: PIP installer
Pip install oneAPI in your working conda environment.
.. code-block:: bash
pip install dpcpp-cpp-rt==2024.0.2 mkl-dpcpp==2024.0.0 onednn==2024.0.0
.. note::
Activating your working conda environment will automatically configure oneAPI environment variables.
.. tab:: Offline installer
Download and install `Intel® oneAPI Base Toolkit <https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html>`_ version 2024.0. oneAPI Deep Neural Network Library, oneAPI Math Kernel Library, and oneAPI DPC++/C++ Compiler are required, the other components are optional.
```
### Install BigDL-LLM From PyPI ### Install BigDL-LLM From PyPI
@ -71,7 +89,7 @@ pip install --pre --upgrade bigdl-llm[xpu]
To use GPU acceleration on Windows, several environment variables are required before running a GPU example. To use GPU acceleration on Windows, several environment variables are required before running a GPU example.
Make sure you are using CMD (Anaconda Prompt if using conda) as PowerShell is not supported: Make sure you are using CMD (Anaconda Prompt if using conda) as PowerShell is not supported. For oneAPI installed using the Offline installer, configure oneAPI environment variables with:
```cmd ```cmd
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
@ -124,7 +142,7 @@ If you met error when importing `intel_extension_for_pytorch`, please ensure tha
conda install libuv conda install libuv
``` ```
* Make sure you have configured oneAPI environment variables in your Anaconda Prompt through * For oneAPI installed using the Offline installer, make sure you have configured oneAPI environment variables in your Anaconda Prompt through
```cmd ```cmd
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
``` ```
@ -526,5 +544,5 @@ Error: libmkl_sycl_blas.so.4: cannot open shared object file: No such file or di
The reason for such errors is that oneAPI has not been initialized properly before running BigDL-LLM code or before importing IPEX package. The reason for such errors is that oneAPI has not been initialized properly before running BigDL-LLM code or before importing IPEX package.
* For oneAPI installed using APT or Offline Installer, make sure you execute `setvars.sh` of oneAPI Base Toolkit before running BigDL-LLM. * For oneAPI installed using APT or Offline Installer, make sure you execute `setvars.sh` of oneAPI Base Toolkit before running BigDL-LLM.
* For PIP-installed oneAPI, run ``echo $LD_LIBRARY_PATH`` to check if the installation path is properly configured. If the output does not contain oneAPI path (e.g. ``~/intel/oneapi/lib``), check [Prerequisites](#id1) to re-install oneAPI with PIP installer. * For PIP-installed oneAPI, activate your working environment and run ``echo $LD_LIBRARY_PATH`` to check if the installation path is properly configured for the environment. If the output does not contain oneAPI path (e.g. ``~/intel/oneapi/lib``), check [Prerequisites](#id1) to re-install oneAPI with PIP installer.
* Make sure you install matching versions of BigDL-LLM/pytorch/IPEX and oneAPI Base Toolkit. BigDL-LLM with PyTorch 2.1 should be used with oneAPI Base Toolkit version 2024.0. BigDL-LLM with PyTorch 2.0 should be used with oneAPI Base Toolkit version 2023.2. * Make sure you install matching versions of BigDL-LLM/pytorch/IPEX and oneAPI Base Toolkit. BigDL-LLM with PyTorch 2.1 should be used with oneAPI Base Toolkit version 2024.0. BigDL-LLM with PyTorch 2.0 should be used with oneAPI Base Toolkit version 2023.2.