Skip to content

Commit 9b96efa

Browse files
jingxu101pikachuZhaoqiongZ
authored
update dependency version (#4454)
* update dependency version * update LLM script: 1. remove deprecated models 2. remove unless environment * update version number and runtime dependency to llm examples * update version in docs (#4461) * update version in script and installation command for ipex and ccl (#4462) * update torch/torchvision/torchaudio version * update installation commands in README --------- Co-authored-by: dujun <[email protected]> Co-authored-by: ZhaoqiongZ <[email protected]>
1 parent 00f9449 commit 9b96efa

24 files changed

+73
-66
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ Compilation instruction of the latest CPU code base `main` branch can be found i
6060
You can install Intel® Extension for PyTorch\* for GPU via command below.
6161

6262
```bash
63-
python -m pip install torch==2.1.0.post2 torchvision==0.16.0.post2 torchaudio==2.1.0.post2 intel-extension-for-pytorch==2.1.30+xpu oneccl_bind_pt==2.1.300+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/
63+
python -m pip install torch==2.1.0.post3 torchvision==0.16.0.post3 torchaudio==2.1.0.post3 intel-extension-for-pytorch==2.1.40+xpu oneccl_bind_pt==2.1.400+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/
6464
# for PRC user, you can check with the following link
65-
python -m pip install torch==2.1.0.post2 torchvision==0.16.0.post2 torchaudio==2.1.0.post2 intel-extension-for-pytorch==2.1.30+xpu oneccl_bind_pt==2.1.300+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/
65+
python -m pip install torch==2.1.0.post3 torchvision==0.16.0.post3 torchaudio==2.1.0.post3 intel-extension-for-pytorch==2.1.40+xpu oneccl_bind_pt==2.1.400+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/
6666

6767
```
6868

@@ -127,3 +127,4 @@ See also: [Security Policy](SECURITY.md)
127127

128128

129129

130+

dependency_version.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,36 @@ gcc:
44
llvm:
55
version: 16.0.6
66
pytorch:
7-
version: 2.1.0.post2+cxx11.abi
7+
version: 2.1.0.post3+cxx11.abi
88
commit: v2.1.0
99
torchaudio:
10-
version: 2.1.0.post2+cxx11.abi
10+
version: 2.1.0.post3+cxx11.abi
1111
commit: v2.1.0
1212
torchvision:
13-
version: 0.16.0.post2+cxx11.abi
13+
version: 0.16.0.post3+cxx11.abi
1414
commit: v0.16.0
1515
torch-ccl:
1616
repo: https://github.com/intel/torch-ccl.git
1717
commit: 1053f1354f6293abc11e93af085524fe3664219f
18-
version: 2.1.300+xpu
18+
version: 2.1.400+xpu
1919
deepspeed:
20-
version: 0.14.0
20+
version: 0.14.2
2121
intel-extension-for-deepspeed:
22-
version: 2.1.30
22+
version: 2.1.40
2323
transformers:
2424
version: 4.31.0
2525
commit: v4.31.0
2626
protobuf:
2727
version: 3.20.3
2828
lm_eval:
2929
version: 0.3.0
30+
numpy:
31+
version: 1.26.4
32+
setuptools:
33+
version: 69.5.1
3034
basekit:
3135
dpcpp-cpp-rt:
3236
version: 2024.0.0
3337
mkl-dpcpp:
3438
version: 2024.0.0
39+

docker/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ Run the following commands to build a docker image by compiling from source.
1919
```
2020
git clone https://github.com/intel/intel-extension-for-pytorch.git
2121
cd intel-extension-for-pytorch
22-
git checkout release/xpu/2.1.30
22+
git checkout release/xpu/2.1.40
2323
git submodule sync
2424
git submodule update --init --recursive
25-
docker build -f docker/Dockerfile.compile --build-arg GID_RENDER=$(getent group render | sed -E 's,^render:[^:]*:([^:]*):.*$,\1,') -t intel/intel-extension-for-pytorch:2.1.30-xpu .
25+
docker build -f docker/Dockerfile.compile --build-arg GID_RENDER=$(getent group render | sed -E 's,^render:[^:]*:([^:]*):.*$,\1,') -t intel/intel-extension-for-pytorch:2.1.40-xpu .
2626
```
2727

2828
Alternatively, `./build.sh` script has docker build command to install prebuilt wheel files, update all the relevant build arguments and execute the script. Run the command below in current directory.
@@ -34,7 +34,7 @@ export IMAGE_TYPE="xpu"
3434
To pull docker images use the following command:
3535

3636
```bash
37-
docker pull intel/intel-extension-for-pytorch:2.1.30-xpu
37+
docker pull intel/intel-extension-for-pytorch:2.1.40-xpu
3838
```
3939
### Running container:
4040

@@ -43,7 +43,7 @@ local directory into the container. The `-v` argument can be omitted if you do n
4343
access to a local directory in the container.
4444

4545
```
46-
IMAGE_NAME=intel/intel-extension-for-pytorch:2.1.30-xpu
46+
IMAGE_NAME=intel/intel-extension-for-pytorch:2.1.40-xpu
4747
```
4848
```bash
4949
docker run --rm \
@@ -89,7 +89,7 @@ python -c "import torch; import intel_extension_for_pytorch as ipex; print(torch
8989
Sample output looks like below:
9090
```bash
9191
2.1.0.post2+cxx11.abi
92-
2.1.30+xpu
92+
2.1.40+xpu
9393
[0]: _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu', driver_version='1.3.27642', has_fp64=1, total_memory=65536MB, max_compute_units=448, gpu_eu_count=448)
9494
[1]: _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu', driver_version='1.3.27642', has_fp64=1, total_memory=65536MB, max_compute_units=448, gpu_eu_count=448)
9595
```
@@ -99,3 +99,4 @@ Sample output looks like below:
9999
Now you are inside container with Python 3.10, PyTorch, and Intel® Extension for PyTorch\* preinstalled. You can run your own script
100100
to run on Intel GPU.
101101

102+

docker/build.sh

100755100644
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
if [[ ${IMAGE_TYPE} = "xpu" ]]; then
4-
IMAGE_NAME=intel/intel-extension-for-pytorch:2.1.30-$IMAGE_TYPE
4+
IMAGE_NAME=intel/intel-extension-for-pytorch:2.1.40-$IMAGE_TYPE
55
docker build --build-arg http_proxy=$http_proxy \
66
--build-arg https_proxy=$https_proxy \
77
--build-arg no_proxy=" " \
@@ -16,10 +16,10 @@ if [[ ${IMAGE_TYPE} = "xpu" ]]; then
1616
--build-arg MKL_VER=2024.1.0-691 \
1717
--build-arg CCL_VER=2021.12.0-309 \
1818
--build-arg TORCH_VERSION=2.1.0.post2+cxx11.abi \
19-
--build-arg IPEX_VERSION=2.1.30+xpu \
19+
--build-arg IPEX_VERSION=2.1.40+xpu \
2020
--build-arg TORCHVISION_VERSION=0.16.0.post2+cxx11.abi \
2121
--build-arg TORCHAUDIO_VERSION=2.1.0.post2+cxx11.abi \
22-
--build-arg ONECCL_BIND_PT_VERSION=2.1.300+xpu \
22+
--build-arg ONECCL_BIND_PT_VERSION=2.1.400+xpu \
2323
--build-arg TORCH_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
2424
--build-arg IPEX_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
2525
--build-arg TORCHVISION_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
@@ -28,3 +28,4 @@ if [[ ${IMAGE_TYPE} = "xpu" ]]; then
2828
-t ${IMAGE_NAME} \
2929
-f Dockerfile.prebuilt .
3030
fi
31+

docs/tutorials/contribution.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Once you implement and test your feature or bug-fix, submit a Pull Request to ht
1616

1717
## Developing Intel® Extension for PyTorch\* on XPU
1818

19-
A full set of instructions on installing Intel® Extension for PyTorch\* from source is in the [Installation document](https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=gpu&version=v2.1.30%2bxpu).
19+
A full set of instructions on installing Intel® Extension for PyTorch\* from source is in the [Installation document](https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=gpu&version=v2.1.40%2bxpu).
2020

2121
To develop on your machine, here are some tips:
2222

@@ -127,3 +127,4 @@ To build the documentation:
127127

128128
The `.rst` source files live in `docs/tutorials` folder. Some of the `.rst` files pull in docstrings from Intel® Extension for PyTorch\* Python code (for example, via the `autofunction` or `autoclass` directives). To shorten doc build times, it is helpful to remove the files you are not working on, only keeping the base `index.rst` file and the files you are editing. The Sphinx build will produce missing file warnings but will still complete.
129129

130+

docs/tutorials/features/DDP.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ python -m pip install oneccl_bind_pt --extra-index-url <REPO_URL>
5050

5151
#### Install from source
5252

53-
Refer to [Installation Guide](https://github.com/intel/torch-ccl/tree/ccl_torch2.1.300+xpu?tab=readme-ov-file#install-from-source) to install Intel® oneCCL Bindings for Pytorch\* from source.
53+
Refer to [Installation Guide](https://github.com/intel/torch-ccl/tree/ccl_torch2.1.400+xpu?tab=readme-ov-file#install-from-source) to install Intel® oneCCL Bindings for Pytorch\* from source.
5454

5555
### Runtime Dynamic Linking
5656

@@ -247,3 +247,4 @@ train_loader = torch.utils.data.DataLoader(train_dataset, batch_size=args.batch_
247247
```
248248
Then you can start your model training on multiple GPU devices of one card.
249249

250+

docs/tutorials/features/torch_compile_gpu.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Intel® Extension for PyTorch\* now empowers users to seamlessly harness graph c
1414
- `intel_extension_for_pytorch` : > v2.1.10
1515
- `triton` : [v2.1.0](https://github.com/intel/intel-xpu-backend-for-triton/releases/tag/v2.1.0) with Intel® XPU Backend for Triton* backend enabled.
1616

17-
Follow [Intel® Extension for PyTorch\* Installation](https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=gpu&version=v2.1.30%2bxpu) to install `torch` and `intel_extension_for_pytorch` firstly.
17+
Follow [Intel® Extension for PyTorch\* Installation](https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=gpu&version=v2.1.40%2bxpu) to install `torch` and `intel_extension_for_pytorch` firstly.
1818

1919
Then install [Intel® XPU Backend for Triton\* backend](https://github.com/intel/intel-xpu-backend-for-triton) for `triton` package. You may install it via prebuilt wheel package or build it from the source. We recommend installing via prebuilt package:
2020

@@ -72,3 +72,4 @@ loss.backward()
7272
optimizer.step()
7373
```
7474

75+

docs/tutorials/getting_started.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Quick Start
22

3-
The following instructions assume you have installed the Intel® Extension for PyTorch\*. For installation instructions, refer to [Installation](https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=gpu&version=v2.1.30%2bxpu).
3+
The following instructions assume you have installed the Intel® Extension for PyTorch\*. For installation instructions, refer to [Installation](https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=gpu&version=v2.1.40%2bxpu).
44

55
To start using the Intel® Extension for PyTorch\* in your code, you need to make the following changes:
66

@@ -59,3 +59,4 @@ source /opt/intel/oneapi/mkl/latest/env/vars.sh
5959
python <script>
6060
```
6161

62+

docs/tutorials/installation.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
Installation
22
============
33

4-
Select your preferences and follow the installation instructions provided on the `Installation page <https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=gpu&version=v2.1.30%2bxpu>`_.
4+
Select your preferences and follow the installation instructions provided on the `Installation page <https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=gpu&version=v2.1.40%2bxpu>`_.
55

66
After successful installation, refer to the `Quick Start <getting_started.md>`_ and `Examples <examples.md>`_ sections to start using the extension in your code.
77

8+

docs/tutorials/introduction.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ For the detailed list of supported features and usage instructions, refer to `Fe
99

1010
Get Started
1111
-----------
12-
- `Installation <https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=gpu&version=v2.1.30%2bxpu>`_
12+
- `Installation <https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=gpu&version=v2.1.40%2bxpu>`_
1313
- `Quick Start <getting_started.md>`_
1414
- `Examples <examples.md>`_
1515

1616
API Documentation
1717
-----------------
1818
For detailed description of the Intel® Extension for PyTorch* APIs, refer to the `API Documentation <api_doc.html>`_ section.
1919

20+

docs/tutorials/llm.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Optimized Models
5656

5757
*Note*: The above verified models (including other models in the same model family, like "codellama/CodeLlama-7b-hf" from LLAMA family) are well supported with all optimizations like indirect access KV cache, fused ROPE, and prepacked TPP Linear (fp16). For other LLMs families, we are working in progress to cover those optimizations, which will expand the model list above.
5858

59-
Check `LLM best known practice <https://github.com/intel/intel-extension-for-pytorch/tree/release/xpu/2.1.30/examples/gpu/inference/python/llm>`_ for instructions to install/setup environment and example scripts..
59+
Check `LLM best known practice <https://github.com/intel/intel-extension-for-pytorch/tree/release/xpu/2.1.40/examples/gpu/inference/python/llm>`_ for instructions to install/setup environment and example scripts..
6060

6161
Optimization Methodologies
6262
--------------------------
@@ -142,3 +142,4 @@ For more detailed information, check `WOQ INT4 <llm/int4_weight_only_quantizatio
142142
llm/int4_weight_only_quantization
143143

144144

145+

docs/tutorials/llm/int4_weight_only_quantization.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ After the policy is selected, Intel® Extension for PyTorch\* will use `HGEMM_IN
119119
Intel® Extension for PyTorch\* implements Weight-Only Quantization for Intel® Data Center GPU Max Series and Intel® Arc™ A-Series Graphics with Intel® Extension for Transformers\*. Below section uses Qwen-7B to demonstrate the detailed usage.
120120

121121
### Environment Setup
122-
Please refer to the [instructions](https://github.com/intel/intel-extension-for-pytorch/blob/v2.1.30%2Bxpu/examples/gpu/inference/python/llm/README.md#environment-setup).
122+
Please refer to the [instructions](https://github.com/intel/intel-extension-for-pytorch/blob/v2.1.40%2Bxpu/examples/gpu/inference/python/llm/README.md#environment-setup).
123123

124124
### Run Weight-Only Quantization LLM on Intel® GPU
125125
#### Install Intel-extension-for-transformers and Neural-compressor
@@ -177,7 +177,7 @@ output = loaded_model.generate(inputs)
177177

178178
```
179179

180-
#### Execute [WOQ benchmark script](https://github.com/intel/intel-extension-for-pytorch/blob/v2.1.30%2Bxpu/examples/gpu/inference/python/llm/run_benchmark_woq.sh)
180+
#### Execute [WOQ benchmark script](https://github.com/intel/intel-extension-for-pytorch/blob/v2.1.40%2Bxpu/examples/gpu/inference/python/llm/run_benchmark_woq.sh)
181181

182182
```python
183183
bash run_benchmark_woq.sh
@@ -186,3 +186,4 @@ bash run_benchmark_woq.sh
186186
>Note:
187187
> * Do save quantized model before call `optimize_transformers` function.
188188
> * The optimize_transformers function is designed to optimize transformer-based models within frontend python modules, with a particular focus on Large Language Models (LLMs). It provides optimizations for both model-wise and content-generation-wise. Please refer to [Transformers Optimization Frontend API](../../tutorials/llm/llm_optimize_transformers.md) for the detail of `optimize_transformers`.
189+

docs/tutorials/llm/llm_optimize_transformers.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ API documentation is available at [API Docs page](../api_doc.html#ipex.optimize_
99

1010
## Pseudocode of Common Usage Scenarios
1111

12-
The following sections show pseudocode snippets to invoke Intel® Extension for PyTorch\* APIs to work with LLMs. Complete examples can be found at [the Example directory](https://github.com/intel/intel-extension-for-pytorch/tree/v2.1.30%2Bxpu/examples/gpu/inference/python/llm).
12+
The following sections show pseudocode snippets to invoke Intel® Extension for PyTorch\* APIs to work with LLMs. Complete examples can be found at [the Example directory](https://github.com/intel/intel-extension-for-pytorch/tree/v2.1.40%2Bxpu/examples/gpu/inference/python/llm).
1313

1414
### FP16
1515

@@ -117,7 +117,8 @@ print(modelJit.graph_for(inference_dta))
117117

118118
Distributed inference can be performed with `DeepSpeed`. Based on original Intel® Extension for PyTorch\* scripts, the following code changes are required.
119119

120-
Check Distributed Examples in [LLM example](https://github.com/intel/intel-extension-for-pytorch/tree/v2.1.30%2Bxpu/examples/gpu/inference/python/llm) for complete codes.
120+
Check Distributed Examples in [LLM example](https://github.com/intel/intel-extension-for-pytorch/tree/v2.1.40%2Bxpu/examples/gpu/inference/python/llm) for complete codes.
121+
121122

122123

123124

examples/gpu/inference/python/llm/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ RUN useradd -m -s /bin/bash ubuntu && \
3232
USER ubuntu
3333
WORKDIR /home/ubuntu
3434

35-
RUN curl -fsSL -v -o miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
36-
bash miniconda.sh -b -p ./miniconda3 && \
37-
rm miniconda.sh && \
38-
echo "source ~/miniconda3/bin/activate" >> ./.bashrc
35+
RUN curl -fsSL -v -o miniforge.sh -O https://github.com/conda-forge/miniforge/releases/download/24.1.2-0/Miniforge3-24.1.2-0-Linux-x86_64.sh && \
36+
bash miniforge.sh -b -p ./miniforge3 && \
37+
rm miniforge.sh && \
38+
echo "source ~/miniforge3/bin/activate" >> ./.bashrc
3939

4040
FROM base AS dev
4141
# --build-arg COMPILE=ON to compile from source
4242
ARG COMPILE
4343
RUN bash /basekit_driver_install_helper.sh dev
4444
COPY --chown=ubuntu:ubuntu . ./intel-extension-for-pytorch/
45-
RUN . ./miniconda3/bin/activate && \
45+
RUN . ./miniforge3/bin/activate && \
4646
conda create -y -n compile_py310 python=3.10 && conda activate compile_py310 && \
4747
cd intel-extension-for-pytorch/examples/gpu/inference/python/llm && \
4848
if [ -z ${COMPILE} ]; then MODE=6; else MODE=2; fi && \
@@ -54,7 +54,7 @@ COPY --from=dev --chown=ubuntu:ubuntu /home/ubuntu/intel-extension-for-pytorch/e
5454
COPY --from=dev --chown=ubuntu:ubuntu /home/ubuntu/intel-extension-for-pytorch/tools/get_libstdcpp_lib.sh .
5555
COPY --from=dev --chown=ubuntu:ubuntu /home/ubuntu/intel-extension-for-pytorch/tools/basekit_driver_install_helper.sh .
5656
RUN bash ./basekit_driver_install_helper.sh runtime-dev
57-
RUN . ./miniconda3/bin/activate && \
57+
RUN . ./miniforge3/bin/activate && \
5858
conda create -y -n py310 python=3.10 && conda activate py310 && \
5959
echo "conda activate py310" >> ./.bashrc && \
6060
ldpreload=$(bash get_libstdcpp_lib.sh) && echo "export LD_PRELOAD=${ldpreload}" >> ./.bashrc && rm get_libstdcpp_lib.sh && \

0 commit comments

Comments
 (0)