Win install change oneapi to pip installer (#10577)
* Update windows related guide to use pip installer for oneAPI * Small style fix * Add oneAPI version * Update based on comments * Small fix
This commit is contained in:
parent
5963239b46
commit
15b8964403
3 changed files with 48 additions and 42 deletions
|
|
@ -18,9 +18,28 @@ 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 3: Install Intel® oneAPI Base Toolkit 2024.0: download and install [Intel® oneAPI Base Toolkit](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html?operatingsystem=window&distributions=offline>) version 2024.0 through Offline Installer.
|
||||
* Step 3 (Recommended): Install [Miniconda](https://docs.anaconda.com/free/miniconda/) for Python environment management. Choose **Miniconda installer for Windows**.
|
||||
|
||||
During installation, you could just continue with "Recommended Installation". If you would like to continue with "Custom Installation", please note that oneAPI Deep Neural Network Library, oneAPI Math Kernel Library, and oneAPI DPC++/C++ Compiler are required, the other components are optional.
|
||||
* Step 4: Install Intel® oneAPI Base Toolkit 2024.0:
|
||||
|
||||
First, Create a Python 3.9 enviroment and activate it. In Anaconda Prompt:
|
||||
|
||||
```cmd
|
||||
conda create -n llm python=3.9 libuv
|
||||
|
||||
conda activate llm
|
||||
```
|
||||
|
||||
```eval_rst
|
||||
.. important::
|
||||
|
||||
``ipex-llm`` is tested with Python 3.9, 3.10 and 3.11. Python 3.9 is recommended for best practices.
|
||||
```
|
||||
|
||||
Then, use `pip` to install the **Intel oneAPI Base Toolkit 2024.0**:
|
||||
```cmd
|
||||
pip install dpcpp-cpp-rt==2024.0.2 mkl-dpcpp==2024.0.0 onednn==2024.0.0
|
||||
```
|
||||
|
||||
<!-- Intel® oneAPI Base Toolkit 2024.0 installation methods:
|
||||
|
||||
|
|
@ -42,15 +61,8 @@ To apply Intel GPU acceleration, there're several prerequisite steps for tools i
|
|||
Activating your working conda environment will automatically configure oneAPI environment variables.
|
||||
``` -->
|
||||
|
||||
### Install IPEX-LLM From PyPI
|
||||
|
||||
We recommend using [miniconda](https://docs.conda.io/en/latest/miniconda.html) to create a python 3.9 enviroment:
|
||||
|
||||
```eval_rst
|
||||
.. important::
|
||||
|
||||
``ipex-llm`` is tested with Python 3.9, 3.10 and 3.11. Python 3.9 is recommended for best practices.
|
||||
```
|
||||
### Install IPEX-LLM
|
||||
#### Install IPEX-LLM From PyPI
|
||||
|
||||
The easiest ways to install `ipex-llm` is the following commands,
|
||||
choosing either US or CN website for `extra-index-url`:
|
||||
|
|
@ -76,7 +88,7 @@ choosing either US or CN website for `extra-index-url`:
|
|||
pip install --pre --upgrade ipex-llm[xpu] --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/
|
||||
```
|
||||
|
||||
### Install IPEX-LLM From Wheel
|
||||
#### Install IPEX-LLM From Wheel
|
||||
|
||||
If you encounter network issues when installing IPEX, you can also install IPEX-LLM dependencies for Intel XPU from source archives. First you need to download and install torch/torchvision/ipex from wheels listed below before installing `ipex-llm`.
|
||||
|
||||
|
|
@ -106,17 +118,15 @@ pip install --pre --upgrade ipex-llm[xpu]
|
|||
|
||||
### Runtime Configuration
|
||||
|
||||
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. For oneAPI installed using the Offline installer, configure oneAPI environment variables with: -->
|
||||
|
||||
Make sure you are using CMD (Anaconda Prompt if using conda) as PowerShell is not supported, and configure oneAPI environment variables with:
|
||||
<!-- Make sure you are using CMD (Anaconda Prompt if using conda) as PowerShell is not supported, and configure oneAPI environment variables with:
|
||||
|
||||
```cmd
|
||||
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
|
||||
```
|
||||
|
||||
Please also set the following environment variable if you would like to run LLMs on:
|
||||
Please also set the following environment variable if you would like to run LLMs on: -->
|
||||
|
||||
```eval_rst
|
||||
.. tabs::
|
||||
|
|
@ -162,11 +172,6 @@ If you met error when importing `intel_extension_for_pytorch`, please ensure tha
|
|||
```cmd
|
||||
conda install libuv
|
||||
```
|
||||
* Make sure you have configured oneAPI environment variables in your Anaconda Prompt through
|
||||
```cmd
|
||||
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
|
||||
```
|
||||
Please note that you need to set these environment variables again once you have a new Anaconda Prompt window.
|
||||
|
||||
<!-- * For oneAPI installed using the Offline installer, make sure you have configured oneAPI environment variables in your Anaconda Prompt through
|
||||
```cmd
|
||||
|
|
@ -393,7 +398,8 @@ IPEX-LLM GPU support on Linux has been verified on:
|
|||
sudo ./installer
|
||||
```
|
||||
|
||||
### Install IPEX-LLM From PyPI
|
||||
### Install IPEX-LLM
|
||||
#### Install IPEX-LLM From PyPI
|
||||
|
||||
We recommend using [miniconda](https://docs.conda.io/en/latest/miniconda.html) to create a python 3.9 enviroment:
|
||||
|
||||
|
|
@ -473,7 +479,7 @@ We recommend using [miniconda](https://docs.conda.io/en/latest/miniconda.html) t
|
|||
|
||||
```
|
||||
|
||||
### Install IPEX-LLM From Wheel
|
||||
#### Install IPEX-LLM From Wheel
|
||||
|
||||
If you encounter network issues when installing IPEX, you can also install IPEX-LLM dependencies for Intel XPU from source archives. First you need to download and install torch/torchvision/ipex from wheels listed below before installing `ipex-llm`.
|
||||
|
||||
|
|
|
|||
|
|
@ -32,14 +32,9 @@ Download and install the latest GPU driver from the [official Intel download pag
|
|||
<img src="https://llm-assets.readthedocs.io/en/latest/_images/quickstart_windows_gpu_3.png" width=100%; />
|
||||
|
||||
|
||||
### Install oneAPI
|
||||
<!-- ### Install oneAPI -->
|
||||
|
||||
<!-- * With the `llm` environment active, use `pip` to install the [**Intel oneAPI Base Toolkit**](https://www.intel.com/content/www/us/en/developer/tools/oneapi/overview.html):
|
||||
```cmd
|
||||
pip install dpcpp-cpp-rt==2024.0.2 mkl-dpcpp==2024.0.0 onednn==2024.0.0
|
||||
``` -->
|
||||
|
||||
Download and install the [**Intel oneAPI Base Toolkit 2024.0**](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html?operatingsystem=window&distributions=offline). During installation, you can continue with the default installation settings.
|
||||
<!-- Download and install the [**Intel oneAPI Base Toolkit 2024.0**](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html?operatingsystem=window&distributions=offline). During installation, you can continue with the default installation settings.
|
||||
|
||||
<img src="https://llm-assets.readthedocs.io/en/latest/_images/quickstart_windows_gpu_oneapi_offline_installer.png" width=100%; />
|
||||
|
||||
|
|
@ -47,9 +42,9 @@ Download and install the [**Intel oneAPI Base Toolkit 2024.0**](https://www.inte
|
|||
.. tip::
|
||||
|
||||
If the oneAPI installation hangs at the finalization step for more than 10 minutes, the error might be due to a problematic install of Visual Studio. Please reboot your computer and then launch the Visual Studio installer. If you see installation error messages, please repair your Visual Studio installation. After the repair is done, oneAPI installation is completed successfully.
|
||||
```
|
||||
``` -->
|
||||
|
||||
### Setup Python Environment
|
||||
### Install Miniconda
|
||||
|
||||
Visit [Miniconda installation page](https://docs.anaconda.com/free/miniconda/), download the **Miniconda installer for Windows**, and follow the instructions to complete the installation.
|
||||
|
||||
|
|
@ -57,15 +52,20 @@ Visit [Miniconda installation page](https://docs.anaconda.com/free/miniconda/),
|
|||
<img src="https://llm-assets.readthedocs.io/en/latest/_images/quickstart_windows_gpu_5.png" width=70%/>
|
||||
</div>
|
||||
|
||||
After installation, open the **Anaconda Prompt**, create a new python environment `llm`:
|
||||
|
||||
### Install oneAPI
|
||||
|
||||
Open the **Anaconda Prompt**. Then create a new python environment `llm` and activate it:
|
||||
```cmd
|
||||
conda create -n llm python=3.9 libuv
|
||||
```
|
||||
Activate the newly created environment `llm`:
|
||||
```cmd
|
||||
conda activate llm
|
||||
```
|
||||
|
||||
Use `pip` to install the **Intel oneAPI Base Toolkit 2024.0**:
|
||||
```cmd
|
||||
pip install dpcpp-cpp-rt==2024.0.2 mkl-dpcpp==2024.0.0 onednn==2024.0.0
|
||||
```
|
||||
|
||||
## Install `ipex-llm`
|
||||
|
||||
With the `llm` environment active, use `pip` to install `ipex-llm` for GPU:
|
||||
|
|
@ -96,14 +96,14 @@ Choose either US or CN website for `extra-index-url`:
|
|||
You can verify if `ipex-llm` is successfully installed following below steps.
|
||||
|
||||
### Step 1: Runtime Configurations
|
||||
* Open the **Anaconda Prompt** and activate the Python environment `llm` you previously created:
|
||||
* Open the **Anaconda Prompt** and activate the Python environment `llm` you previously created:
|
||||
```cmd
|
||||
conda activate llm
|
||||
```
|
||||
* Configure oneAPI variables by running the following command:
|
||||
<!-- * Configure oneAPI variables by running the following command:
|
||||
```cmd
|
||||
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
|
||||
```
|
||||
``` -->
|
||||
* Set the following environment variables according to your device:
|
||||
|
||||
```eval_rst
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ For Linux system, we recommend Ubuntu 20.04 or later (Ubuntu 22.04 is preferred)
|
|||
Visit the [Install IPEX-LLM on Linux with Intel GPU](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/install_linux_gpu.html), follow [Install Intel GPU Driver](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/install_linux_gpu.html#install-intel-gpu-driver) and [Install oneAPI](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/install_linux_gpu.html#install-oneapi) to install GPU driver and [Intel® oneAPI Base Toolkit 2024.0](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html).
|
||||
|
||||
### Windows
|
||||
Visit the [Install IPEX-LLM on Windows with Intel GPU Guide](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/install_windows_gpu.html), and follow [Install Prerequisites](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/install_windows_gpu.html#install-prerequisites) to install [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/) Community Edition, latest [GPU driver](https://www.intel.com/content/www/us/en/download/785597/intel-arc-iris-xe-graphics-windows.html) and [Intel® oneAPI Base Toolkit 2024.0](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html).
|
||||
Visit the [Install IPEX-LLM on Windows with Intel GPU Guide](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/install_windows_gpu.html), and follow [Install Prerequisites](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/install_windows_gpu.html#install-prerequisites) to install [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/) Community Edition, latest [GPU driver](https://www.intel.com/content/www/us/en/download/785597/intel-arc-iris-xe-graphics-windows.html) and Intel® oneAPI Base Toolkit 2024.0.
|
||||
|
||||
## 1 Install IPEX-LLM for llama.cpp
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue