Skip to content

Commit 3df70b7

Browse files
author
intJulia
committed
GSG changes
1 parent b225df0 commit 3df70b7

1 file changed

Lines changed: 96 additions & 72 deletions

File tree

‎docs/source/IDP_GSG.md‎

Lines changed: 96 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11

2-
[!(Intel® Distribution for Python*)](https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html) is a cluster of packages that includes Numba*, NumPy* and more. All these packages are optimized via [!(Intel® oneAPI Math Kernel Library (oneMKL))](https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html#gs.ddfdq4) and [!(Intel® oneAPI Data Analytics Library (oneDAL))](https://www.intel.com/content/www/us/en/developer/tools/oneapi/onedal.html) to make the Python* application more efficient. The distribution includes a multitude of popular components, some of which include:
2+
[Intel® Distribution for Python*](https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html) is a cluster of packages that includes Numba*, NumPy* and more. All these packages are optimized via [Intel® oneAPI Math Kernel Library (oneMKL](https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html#gs.ddfdq4) and [Intel® oneAPI Data Analytics Library (oneDAL](https://www.intel.com/content/www/us/en/developer/tools/oneapi/onedal.html) to make the Python* application more efficient. The distribution includes a multitude of popular components, some of which include:
33

44
Libraries:
55
- Python
6-
- numPy
6+
- NumPy
77
- SciPy
8+
89
Mkl interfaces:
910
- Mkl-service
1011
- Mkl-random
1112
- Mkl-fft
1213
- Mkl-umath
14+
1315
GPU components:
1416
- Dpctl
1517
- Dpnp
@@ -20,22 +22,26 @@ GPU components:
2022
CPUs:
2123
- Intel® Core™ processor family
2224
- Intel® Xeon® processor family
25+
2326
GPUs:
2427
- Intel® UHD Graphics for 11th generation Intel processors or newer
2528
- Intel® Iris® Xᵉ graphics
2629
- Intel® Arc™ graphics
2730
- Intel® Data Center GPU Flex Series
2831
- Intel® Data Center GPU Max Series
32+
2933
Operating systems:
3034
- Unix family*
3135
- Windows® 10
3236
- Windows* 11
3337
- pported versions:
3438
- Python 3.11, Python 3.12
39+
3540
Package management:
3641
- conda*
3742
- Pip
38-
- mamba
43+
- Mamba
44+
3945
Compatible with:
4046
- VS Code
4147
- Jupyter Notebook
@@ -44,39 +50,46 @@ Compatible with:
4450

4551
## Supported Installation Options
4652

47-
The Intel ® Distribution for Python* supports several installation options
53+
The Intel® Distribution for Python* supports several installation options
4854

4955
Supported operating systems are outlined under System Requirements.
50-
You may select the components you wish to install. The full list of components in the Intel® Distribution for Python* is outlined on the landing page section [!(What’s Included)](https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html).
56+
You may select the components you wish to install. The full list of components in the Intel® Distribution for Python* is outlined on the landing page section [What’s Included](https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html).
5157

52-
## GPU USers
53-
You can use [!(Intel® Distribution for Python* in Intel® Tiber™ Developer Cloud)](https://www.intel.com/content/www/us/en/developer/tools/devcloud/services.html). After getting access to the cloud system, follow the instructions below to install Intel® Distribution for Python* with one of the available installation options.
58+
## GPU Users
59+
You can use [Intel® Distribution for Python* in Intel® Tiber™ Developer Cloud](https://www.intel.com/content/www/us/en/developer/tools/devcloud/services.html). After getting access to the cloud system, follow the instructions below to install Intel® Distribution for Python* with one of the available installation options.
5460

5561
## Offline Installer
56-
1. To download Intel Distribution for Python*, visit here and choose the installation method of your choice.
62+
1. To download the Intel® Distribution for Python*, visit [here](https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-python-download.html) and choose the installation method of your choice.
5763
2. Run the following commands to install on respective platform:
64+
65+
**Linux installation (Interactive)**
66+
Note that the file name must be changed to how to appears in your downloads folder.
5867
```bash
59-
# Linux installation (Interactive)
60-
# Note that the file name must be changed to how to appears in your downloads folder.
6168
bash ~/intelpython3-202X.X.X.sh
69+
```
6270

63-
# Linux installation (CLI)
71+
**Linux installation (CLI)**
72+
```bash
6473
bash ~/intelpython3.sh -b -u -p ~/intelpython3
74+
```
75+
The flags can be included as necessary. They are used as follows:
76+
-b enables batch mode, running the installation without interactive prompts.
77+
-u updates the current installation. You may omit this if this is the first time you’re installing IDP on this machine.
78+
-p specifies the installation path prefix. In this example, ~/intelpython3 is the target directory.
6579

66-
# The flags can be included as necessary. They are used as follows:
67-
# -b enables batch mode, running the installation without interactive prompts.
68-
# -u updates the current installation. You may omit this if this is the first time you’re installing IDP on this machine.
69-
# -p specifies the installation path prefix. In this example, ~/intelpython3 is the target directory.
70-
71-
# Windows installation (Interactive)
80+
**Windows installation (Interactive)**
81+
```bash
7282
intelpython3.exe
83+
```
7384

74-
# Windows installation (CLI)
85+
**Windows installation (CLI)**
86+
```bash
7587
start /wait intelpython3.exe /S /RegisterPython=0 /D=%LOCALAPPDATA%\intelpython3
7688
```
7789

78-
3. Activate the conda environment.
79-
*Linux*
90+
3. Activate the conda environment on your respective platform.
91+
92+
**Linux**
8093
The following commands can be used to activate the Intel® Distribution for Python installation:
8194
```bash
8295
#Root access or Intel(R) Developer Cloud installation*
@@ -86,61 +99,84 @@ source /opt/intel/intelpython3/bin/activate
8699
source $HOME/intelpython3/bin/activate
87100
```
88101

89-
*Windows*
90-
Navigate to the installation directory of Intel Python and find the "Scripts" directory, then run `.\activate` in the terminal. This runs the base activate script found at
91-
`C:/User/path/to/intelpython3\Scripts\activate`
102+
**Windows**
103+
Navigate to the installation directory of Intel Python and find the "Scripts" directory, then run `.\activate` in the terminal.
92104

93-
The command prompt should point to installation when running `where python`
94-
`(base) C:/User/path/to/intelpython3`
105+
The command prompt should now show `(base)` at the start of the command prompt.
106+
107+
4. Verify instalaltion.
108+
```bash
109+
conda list
110+
```
111+
112+
**Deactivating environment for Offline Installer**
113+
To deactivate your IDP environment, run the command below until base env is deactivated.
114+
115+
```bash
116+
conda deactivate
117+
```
95118

96-
Installation verification – `conda list`
97-
98-
*Deactivating environment for Offline Installer*
99-
To deactivate your IDP environment, run `conda deactivate` until base env is deactivated
100-
`conda deactivate`
101119

102120
## Conda
103121
1. Follow conda Installation Guide to install conda in your environment. If you already have conda installed in your system, update it with the command:
104-
`conda update conda `
122+
```bash
123+
conda update conda
124+
```
105125
2. Add Intel channel and conda-forge to tell conda to choose Intel packages over default packages when available.
106126
```bash
107127
conda config --add channels https://software.repos.intel.com/python/conda/
108128
conda config --add channels conda-forge
109-
110-
# Remove defaults channel from .condarc if it exists
129+
```
130+
Remove defaults channel from .condarc if it exists
131+
```bash
111132
conda config --remove channels defaults
112133
```
113-
3. Install Intel® Distribution for Python* via conda. We recommend that you create a new environment while installing. To install the core python3 environment, run the following command:
134+
3. Install Intel® Distribution for Python* via conda. We recommend that you create a new environment while installing. To install the python3 environment, run the following command:
114135
`conda create -n idp intelpython3_full python=3.x`
115136
Please note that “x” in “python=3.x” should signify which version of Python* you would like to install. For example, for Python* version 3.9:
116-
`conda create -n idp intelpython3_core python=3.9`
117-
For individual installation commands, refer to the [!(What’s included](https://www.intel.com/content/www/us/en/developer/articles/tool/whats-included-distribution-for-python.html#packageEnvironmentManagers) section.
137+
`conda create -n idp intelpython3_full python=3.9`
138+
139+
>For individual installation commands, refer to the [What’s included](https://www.intel.com/content/www/us/en/developer/articles/tool/whats-included-distribution-for-python.html#packageEnvironmentManagers) section.
118140
4. Activate the conda environment:
119-
`conda activate idp`
141+
```bash
142+
conda activate idp
143+
```
120144

121145
## Mamba
122-
1. If you do not have Mamba, get Miniforge by following the instructions here
123-
`conda update mamba`
146+
1. If you do not have Mamba, get Miniforge by following the instructions [here](https://github.com/conda-forge/miniforge?tab=readme-ov-file#install). Otherwise, ensure that it is updated:
147+
```bash
148+
conda update mamba
149+
```
124150
2. Add Intel channel and conda-forge to tell conda to choose Intel packages over default packages, when available.
125151
```bash
126152
conda config --add channels https://software.repos.intel.com/python/conda/
127153
conda config --add channels conda-forge
128-
129-
# Remove defaults channel from .condarc if it exists
154+
```
155+
Remove defaults channel from .condarc if it exists.
156+
```bash
130157
conda config --remove channels defaults
131158
```
132159
3. Install Intel® Distribution for Python* via Mamba. We recommend that you create a new environment while installing. To install the core python3 environment, run the following command:
133-
`mamba create -n idp intelpython3_full python=3.x`
134-
Please note that “x” in “python=3.x” should signify which version of Python* you would like to install.
160+
```bash
161+
mamba create -n idp intelpython3_full python=3.x
162+
```
163+
Please note that “x” in `python=3.x` should signify which version of Python* you would like to install.
164+
135165
4. Acitvate conda environment, then follow the usual steps for activating the environment:
166+
```bash
136167
mamba activate idp
137-
5. Installation verification
138-
`mamba list `
168+
```
169+
5. Verify installation.
170+
```bash
171+
mamba list
172+
```
139173

140174
## Docker
141-
1. If you don’t have Docker installed on your machine, follow [!(these instructions)](https://docs.docker.com/engine/install/) to install it.
142-
2. Pull the image from [!(DockerHub)](https://hub.docker.com/r/intel/python) using the following command:
143-
`docker pull intel/python:latest `
175+
1. If you don’t have Docker installed on your machine, follow [these instructions](https://docs.docker.com/engine/install/) to install it.
176+
2. Pull the image from [DockerHub](https://hub.docker.com/r/intel/python) using the following command:
177+
```bash
178+
docker pull intel/python:latest
179+
```
144180
3. Run a performance sample by running the following commands:
145181
```bash
146182
git clone https://github.com/intel/ai-containers
@@ -150,27 +186,14 @@ docker run --rm -it \
150186
intel/python:latest \
151187
python /tests/perf_sample.py
152188
```
153-
4. Installation verification
154-
`conda list`
155-
156-
## Proof of Concept
157-
You can see the benefits of using the Intel® Distribution for Python* on your own machine by comparing a simple program’s runtime between both distributions. First, run the sample code below in your new Intel® Distribution for Python* environment, and take note of the total runtime which should be displayed in the output.
189+
4. Verify installation.
158190
```bash
159-
import numpy as np
160-
import time
161-
162-
start = time.time()
163-
164-
rd = np.random.RandomState(88)
165-
a = rd.randint(1,1000,(1000,1000))
166-
y = rd.randint(1,1000,(1000))
167-
res = np.linalg.solve(a,y)
191+
conda list
192+
```
168193

169-
end = time.time()
194+
## Example with NumPy
195+
You can see the benefits of using the Intel® Distribution for Python* on your own machine by comparing a simple program’s runtime between both distributions. First, run the sample code below in your new Intel® Distribution for Python* environment, and take note of the total runtime which should be displayed in the output.
170196

171-
print(res)
172-
print('Time Consuming:',end-start)
173-
```
174197

175198
Once you have taken note of the runtime of this program, switch the environment back to stock Python* and run the script again. Compare the runtime in the stock environment to the runtime in the Intel® distribution environment. You should see the benefits provided by the Intel® Distribution for Python* through the significantly decreased runtime.
176199

@@ -182,16 +205,17 @@ this]
182205
No special modifications to your existing Python* projects are required to start using them with this toolkit. You can refer to samples on GitHub to learn more about this distribution.#
183206

184207
## Profiling Python Code
185-
- [!(Intel® VTune™ Profiler)](https://www.intel.com/content/www/us/en/developer/tools/oneapi/vtune-profiler.html)
186-
- [!(• Intel® Advisor)](https://www.intel.com/content/www/us/en/developer/tools/oneapi/advisor.html)
208+
- [Intel® VTune™ Profiler](https://www.intel.com/content/www/us/en/developer/tools/oneapi/vtune-profiler.html)
209+
- [Intel® Advisor](https://www.intel.com/content/www/us/en/developer/tools/oneapi/advisor.html)
187210

188211
## Additional Resources
189-
- [!(Data Parallel Extension for NumPy* documentation)](https://intelpython.github.io/dpnp/)
190-
- [!(Data Parallel Control Library* documentation )](https://intelpython.github.io/dpctl/latest/index.html)
191-
- [!(Data Parallel Extension for Numba* documentation)](https://intelpython.github.io/numba-dpex/latest/index.html)
212+
- [What's Included](https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html)
213+
- [Data Parallel Extension for NumPy* documentation](https://intelpython.github.io/dpnp/)
214+
- [Data Parallel Control Library* documentation](https://intelpython.github.io/dpctl/latest/index.html)
215+
- [Data Parallel Extension for Numba* documentation](https://intelpython.github.io/numba-dpex/latest/index.html)
192216

193217
## Support
194-
If you have further questions or need support on your workload optimization, please submit your queries to the [!(Intel® Distribution for Python* Forum)](https://community.intel.com/t5/Intel-Distribution-for-Python/bd-p/distribution-python) or [!(Intel® Distribution for Python* GitHub)](https://github.com/IntelPython), on the Issues or Discussions pages, depending on the type of support required.
218+
If you have further questions or need support on your workload optimization, please submit your queries to the [Intel® Distribution for Python* Forum](https://community.intel.com/t5/Intel-Distribution-for-Python/bd-p/distribution-python) or [Intel® Distribution for Python* GitHub](https://github.com/IntelPython), on the Issues or Discussions pages, depending on the type of support required.
195219

196220
## Notices and Disclaimers
197221
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.

0 commit comments

Comments
 (0)