Skip to content

Commit 190e6b2

Browse files
authored
Fix itrex qbits nf4/int8 training core dumped issue (#1954)
Signed-off-by: Kaihui-intel <[email protected]> Signed-off-by: chensuyue <[email protected]>
1 parent 0e724a4 commit 190e6b2

File tree

7 files changed

+14
-4
lines changed

7 files changed

+14
-4
lines changed

.azure-pipelines/scripts/models/run_pytorch_models_trigger.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ FRAMEWORK="pytorch"
7272
source /neural-compressor/.azure-pipelines/scripts/fwk_version.sh 'latest'
7373
if [[ "${inc_new_api}" == "3x"* ]]; then
7474
FRAMEWORK_VERSION="latest"
75+
export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
7576
else
7677
FRAMEWORK_VERSION=${pytorch_version}
7778
TORCH_VISION_VERSION=${torchvision_version}

.azure-pipelines/scripts/ut/3x/run_3x_pt.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ echo "${test_case}"
55

66
# install requirements
77
echo "set up UT env..."
8+
export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
89
pip install -r /neural-compressor/test/3x/torch/requirements.txt
910
pip install pytest-cov
1011
pip install pytest-html

.azure-pipelines/scripts/ut/run_itrex.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ echo "run itrex ut..."
66

77
# install inc 3x deps
88
pip install -r /neural-compressor/requirements_pt.txt
9+
export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
910

1011
# prepare itrex
1112
git clone https://github.com/intel/intel-extension-for-transformers.git /intel-extension-for-transformers

.azure-pipelines/ut-itrex.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ pr:
1313
- requirements.txt
1414
- .azure-pipelines/scripts/ut/run_itrex.sh
1515
- .azure-pipelines/ut-itrex.yml
16-
exclude:
17-
- neural_compressor/common
18-
- neural_compressor/torch
19-
- neural_compressor/tensorflow
2016

2117
pool: MODEL_PERF_TEST
2218

docs/source/faq.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,12 @@ ImportError: libGL.so.1: cannot open shared object file: No such file or directo
1717
#### Issue 4:
1818
Conda package *neural-compressor-full* (this binary is only available from v1.13 to v2.1.1) dependency conflict may pending on conda installation for a long time.
1919
**Solution:** run *conda install sqlalchemy=1.4.27 alembic=1.7.7 -c conda-forge* before install *neural-compressor-full*.
20+
#### Issue 5:
21+
If you run 3X torch extension API inside a docker container, then you may encounter the following error:
22+
```shell
23+
ValueError: No threading layer could be loaded.
24+
HINT:
25+
Intel TBB is required, try:
26+
$ conda/pip install tbb
27+
```
28+
**Solution:** It's actually already installed by `requirements_pt.txt`, so just need to set up with `export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH`.

neural_compressor/torch/algorithms/weight_only/modules.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,7 @@ def pack_array_with_numba(
607607

608608
pack_method_name = f"pack_array_with_numba_b{bits}_c{compress_bits}"
609609
pack_method = getattr(self, pack_method_name)
610+
numba.config.THREADING_LAYER = "safe"
610611
return pack_method(raw_array, packed_array, n_pack, new_in_features)
611612

612613
def pack_tensor_with_numpy_impl(self, raw_tensor):

requirements_pt.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ prettytable
55
psutil
66
py-cpuinfo
77
pydantic
8+
tbb

0 commit comments

Comments
 (0)