File: dgit-changes

package info (click to toggle)
numpy-minmax 0.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 180 kB
  • sloc: python: 394; ansic: 250; makefile: 6
file content (76 lines) | stat: -rw-r--r-- 3,150 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
From: 
Subject: Debian changes

The Debian packaging of numpy-minmax is maintained in git, using a workflow
similar to the one described in dgit-maint-merge(7).
The Debian delta is represented by this one combined patch; there isn't a
patch queue that can be represented as a quilt series.

A detailed breakdown of the changes is available from their canonical
representation -- git commits in the packaging repository.
For example, to see the changes made by the Debian maintainer in the first
upload of upstream version 1.2.3, you could use:

    % git clone https://git.dgit.debian.org/numpy-minmax
    % cd numpy-minmax
    % git log --oneline 1.2.3..debian/1.2.3-1 -- . ':!debian'

(If you have dgit, use `dgit clone numpy-minmax`, rather than plain `git clone`.)

We don't use debian/source/options single-debian-patch because it has bugs.
Therefore, NMUs etc. may nevertheless have made additional patches.

---

diff --git a/numpy_minmax/_minmax.c b/numpy_minmax/_minmax.c
index 5c2aa93..ccb329c 100644
--- a/numpy_minmax/_minmax.c
+++ b/numpy_minmax/_minmax.c
@@ -153,7 +153,7 @@ minmax_result_float32 minmax_avx_float32(const float *a, size_t length) {
     return reduce_result_from_mm256_float32(min_vals, max_vals, result);
 }
 
-static inline minmax_result_float32 reduce_result_from_mm512_float32(__m512 min_vals, __m512 max_vals, minmax_result_float32 result) {
+__attribute__((target("avx512f"))) static inline minmax_result_float32 reduce_result_from_mm512_float32(__m512 min_vals, __m512 max_vals, minmax_result_float32 result) {
     float temp_min[16], temp_max[16];
     _mm512_storeu_ps(temp_min, min_vals);
     _mm512_storeu_ps(temp_max, max_vals);
@@ -164,7 +164,7 @@ static inline minmax_result_float32 reduce_result_from_mm512_float32(__m512 min_
     return result;
 }
 
-minmax_result_float32 minmax_avx512_float32(const float *a, size_t length) {
+__attribute__((target("avx512f"))) minmax_result_float32 minmax_avx512_float32(const float *a, size_t length) {
     minmax_result_float32 result = { .min_val = FLT_MAX, .max_val = -FLT_MAX };
 
     __m512 min_vals = _mm512_loadu_ps(a);
diff --git a/numpy_minmax/_minmax_cffi.py b/numpy_minmax/_minmax_cffi.py
index 419edb6..0090c49 100644
--- a/numpy_minmax/_minmax_cffi.py
+++ b/numpy_minmax/_minmax_cffi.py
@@ -31,8 +31,7 @@ if os.name == "posix":
 
 # Detect architecture and set appropriate SIMD-related compile args
 if platform.machine().lower() in ["x86_64", "amd64", "i386", "i686"]:
-    extra_compile_args.append("-mavx")
-    extra_compile_args.append("-mavx512f")
+    extra_compile_args.append("-mavx2")
 
 ffibuilder.set_source("_numpy_minmax", c_code, extra_compile_args=extra_compile_args)
 
diff --git a/pyproject.toml b/pyproject.toml
index 6e0b0da..caa8dce 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -39,7 +39,10 @@ test-requires = ["cffi", "pytest"]
 test-command = "pytest {project}/tests"
 
 [tool.setuptools.packages.find]
-exclude = ["scripts", "tests", "wheelhouse"]
+include = ["numpy_minmax", "numpy_minmax.*"]
+
+[tool.setuptools.exclude-package-data]
+"*" = ["_minmax.c", "_minmax_cffi.py"]
 
 [tool.pytest]
 testpaths = ["tests"]