Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Perf Sample Example Section #307

Merged
merged 6 commits into from
Aug 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 34 additions & 9 deletions python/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,44 @@
# Intel® Distribution for Python
# Intel® Distribution for Python*

[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.

[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).
[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.

## Images

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

| Tag(s) | IDP |
| ---------------------- | ---------- |
| `3.10-full`, `latest` | `2024.2.0` |
| `3.10-core` | `2024.2.0` |

## Build from Source
## Run a Performance Sample

To run a performance sample run the following commands:

```bash
git clone https://github.com/intel/ai-containers
cd ai-containers/python
docker run --rm -it \
-v $PWD/tests:/tests \
intel/python:latest \
python /tests/perf_sample.py
```

### Compare the results against stock python

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`

This comment was marked as resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a note regarding that

```bash
# Use the working directory from the above command
docker run --rm -it \
-v $PWD/tests:/tests \
python:3.11-slim-bullseye \
bash
pip install numpy
python /tests/perf_sample.py
```

## Build from Source (Advanced)

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:

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

| Service Name | Description |
| ------------ | ------------------------------------------------------------------- |
| `idp` | Base image with [Intel® Distribution for Python] |
| `pip` | Equivalent python image without [Intel® Distribution for Python] |
| `idp` | Base image with [Intel® Distribution for Python*] |
| `pip` | Equivalent python image without [Intel® Distribution for Python*] |

## License

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

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

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