From 7e8b679044861c588d9364b807c39b871e3c24a4 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Wed, 13 Sep 2023 08:45:38 -0500 Subject: [PATCH] Deleted unused files, tweaked workflow, added badge --- .github/workflows/run_tests.yaml | 12 ++++++++---- README.md | 13 ++++++++----- create_python_envs.py | 28 ---------------------------- run_tests.py | 7 ------- 4 files changed, 16 insertions(+), 44 deletions(-) delete mode 100644 create_python_envs.py delete mode 100644 run_tests.py diff --git a/.github/workflows/run_tests.yaml b/.github/workflows/run_tests.yaml index 117eda0..2808e7c 100644 --- a/.github/workflows/run_tests.yaml +++ b/.github/workflows/run_tests.yaml @@ -39,11 +39,15 @@ jobs: - name: Run tests in Intel environment run: | . $CONDA/etc/profile.d/conda.sh - conda activate intel_env - python run_tests.py + 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 - python run_tests.py + 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 diff --git a/README.md b/README.md index 03dfadd..5290a37 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,25 @@ +[![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 diff --git a/create_python_envs.py b/create_python_envs.py deleted file mode 100644 index 0517f68..0000000 --- a/create_python_envs.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (C) 2017-2018 Intel Corporation -# -# SPDX-License-Identifier: MIT - -import os -import urllib.request -from os.path import join as jp - -dir = 'miniconda3' -conda = jp(dir,'bin','conda') -miniconda = 'Miniconda3-latest-Linux-x86_64.sh' -miniconda_url = 'https://repo.continuum.io/miniconda/' + miniconda - -if not os.path.exists(conda): - if not os.path.exists(dir): - os.makedirs(dir) - if not os.path.exists(miniconda): - urllib.request.urlretrieve(miniconda_url, miniconda) - os.system('chmod +x %s; ./%s -b -p %s -f' % (miniconda,miniconda,dir)) - -if not os.path.exists(jp(dir,'envs','intel3')): - os.system('%s create -q -y -n intel3 -c intel python=3 numpy numexpr numexpr numba scikit-learn tbb cython' % conda) - -pip_env = jp(dir,'envs','pip3') -if not os.path.exists(pip_env): - os.system('%s create -q -y -n pip3 -c intel python=3 pip llvmlite cython' % conda) - os.system('%s/bin/pip -q install numpy scikit-learn toolz numexpr rdtsc' % pip_env) - os.system('%s/bin/pip -q install dask numba' % pip_env) diff --git a/run_tests.py b/run_tests.py deleted file mode 100644 index 84f3c66..0000000 --- a/run_tests.py +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (C) 2017 Intel Corporation -# -# SPDX-License-Identifier: MIT - -import os -# warning: this is sanity test for Travis CI. The arguments are really bad for real perf testing, use default arguments instead -os.system('miniconda3/envs/intel3/bin/python numpy/umath/umath_mem_bench.py -v --size 10 --goal-time 0.01 --repeats 1')