You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* remove basekit activate & add OCL_ICD_VENDORS setting
* add python execution example
* update CCL_ROOT setting with multi-gpu usage
* update compile bundle bat branch to release tag
* update example in getting started
* correct version of intel-level-zero-gpu
* remove deprecated api
* set version of accelerate for finetune
* fix model name
* Update deepspeed in requirements.txt
* update release note and known issue
* update ipex.llm.optimize
* update IPEX_LOG
---------
Co-authored-by: Jing Xu <[email protected]>
Co-authored-by: jundu <[email protected]>
Co-authored-by: Ye Ting <[email protected]>
Co-authored-by: zhuyuhua-v <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ The extension can be loaded as a Python module for Python programs or linked as
23
23
24
24
In the current technological landscape, Generative AI (GenAI) workloads and models have gained widespread attention and popularity. Large Language Models (LLMs) have emerged as the dominant models driving these GenAI applications. Starting from 2.1.0, specific optimizations for certain LLM models are introduced in the Intel® Extension for PyTorch\*. Check [LLM optimizations CPU](./examples/cpu/inference/python/llm) and [LLM optimizations GPU](./examples/gpu/llm) for details.
Copy file name to clipboardExpand all lines: docs/tutorials/features.rst
+5-17Lines changed: 5 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -137,19 +137,6 @@ For more detailed information, check `torch.compile for GPU <features/torch_comp
137
137
138
138
features/torch_compile_gpu
139
139
140
-
Simple Trace Tool (Prototype)
141
-
-----------------------------
142
-
143
-
Simple Trace is a built-in debugging tool that lets you control printing out the call stack for a piece of code. Once enabled, it can automatically print out verbose messages of called operators in a stack format with indenting to distinguish the context.
144
-
145
-
For more detailed information, check `Simple Trace Tool <features/simple_trace.md>`_.
146
-
147
-
.. toctree::
148
-
:hidden:
149
-
:maxdepth:1
150
-
151
-
features/simple_trace
152
-
153
140
Kineto Supported Profiler Tool (Prototype)
154
141
------------------------------------------
155
142
@@ -178,13 +165,13 @@ For more detailed information, check `Compute Engine <features/compute_engine.md
178
165
features/compute_engine
179
166
180
167
181
-
``IPEX_LOGGING`` (Prototype feature for debug)
182
-
----------------------------------------------
168
+
``IPEX_LOG`` (Prototype feature for debug)
169
+
------------------------------------------
183
170
184
171
185
-
``IPEX_LOGGING`` provides the capability to log verbose information from Intel® Extension for PyTorch\* . Please use ``IPEX_LOGGING`` to get the log information or trace the execution from Intel® Extension for PyTorch\*. Please continue using PyTorch\* macros such as ``TORCH_CHECK``, ``TORCH_ERROR``, etc. to get the log information from PyTorch\*.
172
+
``IPEX_LOG`` provides the capability to log verbose information from Intel® Extension for PyTorch\* . Please use ``IPEX_LOG`` to get the log information or trace the execution from Intel® Extension for PyTorch\*. Please continue using PyTorch\* macros such as ``TORCH_CHECK``, ``TORCH_ERROR``, etc. to get the log information from PyTorch\*.
186
173
187
-
For more detailed information, check `IPEX_LOGGING<features/ipex_log.md>`_.
174
+
For more detailed information, check `IPEX_LOG<features/ipex_log.md>`_.
188
175
189
176
.. toctree::
190
177
:hidden:
@@ -193,3 +180,4 @@ For more detailed information, check `IPEX_LOGGING <features/ipex_log.md>`_.
Copy file name to clipboardExpand all lines: docs/tutorials/features/ipex_log.md
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
-
`IPEX_LOGGING` (Prototype)
1
+
`IPEX_LOG` (Prototype)
2
2
==========================
3
3
4
4
## Introduction
5
5
6
-
`IPEX_LOGGING` provides the capability to log verbose information from Intel® Extension for PyTorch\* . Please use `IPEX_LOGGING` to get the log information or trace the execution from Intel® Extension for PyTorch\*. Please continue using PyTorch\* macros such as `TORCH_CHECK`, `TORCH_ERROR`, etc. to get the log information from PyTorch\*.
6
+
`IPEX_LOG` provides the capability to log verbose information from Intel® Extension for PyTorch\* . Please use `IPEX_LOG` to get the log information or trace the execution from Intel® Extension for PyTorch\*. Please continue using PyTorch\* macros such as `TORCH_CHECK`, `TORCH_ERROR`, etc. to get the log information from PyTorch\*.
7
7
8
-
## `IPEX_LOGGING` Definition
8
+
## `IPEX_LOG` Definition
9
9
### Log Level
10
10
The supported log levels are defined as follows, default log level is `DISABLED`:
11
11
@@ -81,3 +81,4 @@ Use `torch.xpu.set_log_level(0)` to get logs to replace the previous usage in `I
81
81
82
82
## Replace `IPEX_VERBOSE`
83
83
Use `torch.xpu.set_log_level(1)` to get logs to replace the previous usage in `IPEX_VERBOSE`.
Copy file name to clipboardExpand all lines: docs/tutorials/getting_started.md
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -32,9 +32,9 @@ model = ipex.optimize(model, dtype=dtype)
32
32
########## FP32 ############
33
33
with torch.no_grad():
34
34
####### BF16 on CPU ########
35
-
with torch.no_grad(), withtorch.cpu.amp.autocast():
35
+
with torch.no_grad(), torch.cpu.amp.autocast():
36
36
##### BF16/FP16 on GPU #####
37
-
with torch.no_grad(), withtorch.xpu.amp.autocast(enabled=True, dtype=dtype, cache_enabled=False):
37
+
with torch.no_grad(), torch.xpu.amp.autocast(enabled=True, dtype=dtype, cache_enabled=False):
38
38
############################
39
39
###### Torchscript #######
40
40
model = torch.jit.trace(model, data)
@@ -49,13 +49,14 @@ More examples, including training and usage of low precision data types are avai
49
49
50
50
## Execution
51
51
52
-
Execution requires an active Intel® oneAPI environment. Suppose you have the Intel® oneAPI Base Toolkit installed in `/opt/intel/oneapi` directory, activating the environment is as simple as sourcing its environment activation bash scripts.
53
-
54
52
There are some environment variables in runtime that can be used to configure executions on GPU. Please check [Advanced Configuration](./features/advanced_configuration.html#runtime-configuration) for more detailed information.
55
53
54
+
Set `OCL_ICD_VENDORS` with default path `/etc/OpenCL/vendors`.
Copy file name to clipboardExpand all lines: docs/tutorials/known_issues.md
+31-19Lines changed: 31 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -4,44 +4,40 @@ Troubleshooting
4
4
## General Usage
5
5
6
6
-**Problem**: FP64 data type is unsupported on current platform.
7
-
-**Cause**: FP64 is not natively supported by the [Intel® Data Center GPU Flex Series](https://www.intel.com/content/www/us/en/products/docs/discrete-gpus/data-center-gpu/flex-series/overview.html) and [Intel® Arc™ A-Series Graphics](https://www.intel.com/content/www/us/en/products/details/discrete-gpus/arc.html) platforms.
7
+
-**Cause**: FP64 is not natively supported by the [Intel® Data Center GPU Flex Series](https://www.intel.com/content/www/us/en/products/docs/discrete-gpus/data-center-gpu/flex-series/overview.html) and [Intel® Arc™ A-Series Graphics](https://www.intel.com/content/www/us/en/products/details/discrete-gpus/arc.html) platforms.
8
8
If you run any AI workload on that platform and receive this error message, it means a kernel requires FP64 instructions that are not supported and the execution is stopped.
9
-
-**Problem**: Runtime error `invalid device pointer` if `import horovod.torch as hvd` before `import intel_extension_for_pytorch`
9
+
-**Problem**: Runtime error `invalid device pointer` if `import horovod.torch as hvd` before `import intel_extension_for_pytorch`.
10
10
-**Cause**: Intel® Optimization for Horovod\* uses utilities provided by Intel® Extension for PyTorch\*. The improper import order causes Intel® Extension for PyTorch\* to be unloaded before Intel®
11
11
Optimization for Horovod\* at the end of the execution and triggers this error.
12
12
-**Solution**: Do `import intel_extension_for_pytorch` before `import horovod.torch as hvd`.
13
13
-**Problem**: Number of dpcpp devices should be greater than zero.
14
-
-**Cause**: If you use Intel® Extension for PyTorch* in a conda environment, you might encounter this error. Conda also ships the libstdc++.so dynamic library file that may conflict with the one shipped
15
-
in the OS.
14
+
-**Cause**: If you use Intel® Extension for PyTorch\* in a conda environment, you might encounter this error. Conda also ships the libstdc++.so dynamic library file that may conflict with the one shipped
15
+
in the OS.
16
16
-**Solution**: Export the `libstdc++.so` file path in the OS to an environment variable `LD_PRELOAD`.
17
17
-**Problem**: Symbol undefined caused by `_GLIBCXX_USE_CXX11_ABI`.
- **Cause**: DPC++ does not support `_GLIBCXX_USE_CXX11_ABI=0`, Intel® Extension for PyTorch\* is always compiled with `_GLIBCXX_USE_CXX11_ABI=1`. This symbol undefined issue appears when PyTorch\* is
22
22
compiled with `_GLIBCXX_USE_CXX11_ABI=0`.
23
-
- **Solution**: Pass `export GLIBCXX_USE_CXX11_ABI=1` and compile PyTorch\* with particular compiler which supports `_GLIBCXX_USE_CXX11_ABI=1`. We recommend using prebuilt wheels
23
+
- **Solution**: Pass `export GLIBCXX_USE_CXX11_ABI=1` and compile PyTorch\* with particular compiler which supports `_GLIBCXX_USE_CXX11_ABI=1`. We recommend using prebuilt wheels
24
24
in [download server](https:// developer.intel.com/ipex-whl-stable-xpu) to avoid this issue.
25
-
- **Problem**: Bad termination after AI model execution finishes when using Intel MPI.
26
-
- **Cause**: This is a random issue when the AI model (e.g. RN50 training) execution finishes in an Intel MPI environment. It is not user-friendly as the model execution ends ungracefully. It has been fixed in PyTorch* 2.3 ([#116312](https://github.com/pytorch/pytorch/commit/f657b2b1f8f35aa6ee199c4690d38a2b460387ae)).
27
-
- **Solution**: Add `dist.destroy_process_group()` during the cleanup stage in the model script, as described
28
-
in [Getting Started with Distributed Data Parallel](https://pytorch.org/tutorials/intermediate/ddp_tutorial.html), before Intel® Extension for PyTorch* supports PyTorch* 2.3.
29
25
- **Problem**: `-997 runtime error` when running some AI models on Intel® Arc™ A-Series GPUs.
30
-
- **Cause**: Some of the `-997 runtime error` are actually out-of-memory errors. As Intel® Arc™ A-Series GPUs have less device memory than Intel® Data Center GPU Flex Series 170 and Intel® Data Center GPU
26
+
- **Cause**: Some of the `-997 runtime error` are actually out-of-memory errors. As Intel® Arc™ A-Series GPUs have less device memory than Intel® Data Center GPU Flex Series 170 and Intel® Data Center GPU
31
27
Max Series, running some AI models on them may trigger out-of-memory errors and cause them to report failure such as `-997 runtime error` most likely. This is expected. Memory usage optimization is a work in progress to allow Intel® Arc™ A-Series GPUs to support more AI models.
32
28
- **Problem**: Building from sourcefor Intel® Arc™ A-Series GPUs fails on WSL2 without any error thrown.
33
29
- **Cause**: Your system probably does not have enough RAM, so Linux kernel's Out-of-memory killer was invoked. You can verify this by running `dmesg` on bash (WSL2 terminal).
34
-
- **Solution**: If the OOM killer had indeed killed the build process, then you can try increasing the swap-size of WSL2, and/or decreasing the number of parallel build jobs with the environment
30
+
- **Solution**: If the OOM killer had indeed killed the build process, then you can try increasing the swap-size of WSL2, and/or decreasing the number of parallel build jobs with the environment
35
31
variable `MAX_JOBS` (by default, it's equal to the number of logical CPU cores. So, setting `MAX_JOBS` to 1 is a very conservative approach that would slow things down a lot).
36
32
- **Problem**: Some workloads terminate with an error `CL_DEVICE_NOT_FOUND` after some time on WSL2.
37
33
- **Cause**: This issue is due to the [TDR feature](https://learn.microsoft.com/en-us/windows-hardware/drivers/display/tdr-registry-keys#tdrdelay) on Windows.
38
34
- **Solution**: Try increasing TDRDelay in your Windows Registry to a large value, such as 20 (it is 2 seconds, by default), and reboot.
39
35
- **Problem**: Random bad termination after AI model convergence test (>24 hours) finishes.
40
36
- **Cause**: This is a random issue when some AI model convergence test execution finishes. It is not user-friendly as the model execution ends ungracefully.
41
37
- **Solution**: Kill the process after the convergence test finished, or use checkpoints to divide the convergence test into several phases and execute separately.
42
-
- **Problem**: Random instability issues such as page fault or atomic access violation when executing LLM inference workloads on Intel® Data Center GPU Max series cards.
43
-
- **Cause**: This issue is reported on LTS driver [803.29](https://dgpu-docs.intel.com/releases/LTS_803.29_20240131.html). The root cause is under investigation.
44
-
- **Solution**: Use active rolling stable release driver [775.20](https://dgpu-docs.intel.com/releases/stable_775_20_20231219.html) or latest driver version to workaround.
38
+
- **Problem**: Runtime error `munmap_chunk(): invalid pointer`when executing some scaling LLM workloads on Intel® Data Center GPU Max Series platform
39
+
- **Cause**: Users targeting GPU use, must set the environment variable ‘FI_HMEM=system’ to disable GPU support in underlying libfabric as Intel® MPI Library 2021.13.1 will offload the GPU support instead. This avoids a potential bug in libfabric GPU initialization.
40
+
- **Solution**: Set the environment variable ‘FI_HMEM=system’ to workaround this issue when encounter.
45
41
46
42
## Library Dependencies
47
43
@@ -54,7 +50,7 @@ Troubleshooting
54
50
/usr/bin/ld: cannot find -lmkl_tbb_thread
55
51
dpcpp: error: linker command failed with exit code 1 (use -v to see invocation)
56
52
```
57
-
53
+
58
54
-**Cause**: When PyTorch\* is built with oneMKL library and Intel® Extension for PyTorch\* is built without MKL library, this linker issue may occur.
- **Cause**: This issue may occur when Intel® Extension for PyTorch\* is built with oneMKL library and PyTorch\* is not build with any MKL library. The oneMKL kernel may run into CPU backend incorrectly
70
-
and trigger this issue.
65
+
- **Cause**: This issue may occur when Intel® Extension for PyTorch\* is built with oneMKL library and PyTorch\* is not build with any MKL library. The oneMKL kernel may run into CPU backend incorrectly
66
+
and trigger this issue.
71
67
- **Solution**: Resolve the issue by installing the oneMKL library from conda:
72
68
73
69
```bash
@@ -87,14 +83,30 @@ Troubleshooting
87
83
88
84
If you continue seeing similar issues for other shared object files, add the corresponding files under `${MKL_DPCPP_ROOT}/lib/intel64/` by `LD_PRELOAD`. Note that the suffix of the libraries may change (e.g. from .1 to .2), if more than one oneMKL library is installed on the system.
89
85
86
+
- **Problem**: RuntimeError: could not create an engine.
87
+
- **Cause**: `OCL_ICD_VENDORS` path is wrongly set when activate a exist conda environment.
88
+
- **Solution**: `export OCL_ICD_VENDORS=/etc/OpenCL/vendors` after `conda activate`
89
+
90
+
- **Problem**: If you encounter issues related to CCL environment variable configuration when running distributed tasks.
91
+
- **Cause**: `CCL_ROOT` path is wrongly set.
92
+
- **Solution**: `export CCL_ROOT=${CONDA_PREFIX}`
90
93
91
-
## Performance Issue
94
+
- **Problem**: If you encounter issues related to MPI environment variable configuration when running distributed tasks.
95
+
- **Cause**: MPI environment variable configuration not correct.
96
+
- **Solution**: `conda deactivate` and then`conda activate` to activate the correct MPI environment variable automatically.
97
+
98
+
```
99
+
conda deactivate
100
+
conda activate
101
+
export OCL_ICD_VENDORS=/etc/OpenCL/vendors
102
+
```
103
+
104
+
## Performance Issue
92
105
93
106
- **Problem**: Extended durations for data transfers from the host system to the device (H2D) and from the device back to the host system (D2H).
94
107
- **Cause**: Absence of certain Dynamic Kernel Module Support (DKMS) packages on Ubuntu 22.04 or earlier versions.
95
108
- **Solution**: For those running Ubuntu 22.04 or below, it's crucial to follow all the recommended installation procedures, including those labeled as [optional](https://dgpu-docs.intel.com/driver/client/overview.html#optional-out-of-tree-kernel-mode-driver-install). These steps are likely necessary to install the missing DKMS packages and ensure your system is functioning optimally. The Kernel Mode Driver (KMD) package that addresses this issue has been integrated into the Linux kernel for Ubuntu 23.04 and subsequent releases.
96
109
97
-
98
110
## Unit Test
99
111
100
112
- Unit test failures on Intel® Data Center GPU Flex Series 170
0 commit comments