Skip to content

Commit 1d643a6

Browse files
author
Tyler Titsworth
authored
Add Perf Sample Example Section (#307)
Signed-off-by: Tyler Titsworth <tyler.titsworth@intel.com>
1 parent ecdeddb commit 1d643a6

File tree

1 file changed

+34
-9
lines changed

1 file changed

+34
-9
lines changed

python/README.md

+34-9
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,44 @@
1-
# Intel® Distribution for Python
1+
# Intel® Distribution for Python*
22

3-
[Intel® Distribution for Python] enhances performance and can improve your program speed from 10 to 100 times faster. It is a Python distribution that includes the [Intel® Math Kernel Library] (oneMKL) and other Intel performance libraries to enable near-native performance through acceleration of core numerical and machine learning packages.
4-
5-
[Intel® Distribution for Python] is available as part of the [Intel® oneAPI Base Toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/base-toolkit.html).
3+
[Intel® Distribution for Python*] enhances performance and can improve your program speed from 10 to 100 times faster. It is a Python* distribution that includes the [Intel® Math Kernel Library] (oneMKL) and other Intel performance libraries to enable near-native performance through acceleration of core numerical and machine learning packages.
64

75
## Images
86

9-
The images below include variations for only the core packages in the [Intel® Distribution for Python] installation, or all of the packages.
7+
The images below include variations for only the core packages in the [Intel® Distribution for Python*] installation, or all of the packages.
108

119
| Tag(s) | IDP |
1210
| ---------------------- | ---------- |
1311
| `3.10-full`, `latest` | `2024.2.0` |
1412
| `3.10-core` | `2024.2.0` |
1513

16-
## Build from Source
14+
## Run a Performance Sample
15+
16+
To run a performance sample run the following commands:
17+
18+
```bash
19+
git clone https://github.com/intel/ai-containers
20+
cd ai-containers/python
21+
docker run --rm -it \
22+
-v $PWD/tests:/tests \
23+
intel/python:latest \
24+
python /tests/perf_sample.py
25+
```
26+
27+
### Compare the results against stock python
28+
29+
In the previous command, you should see a result at the bottom like: `Time Consuming: 0.03897857666015625`. We can compare this against `python:3.11-slim-bullseye`
30+
31+
```bash
32+
# Use the working directory from the above command
33+
docker run --rm -it \
34+
-v $PWD/tests:/tests \
35+
python:3.11-slim-bullseye \
36+
bash
37+
pip install numpy
38+
python /tests/perf_sample.py
39+
```
40+
41+
## Build from Source (Advanced)
1742

1843
To build the images from source, clone the [AI Containers](https://github.com/intel/ai-containers) repository, follow the main `README.md` file to setup your environment, and run the following command:
1944

@@ -27,8 +52,8 @@ You can find the list of services below for each container in the group:
2752

2853
| Service Name | Description |
2954
| ------------ | ------------------------------------------------------------------- |
30-
| `idp` | Base image with [Intel® Distribution for Python] |
31-
| `pip` | Equivalent python image without [Intel® Distribution for Python] |
55+
| `idp` | Base image with [Intel® Distribution for Python*] |
56+
| `pip` | Equivalent python image without [Intel® Distribution for Python*] |
3257

3358
## License
3459

@@ -40,5 +65,5 @@ It is the image user's responsibility to ensure that any use of The images below
4065

4166
<!--Below are links used in these document. They are not rendered: -->
4267

43-
[Intel® Distribution for Python]: https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html#gs.9bos9m
68+
[Intel® Distribution for Python*]: https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html#gs.9bos9m
4469
[Intel® Math Kernel Library]: https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html

0 commit comments

Comments
 (0)