numthreads 0.5.0__tar.gz → 0.6.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {numthreads-0.5.0 → numthreads-0.6.1}/PKG-INFO +8 -4
- {numthreads-0.5.0 → numthreads-0.6.1}/README.md +5 -2
- {numthreads-0.5.0 → numthreads-0.6.1}/numthreads.egg-info/PKG-INFO +8 -4
- {numthreads-0.5.0 → numthreads-0.6.1}/numthreads.py +3 -2
- {numthreads-0.5.0 → numthreads-0.6.1}/pyproject.toml +2 -0
- {numthreads-0.5.0 → numthreads-0.6.1}/LICENSE +0 -0
- {numthreads-0.5.0 → numthreads-0.6.1}/numthreads.egg-info/SOURCES.txt +0 -0
- {numthreads-0.5.0 → numthreads-0.6.1}/numthreads.egg-info/dependency_links.txt +0 -0
- {numthreads-0.5.0 → numthreads-0.6.1}/numthreads.egg-info/entry_points.txt +0 -0
- {numthreads-0.5.0 → numthreads-0.6.1}/numthreads.egg-info/requires.txt +0 -0
- {numthreads-0.5.0 → numthreads-0.6.1}/numthreads.egg-info/top_level.txt +0 -0
- {numthreads-0.5.0 → numthreads-0.6.1}/setup.cfg +0 -0
- {numthreads-0.5.0 → numthreads-0.6.1}/tests/test_numthreads.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: numthreads
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.1
|
|
4
4
|
Summary: Set the number of threads for OpenBLAS, MKL, OMP, NumExpr, and Accelerate.
|
|
5
5
|
Author-email: Bas Nijholt <bas@nijho.lt>
|
|
6
6
|
Project-URL: Homepage, https://github.com/basnijholt/numthreads
|
|
@@ -36,6 +36,7 @@ Requires-Dist: pre-commit; extra == "test"
|
|
|
36
36
|
Requires-Dist: coverage; extra == "test"
|
|
37
37
|
Requires-Dist: pytest-cov; extra == "test"
|
|
38
38
|
Requires-Dist: pytest-mock; extra == "test"
|
|
39
|
+
Dynamic: license-file
|
|
39
40
|
|
|
40
41
|
<img src="https://media.githubusercontent.com/media/basnijholt/nijho.lt/3986f45bae9ea4e834486eab4f7f6963d980c7b6/content/project/numthreads/featured.png" align="right" style="width: 200px;" />
|
|
41
42
|
|
|
@@ -48,7 +49,7 @@ Requires-Dist: pytest-mock; extra == "test"
|
|
|
48
49
|
[](https://github.com/basnijholt/numthreads)
|
|
49
50
|
[](https://numthreads.readthedocs.io/)
|
|
50
51
|
|
|
51
|
-
`numthreads` is a really tiny and simple Python package designed to set the number of threads for various computing libraries including OpenBLAS, Intel's Math Kernel Library (MKL), OpenMP, NumExpr, and
|
|
52
|
+
`numthreads` is a really tiny and simple Python package designed to set the number of threads for various computing libraries including OpenBLAS, Intel's Math Kernel Library (MKL), OpenMP, NumExpr, Accelerate, and Numba.
|
|
52
53
|
The number of threads can be set via the command line or in Python code.
|
|
53
54
|
The performance of many numerical algorithms varies significantly based on the number of threads employed.
|
|
54
55
|
While increasing the number of threads can often accelerate these algorithms, it's not always the case.
|
|
@@ -59,6 +60,7 @@ Therefore, it's important to be able to easily set the number of threads used by
|
|
|
59
60
|
- Sets thread count for OpenBLAS, MKL, OpenMP, NumExpr, and Accelerate.
|
|
60
61
|
- Context manager support for temporary thread setting in Python code.
|
|
61
62
|
- Cross-platform compatibility (Linux, macOS, Windows).
|
|
63
|
+
- Use as pytest plugin
|
|
62
64
|
- Tiny (≤7KB) and no dependencies.
|
|
63
65
|
|
|
64
66
|
<!-- toc-start -->
|
|
@@ -111,6 +113,7 @@ This will set the number of threads using the following environment variables:
|
|
|
111
113
|
- OpenMP (via `OMP_NUM_THREADS`)
|
|
112
114
|
- NumExpr (via `NUMEXPR_NUM_THREADS`)
|
|
113
115
|
- Accelerate (via `VECLIB_MAXIMUM_THREADS`)
|
|
116
|
+
- Numba (via `NUMBA_NUM_THREADS`)
|
|
114
117
|
|
|
115
118
|
or use it as a context manager:
|
|
116
119
|
|
|
@@ -162,7 +165,7 @@ Which will print the following:
|
|
|
162
165
|
<!-- OUTPUT:START -->
|
|
163
166
|
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
|
|
164
167
|
```bash
|
|
165
|
-
export OPENBLAS_NUM_THREADS='4' ; export MKL_NUM_THREADS='4' ; export OMP_NUM_THREADS='4' ; export NUMEXPR_NUM_THREADS='4' ; export VECLIB_MAXIMUM_THREADS='4'
|
|
168
|
+
export OPENBLAS_NUM_THREADS='4' ; export MKL_NUM_THREADS='4' ; export OMP_NUM_THREADS='4' ; export NUMEXPR_NUM_THREADS='4' ; export VECLIB_MAXIMUM_THREADS='4' ; export NUMBA_NUM_THREADS='4'
|
|
166
169
|
```
|
|
167
170
|
|
|
168
171
|
<!-- OUTPUT:END -->
|
|
@@ -209,6 +212,7 @@ MKL_NUM_THREADS: 12
|
|
|
209
212
|
OMP_NUM_THREADS: 12
|
|
210
213
|
NUMEXPR_NUM_THREADS: 12
|
|
211
214
|
VECLIB_MAXIMUM_THREADS: 12
|
|
215
|
+
NUMBA_NUM_THREADS: 12
|
|
212
216
|
```
|
|
213
217
|
|
|
214
218
|
<!-- OUTPUT:END -->
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
[](https://github.com/basnijholt/numthreads)
|
|
10
10
|
[](https://numthreads.readthedocs.io/)
|
|
11
11
|
|
|
12
|
-
`numthreads` is a really tiny and simple Python package designed to set the number of threads for various computing libraries including OpenBLAS, Intel's Math Kernel Library (MKL), OpenMP, NumExpr, and
|
|
12
|
+
`numthreads` is a really tiny and simple Python package designed to set the number of threads for various computing libraries including OpenBLAS, Intel's Math Kernel Library (MKL), OpenMP, NumExpr, Accelerate, and Numba.
|
|
13
13
|
The number of threads can be set via the command line or in Python code.
|
|
14
14
|
The performance of many numerical algorithms varies significantly based on the number of threads employed.
|
|
15
15
|
While increasing the number of threads can often accelerate these algorithms, it's not always the case.
|
|
@@ -20,6 +20,7 @@ Therefore, it's important to be able to easily set the number of threads used by
|
|
|
20
20
|
- Sets thread count for OpenBLAS, MKL, OpenMP, NumExpr, and Accelerate.
|
|
21
21
|
- Context manager support for temporary thread setting in Python code.
|
|
22
22
|
- Cross-platform compatibility (Linux, macOS, Windows).
|
|
23
|
+
- Use as pytest plugin
|
|
23
24
|
- Tiny (≤7KB) and no dependencies.
|
|
24
25
|
|
|
25
26
|
<!-- toc-start -->
|
|
@@ -72,6 +73,7 @@ This will set the number of threads using the following environment variables:
|
|
|
72
73
|
- OpenMP (via `OMP_NUM_THREADS`)
|
|
73
74
|
- NumExpr (via `NUMEXPR_NUM_THREADS`)
|
|
74
75
|
- Accelerate (via `VECLIB_MAXIMUM_THREADS`)
|
|
76
|
+
- Numba (via `NUMBA_NUM_THREADS`)
|
|
75
77
|
|
|
76
78
|
or use it as a context manager:
|
|
77
79
|
|
|
@@ -123,7 +125,7 @@ Which will print the following:
|
|
|
123
125
|
<!-- OUTPUT:START -->
|
|
124
126
|
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
|
|
125
127
|
```bash
|
|
126
|
-
export OPENBLAS_NUM_THREADS='4' ; export MKL_NUM_THREADS='4' ; export OMP_NUM_THREADS='4' ; export NUMEXPR_NUM_THREADS='4' ; export VECLIB_MAXIMUM_THREADS='4'
|
|
128
|
+
export OPENBLAS_NUM_THREADS='4' ; export MKL_NUM_THREADS='4' ; export OMP_NUM_THREADS='4' ; export NUMEXPR_NUM_THREADS='4' ; export VECLIB_MAXIMUM_THREADS='4' ; export NUMBA_NUM_THREADS='4'
|
|
127
129
|
```
|
|
128
130
|
|
|
129
131
|
<!-- OUTPUT:END -->
|
|
@@ -170,6 +172,7 @@ MKL_NUM_THREADS: 12
|
|
|
170
172
|
OMP_NUM_THREADS: 12
|
|
171
173
|
NUMEXPR_NUM_THREADS: 12
|
|
172
174
|
VECLIB_MAXIMUM_THREADS: 12
|
|
175
|
+
NUMBA_NUM_THREADS: 12
|
|
173
176
|
```
|
|
174
177
|
|
|
175
178
|
<!-- OUTPUT:END -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: numthreads
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.1
|
|
4
4
|
Summary: Set the number of threads for OpenBLAS, MKL, OMP, NumExpr, and Accelerate.
|
|
5
5
|
Author-email: Bas Nijholt <bas@nijho.lt>
|
|
6
6
|
Project-URL: Homepage, https://github.com/basnijholt/numthreads
|
|
@@ -36,6 +36,7 @@ Requires-Dist: pre-commit; extra == "test"
|
|
|
36
36
|
Requires-Dist: coverage; extra == "test"
|
|
37
37
|
Requires-Dist: pytest-cov; extra == "test"
|
|
38
38
|
Requires-Dist: pytest-mock; extra == "test"
|
|
39
|
+
Dynamic: license-file
|
|
39
40
|
|
|
40
41
|
<img src="https://media.githubusercontent.com/media/basnijholt/nijho.lt/3986f45bae9ea4e834486eab4f7f6963d980c7b6/content/project/numthreads/featured.png" align="right" style="width: 200px;" />
|
|
41
42
|
|
|
@@ -48,7 +49,7 @@ Requires-Dist: pytest-mock; extra == "test"
|
|
|
48
49
|
[](https://github.com/basnijholt/numthreads)
|
|
49
50
|
[](https://numthreads.readthedocs.io/)
|
|
50
51
|
|
|
51
|
-
`numthreads` is a really tiny and simple Python package designed to set the number of threads for various computing libraries including OpenBLAS, Intel's Math Kernel Library (MKL), OpenMP, NumExpr, and
|
|
52
|
+
`numthreads` is a really tiny and simple Python package designed to set the number of threads for various computing libraries including OpenBLAS, Intel's Math Kernel Library (MKL), OpenMP, NumExpr, Accelerate, and Numba.
|
|
52
53
|
The number of threads can be set via the command line or in Python code.
|
|
53
54
|
The performance of many numerical algorithms varies significantly based on the number of threads employed.
|
|
54
55
|
While increasing the number of threads can often accelerate these algorithms, it's not always the case.
|
|
@@ -59,6 +60,7 @@ Therefore, it's important to be able to easily set the number of threads used by
|
|
|
59
60
|
- Sets thread count for OpenBLAS, MKL, OpenMP, NumExpr, and Accelerate.
|
|
60
61
|
- Context manager support for temporary thread setting in Python code.
|
|
61
62
|
- Cross-platform compatibility (Linux, macOS, Windows).
|
|
63
|
+
- Use as pytest plugin
|
|
62
64
|
- Tiny (≤7KB) and no dependencies.
|
|
63
65
|
|
|
64
66
|
<!-- toc-start -->
|
|
@@ -111,6 +113,7 @@ This will set the number of threads using the following environment variables:
|
|
|
111
113
|
- OpenMP (via `OMP_NUM_THREADS`)
|
|
112
114
|
- NumExpr (via `NUMEXPR_NUM_THREADS`)
|
|
113
115
|
- Accelerate (via `VECLIB_MAXIMUM_THREADS`)
|
|
116
|
+
- Numba (via `NUMBA_NUM_THREADS`)
|
|
114
117
|
|
|
115
118
|
or use it as a context manager:
|
|
116
119
|
|
|
@@ -162,7 +165,7 @@ Which will print the following:
|
|
|
162
165
|
<!-- OUTPUT:START -->
|
|
163
166
|
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
|
|
164
167
|
```bash
|
|
165
|
-
export OPENBLAS_NUM_THREADS='4' ; export MKL_NUM_THREADS='4' ; export OMP_NUM_THREADS='4' ; export NUMEXPR_NUM_THREADS='4' ; export VECLIB_MAXIMUM_THREADS='4'
|
|
168
|
+
export OPENBLAS_NUM_THREADS='4' ; export MKL_NUM_THREADS='4' ; export OMP_NUM_THREADS='4' ; export NUMEXPR_NUM_THREADS='4' ; export VECLIB_MAXIMUM_THREADS='4' ; export NUMBA_NUM_THREADS='4'
|
|
166
169
|
```
|
|
167
170
|
|
|
168
171
|
<!-- OUTPUT:END -->
|
|
@@ -209,6 +212,7 @@ MKL_NUM_THREADS: 12
|
|
|
209
212
|
OMP_NUM_THREADS: 12
|
|
210
213
|
NUMEXPR_NUM_THREADS: 12
|
|
211
214
|
VECLIB_MAXIMUM_THREADS: 12
|
|
215
|
+
NUMBA_NUM_THREADS: 12
|
|
212
216
|
```
|
|
213
217
|
|
|
214
218
|
<!-- OUTPUT:END -->
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""numthreads: Set the number of threads for OpenBLAS, MKL, OMP, NumExpr, and
|
|
1
|
+
"""numthreads: Set the number of threads for OpenBLAS, MKL, OMP, NumExpr, Accelerate, and Numba.""" # noqa: E501
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
@@ -15,7 +15,7 @@ if TYPE_CHECKING:
|
|
|
15
15
|
|
|
16
16
|
import pytest
|
|
17
17
|
|
|
18
|
-
__version__ = "0.
|
|
18
|
+
__version__ = "0.6.1"
|
|
19
19
|
|
|
20
20
|
THREAD_CONTROL_ENV_VARS = [
|
|
21
21
|
"OPENBLAS_NUM_THREADS", # OpenBLAS
|
|
@@ -23,6 +23,7 @@ THREAD_CONTROL_ENV_VARS = [
|
|
|
23
23
|
"OMP_NUM_THREADS", # OMP
|
|
24
24
|
"NUMEXPR_NUM_THREADS", # NumExpr
|
|
25
25
|
"VECLIB_MAXIMUM_THREADS", # Accelerate
|
|
26
|
+
"NUMBA_NUM_THREADS", # Numba
|
|
26
27
|
]
|
|
27
28
|
|
|
28
29
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|