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.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: numthreads
3
- Version: 0.5.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
  [![GitHub Repo stars](https://img.shields.io/github/stars/basnijholt/numthreads)](https://github.com/basnijholt/numthreads)
49
50
  [![Documentation](https://readthedocs.org/projects/numthreads/badge/?version=latest)](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 Accelerate.
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
  [![GitHub Repo stars](https://img.shields.io/github/stars/basnijholt/numthreads)](https://github.com/basnijholt/numthreads)
10
10
  [![Documentation](https://readthedocs.org/projects/numthreads/badge/?version=latest)](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 Accelerate.
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.2
1
+ Metadata-Version: 2.4
2
2
  Name: numthreads
3
- Version: 0.5.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
  [![GitHub Repo stars](https://img.shields.io/github/stars/basnijholt/numthreads)](https://github.com/basnijholt/numthreads)
49
50
  [![Documentation](https://readthedocs.org/projects/numthreads/badge/?version=latest)](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 Accelerate.
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 Accelerate.""" # noqa: E501
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.5.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
 
@@ -60,8 +60,10 @@ addopts = """
60
60
  --cov=numthreads
61
61
  --cov-report term
62
62
  --cov-report html
63
+ --cov-report xml
63
64
  -W error
64
65
  -vvv
66
+ -p no:numthreads
65
67
  """
66
68
 
67
69
  [tool.coverage.run]
File without changes
File without changes