Skip to content

Commit 5533414

Browse files
authored
modify readme for jupyterlab extension (#1298)
* modify readme for jupyterlab extension * fix typo
1 parent d4388dd commit 5533414

File tree

3 files changed

+73
-9
lines changed

3 files changed

+73
-9
lines changed

neural_coder/backends/.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Copyright (c) 2022 Intel Corporation
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
transformation:
16+
location:
17+
-
18+
-
19+
-
20+
content:
21+
- |-
22+
[+] YOUR CODE LINE 1
23+
[+] YOUR CODE LINE 2
24+
[+] YOUR CODE LINE 3
25+
- |-
26+
[+] YOUR CODE LINE 1
27+
[+] YOUR CODE LINE 2
28+
[+] YOUR CODE LINE 3
29+
- |-
30+
[+] YOUR CODE LINE 1
31+
[+] YOUR CODE LINE 2
32+
[+] YOUR CODE LINE 3
33+
order:
34+
- below:
35+
-
36+
-
37+
above:
38+
-
39+
-
40+
- below:
41+
-
42+
-
43+
above:
44+
-
45+
-
46+
- below:
47+
-
48+
-
49+
above:
50+
-
51+
-

neural_coder/docs/IntelCPU_PerformanceSetting.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
## Intel CPU Platforms: Best Performance Setting
22
### Install MKL, OpenMP and JEMALLOC
33
Through CONDA is the simplest way:
4-
```python
4+
```bash
55
conda install -y mkl mkl-include jemalloc
66
```
77

8+
### Install NUMA Controller
9+
```bash
10+
apt-get update && apt-get install bc numactl
11+
```
12+
813
### Environment Variables
914
Check if your ```CONDA_PREFIX``` has a value by:
10-
```
15+
```bash
1116
echo ${CONDA_PREFIX}
1217
```
1318
If it's empty, it means that you're not in a traditional CONDA environment, you need to find the location of the ```.so.``` files by:
14-
```
19+
```bash
1520
find / -name "libjemalloc.so"
1621
find / -name "libiomp5.so"
1722
```
1823
It will show the path these file were installed into, for example:
19-
```
24+
```bash
2025
/home/name/lib/libjemalloc.so
2126
/home/name/lib/libiomp5.so
2227
```
2328
And then you should export this path as ```CONDA_PREFIX```:
24-
```
29+
```bash
2530
export CONDA_PREFIX="/home/name"
2631
```
2732
Finally:
@@ -40,7 +45,7 @@ Check frequency governer state on your machine:
4045
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
4146
```
4247
If is shows ```powersave``` instead of ```performance```, execute:
43-
```
48+
```bash
4449
echo "performance" | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
4550
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
4651
```

neural_coder/extensions/neural_compressor_ext_lab/README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ Intel® Neural Compressor as JupyterLab Extension
33
A JupyterLab Extension library supporting Neural Coder, a novel feature powered by Intel® Neural Compressor providing automatic quantization to further simplify computing performance optimizations of Deep Learning models.
44

55
## Installation
6-
**By Extension Manager in JupyterLab**
6+
**By Extension Manager in JupyterLab (Recommended)**
77

8-
Search for ```jupyter-lab-neural-compressor``` in the Extension Manager in JupyterLab. Note that this works for the stable version of JupyterLab 3.
8+
Search for ```jupyter-lab-neural-compressor``` in the Extension Manager in JupyterLab.
99

1010
**By Linux Terminal**
11-
```Shell
11+
```bash
12+
npm i jupyter-lab-neural-compressor
1213
jupyter labextension install jupyter-lab-neural-compressor
1314
```
1415

@@ -35,3 +36,10 @@ In the new cell box appeared below your Code cell boxes, you can see the executi
3536
When it is finished, you can also see that the code changes for the best optimization are automatically enabled into your script:
3637

3738
<img src="../screenshots/5.png" alt="Architecture" width="55%" height="55%">
39+
40+
## Pre-requisites
41+
```bash
42+
apt-get update && apt-get install bc numactl
43+
conda install mkl mkl-include jemalloc
44+
pip3 install neural-compressor opencv-python-headless
45+
```

0 commit comments

Comments
 (0)