Skip to content

Commit d0ab388

Browse files
committed
add the wrapper and the benchmark suite
1 parent 48e6b6a commit d0ab388

11 files changed

Lines changed: 1245 additions & 0 deletions

asv.conf.json

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
{
2+
// The version of the config file format. Do not change, unless
3+
// you know what you are doing.
4+
"version": 1,
5+
6+
// The name of the project being benchmarked
7+
"project": "BLAS-Benchmarks",
8+
9+
// The project's homepage
10+
"project_url": "https://github.com/OpenMathLib/BLAS-Benchmarks",
11+
12+
// The URL or local path of the source code repository for the
13+
// project being benchmarked
14+
"repo": ".",
15+
16+
// The Python project's subdirectory in your repo. If missing or
17+
// the empty string, the project is assumed to be located at the root
18+
// of the repository.
19+
// "repo_subdir": "",
20+
21+
// Customizable commands for building the project.
22+
// See asv.conf.json documentation.
23+
// To build the package using pyproject.toml (PEP518), uncomment the following lines
24+
"build_command": [
25+
"python -m pip install build",
26+
"python -m build",
27+
// https://github.com/scipy/scipy/issues/20574
28+
"PIP_NO_BUILD_ISOLATION=false python -m pip wheel . --no-deps --no-index -w {build_cache_dir} {build_dir}"
29+
],
30+
// To build the package using setuptools and a setup.py file, uncomment the following lines
31+
// "build_command": [
32+
// "python setup.py build",
33+
// "python -mpip wheel -w {build_cache_dir} {build_dir}"
34+
// ],
35+
36+
// Customizable commands for installing and uninstalling the project.
37+
// See asv.conf.json documentation.
38+
"install_command": ["in-dir={env_dir} python -mpip install {wheel_file}"],
39+
"uninstall_command": ["return-code=any python -mpip uninstall -y {project}"],
40+
41+
// List of branches to benchmark. If not provided, defaults to "main"
42+
// (for git) or "default" (for mercurial).
43+
"branches": ["main"], // for git
44+
// "branches": ["default"], // for mercurial
45+
46+
// The DVCS being used. If not set, it will be automatically
47+
// determined from "repo" by looking at the protocol in the URL
48+
// (if remote), or by looking for special directories, such as
49+
// ".git" (if local).
50+
"dvcs": "git",
51+
52+
// The tool to use to create environments. May be "conda",
53+
// "virtualenv", "mamba" (above 3.8)
54+
// or other value depending on the plugins in use.
55+
// If missing or the empty string, the tool will be automatically
56+
// determined by looking for tools on the PATH environment
57+
// variable.
58+
"environment_type": "virtualenv",
59+
60+
// timeout in seconds for installing any dependencies in environment
61+
// defaults to 10 min
62+
//"install_timeout": 600,
63+
64+
// the base URL to show a commit for the project.
65+
// "show_commit_url": "http://github.com/owner/project/commit/",
66+
67+
// The Pythons you'd like to test against. If not provided, defaults
68+
// to the current version of Python used to run `asv`.
69+
// "pythons": ["3.8", "3.12"],
70+
71+
// The list of conda channel names to be searched for benchmark
72+
// dependency packages in the specified order
73+
// "conda_channels": ["conda-forge", "defaults"],
74+
75+
// A conda environment file that is used for environment creation.
76+
// "conda_environment_file": "environment.yml",
77+
78+
// The matrix of dependencies to test. Each key of the "req"
79+
// requirements dictionary is the name of a package (in PyPI) and
80+
// the values are version numbers. An empty list or empty string
81+
// indicates to just test against the default (latest)
82+
// version. null indicates that the package is to not be
83+
// installed. If the package to be tested is only available from
84+
// PyPi, and the 'environment_type' is conda, then you can preface
85+
// the package name by 'pip+', and the package will be installed
86+
// via pip (with all the conda available packages installed first,
87+
// followed by the pip installed packages).
88+
//
89+
// The ``@env`` and ``@env_nobuild`` keys contain the matrix of
90+
// environment variables to pass to build and benchmark commands.
91+
// An environment will be created for every combination of the
92+
// cartesian product of the "@env" variables in this matrix.
93+
// Variables in "@env_nobuild" will be passed to every environment
94+
// during the benchmark phase, but will not trigger creation of
95+
// new environments. A value of ``null`` means that the variable
96+
// will not be set for the current combination.
97+
//
98+
// "matrix": {
99+
// "req": {
100+
// "numpy": ["1.6", "1.7"],
101+
// "six": ["", null], // test with and without six installed
102+
// "pip+emcee": [""] // emcee is only available for install with pip.
103+
// },
104+
// "env": {"ENV_VAR_1": ["val1", "val2"]},
105+
// "env_nobuild": {"ENV_VAR_2": ["val3", null]},
106+
// },
107+
108+
// Combinations of libraries/python versions can be excluded/included
109+
// from the set to test. Each entry is a dictionary containing additional
110+
// key-value pairs to include/exclude.
111+
//
112+
// An exclude entry excludes entries where all values match. The
113+
// values are regexps that should match the whole string.
114+
//
115+
// An include entry adds an environment. Only the packages listed
116+
// are installed. The 'python' key is required. The exclude rules
117+
// do not apply to includes.
118+
//
119+
// In addition to package names, the following keys are available:
120+
//
121+
// - python
122+
// Python version, as in the *pythons* variable above.
123+
// - environment_type
124+
// Environment type, as above.
125+
// - sys_platform
126+
// Platform, as in sys.platform. Possible values for the common
127+
// cases: 'linux2', 'win32', 'cygwin', 'darwin'.
128+
// - req
129+
// Required packages
130+
// - env
131+
// Environment variables
132+
// - env_nobuild
133+
// Non-build environment variables
134+
//
135+
// "exclude": [
136+
// {"python": "3.2", "sys_platform": "win32"}, // skip py3.2 on windows
137+
// {"environment_type": "conda", "req": {"six": null}}, // don't run without six on conda
138+
// {"env": {"ENV_VAR_1": "val2"}}, // skip val2 for ENV_VAR_1
139+
// ],
140+
//
141+
// "include": [
142+
// // additional env for python3.12
143+
// {"python": "3.12", "req": {"numpy": "1.26"}, "env_nobuild": {"FOO": "123"}},
144+
// // additional env if run on windows+conda
145+
// {"platform": "win32", "environment_type": "conda", "python": "3.12", "req": {"libpython": ""}},
146+
// ],
147+
148+
// The directory (relative to the current directory) that benchmarks are
149+
// stored in. If not provided, defaults to "benchmarks"
150+
"benchmark_dir": "benchmarks",
151+
152+
// The directory (relative to the current directory) to cache the Python
153+
// environments in. If not provided, defaults to "env"
154+
"env_dir": ".asv/env",
155+
156+
// The directory (relative to the current directory) that raw benchmark
157+
// results are stored in. If not provided, defaults to "results".
158+
"results_dir": ".asv/results",
159+
160+
// The directory (relative to the current directory) that the html tree
161+
// should be written to. If not provided, defaults to "html".
162+
"html_dir": ".asv/html",
163+
164+
// The number of characters to retain in the commit hashes.
165+
// "hash_length": 8,
166+
167+
// `asv` will cache results of the recent builds in each
168+
// environment, making them faster to install next time. This is
169+
// the number of builds to keep, per environment.
170+
// "build_cache_size": 2,
171+
172+
// The commits after which the regression search in `asv publish`
173+
// should start looking for regressions. Dictionary whose keys are
174+
// regexps matching to benchmark names, and values corresponding to
175+
// the commit (exclusive) after which to start looking for
176+
// regressions. The default is to start from the first commit
177+
// with results. If the commit is `null`, regression detection is
178+
// skipped for the matching benchmark.
179+
//
180+
// "regressions_first_commits": {
181+
// "some_benchmark": "352cdf", // Consider regressions only after this commit
182+
// "another_benchmark": null, // Skip regression detection altogether
183+
// },
184+
185+
// The thresholds for relative change in results, after which `asv
186+
// publish` starts reporting regressions. Dictionary of the same
187+
// form as in ``regressions_first_commits``, with values
188+
// indicating the thresholds. If multiple entries match, the
189+
// maximum is taken. If no entry matches, the default is 5%.
190+
//
191+
// "regressions_thresholds": {
192+
// "some_benchmark": 0.01, // Threshold of 1%
193+
// "another_benchmark": 0.5, // Threshold of 50%
194+
// },
195+
}

benchmarks/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)