-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from IntelPython/add-workflow
Remove .travis, add workflow
- Loading branch information
Showing
7 changed files
with
92 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Run benchmark tests | ||
on: | ||
pull_request: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
run_test: | ||
name: Run optimization bench on intel_dev | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python: ['3.10'] | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@0.11.0 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set pkgs_dirs | ||
run: | | ||
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc | ||
- name: Add conda to system path | ||
run: echo $CONDA/bin >> $GITHUB_PATH | ||
|
||
- name: Create Intel test environment | ||
run: conda env create -f environments/intel.yaml | ||
|
||
- name: Create stock test environment | ||
run: conda env create -f environments/stock.yaml | ||
|
||
- name: Run tests in Intel environment | ||
run: | | ||
. $CONDA/etc/profile.d/conda.sh | ||
conda activate intel_env || exit 1 | ||
# This is toy run for GH action, | ||
# The arguments are really bad for real perf testing, use default arguments instead | ||
python numpy/umath/umath_mem_bench.py -v --size 10 --goal-time 0.01 --repeats 1 || exit 1 | ||
- name: Run tests in stock environment | ||
run: | | ||
. $CONDA/etc/profile.d/conda.sh | ||
conda activate stock_env || exit 1 | ||
# This is toy run for GH action, | ||
# The arguments are really bad for real perf testing, use default arguments instead | ||
python numpy/umath/umath_mem_bench.py -v --size 10 --goal-time 0.01 --repeats 1 || exit 1 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
[![Build Status](https://travis-ci.org/IntelPython/optimizations_bench.svg?branch=master)](https://travis-ci.org/IntelPython/optimizations_bench) | ||
[![Run benchmark tests](https://github.com/IntelPython/optimizations_bench/actions/workflows/run_tests.yaml/badge.svg)](https://github.com/IntelPython/optimizations_bench/actions/workflows/run_tests.yaml) | ||
|
||
# Optimization Benchmarks | ||
Collection of performance benchmarks used to present optimizations implemented for Intel(R) Distribution for Python* | ||
|
||
## Environment Setup | ||
To install Python environments from Intel channel along with pip-installed packages | ||
|
||
- `python3 create_python_envs.py` | ||
|
||
- `conda env create -f environments/intel.yaml` | ||
- `conda activate intel_env` | ||
|
||
## Run tests | ||
- `python3 run_tests.py` | ||
- `python numpy/umath/umath_mem_bench.py -v --size 10 --goal-time 0.01 --repeats 1` | ||
|
||
## Run benchmarks | ||
### umath | ||
- To run python benchmarks: `python numpy/umath/umath_mem_bench.py` | ||
- To compile and run native benchmarks (requires icc): `make -C numpy/umath` | ||
- To compile and run native benchmarks (requires `icx`): `make -C numpy/umath` | ||
|
||
### Random number generation | ||
- To run python benchmarks: `python numpy/random/rng.py` | ||
- To compile and run native benchmarks (requires icc): `make -C numpy/random` | ||
- To compile and run native benchmarks (requires `icx`): `make -C numpy/random` | ||
|
||
## See also | ||
"[Accelerating Scientific Python with Intel Optimizations](http://conference.scipy.org/proceedings/scipy2017/pdfs/oleksandr_pavlyk.pdf)" by Oleksandr Pavlyk, Denis Nagorny, Andres Guzman-Ballen, Anton Malakhov, Hai Liu, Ehsan Totoni, Todd A. Anderson, Sergey Maidanov. Proceedings of the 16th Python in Science Conference (SciPy 2017), July 10 - July 16, Austin, Texas |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: intel_env | ||
channels: | ||
- intel | ||
- conda-forge | ||
- nodefaults | ||
dependencies: | ||
- numpy | ||
- conda-forge::numexpr=*=mkl* | ||
- numba | ||
- scikit-learn | ||
- cython | ||
- pip | ||
- pip: | ||
- dask | ||
# - rdtsc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: stock_env | ||
channels: | ||
- intel | ||
- conda-forge | ||
- nodefaults | ||
dependencies: | ||
- llvmlite | ||
- cython | ||
- pip | ||
- pip: | ||
- numpy | ||
- scikit-learn | ||
- toolz | ||
- numexpr | ||
# - rdtsc | ||
- numba | ||
- dask |
This file was deleted.
Oops, something went wrong.