Skip to content

Commit cc2e177

Browse files
Merge pull request #21 from IntelPython/add-workflow
Remove .travis, add workflow
2 parents 393798d + dfcf8dd commit cc2e177

File tree

7 files changed

+92
-48
lines changed

7 files changed

+92
-48
lines changed

.github/workflows/run_tests.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Run benchmark tests
2+
on:
3+
pull_request:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
run_test:
9+
name: Run optimization bench on intel_dev
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
python: ['3.10']
15+
16+
steps:
17+
- name: Cancel Previous Runs
18+
uses: styfle/[email protected]
19+
with:
20+
access_token: ${{ github.token }}
21+
22+
- uses: actions/checkout@v3
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Set pkgs_dirs
27+
run: |
28+
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc
29+
30+
- name: Add conda to system path
31+
run: echo $CONDA/bin >> $GITHUB_PATH
32+
33+
- name: Create Intel test environment
34+
run: conda env create -f environments/intel.yaml
35+
36+
- name: Create stock test environment
37+
run: conda env create -f environments/stock.yaml
38+
39+
- name: Run tests in Intel environment
40+
run: |
41+
. $CONDA/etc/profile.d/conda.sh
42+
conda activate intel_env || exit 1
43+
# This is toy run for GH action,
44+
# The arguments are really bad for real perf testing, use default arguments instead
45+
python numpy/umath/umath_mem_bench.py -v --size 10 --goal-time 0.01 --repeats 1 || exit 1
46+
47+
- name: Run tests in stock environment
48+
run: |
49+
. $CONDA/etc/profile.d/conda.sh
50+
conda activate stock_env || exit 1
51+
# This is toy run for GH action,
52+
# The arguments are really bad for real perf testing, use default arguments instead
53+
python numpy/umath/umath_mem_bench.py -v --size 10 --goal-time 0.01 --repeats 1 || exit 1

.travis.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
[![Build Status](https://travis-ci.org/IntelPython/optimizations_bench.svg?branch=master)](https://travis-ci.org/IntelPython/optimizations_bench)
1+
[![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)
22

33
# Optimization Benchmarks
44
Collection of performance benchmarks used to present optimizations implemented for Intel(R) Distribution for Python*
55

66
## Environment Setup
77
To install Python environments from Intel channel along with pip-installed packages
88

9-
- `python3 create_python_envs.py`
10-
9+
- `conda env create -f environments/intel.yaml`
10+
- `conda activate intel_env`
11+
1112
## Run tests
12-
- `python3 run_tests.py`
13+
- `python numpy/umath/umath_mem_bench.py -v --size 10 --goal-time 0.01 --repeats 1`
1314

1415
## Run benchmarks
1516
### umath
1617
- To run python benchmarks: `python numpy/umath/umath_mem_bench.py`
17-
- To compile and run native benchmarks (requires icc): `make -C numpy/umath`
18+
- To compile and run native benchmarks (requires `icx`): `make -C numpy/umath`
1819

1920
### Random number generation
2021
- To run python benchmarks: `python numpy/random/rng.py`
21-
- To compile and run native benchmarks (requires icc): `make -C numpy/random`
22+
- To compile and run native benchmarks (requires `icx`): `make -C numpy/random`
2223

2324
## See also
2425
"[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

create_python_envs.py

Lines changed: 0 additions & 28 deletions
This file was deleted.

environments/intel.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: intel_env
2+
channels:
3+
- intel
4+
- conda-forge
5+
- nodefaults
6+
dependencies:
7+
- numpy
8+
- conda-forge::numexpr=*=mkl*
9+
- numba
10+
- scikit-learn
11+
- cython
12+
- pip
13+
- pip:
14+
- dask
15+
# - rdtsc

environments/stock.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: stock_env
2+
channels:
3+
- intel
4+
- conda-forge
5+
- nodefaults
6+
dependencies:
7+
- llvmlite
8+
- cython
9+
- pip
10+
- pip:
11+
- numpy
12+
- scikit-learn
13+
- toolz
14+
- numexpr
15+
# - rdtsc
16+
- numba
17+
- dask

run_tests.py

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)