Accepting request 932339 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/932339 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numba?expand=0&rev=29
This commit is contained in:
commit
0d6025847d
@ -8,11 +8,11 @@ Fix for #3876 without needing to patch LLVM.
|
||||
numba/__init__.py | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/numba/__init__.py b/numba/__init__.py
|
||||
index c62ad06289..114e9a597e 100644
|
||||
--- a/numba/__init__.py
|
||||
+++ b/numba/__init__.py
|
||||
@@ -102,6 +102,11 @@ def _ensure_llvm():
|
||||
Index: numba-0.54.1/numba/__init__.py
|
||||
===================================================================
|
||||
--- numba-0.54.1.orig/numba/__init__.py
|
||||
+++ numba-0.54.1/numba/__init__.py
|
||||
@@ -119,6 +119,11 @@ def _ensure_llvm():
|
||||
"Please update llvmlite." %
|
||||
(_min_llvm_version + llvm_version_info))
|
||||
raise ImportError(msg)
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:55c11d7edbba2ba715f2b56f5294cad55cfd87bff98e2627c3047c2d5cc52d16
|
||||
size 2212284
|
3
numba-0.54.1.tar.gz
Normal file
3
numba-0.54.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f9dfc803c864edcc2381219b800abf366793400aea55e26d4d5b7d953e14f43f
|
||||
size 2232957
|
@ -1,72 +0,0 @@
|
||||
diff --git a/numba/misc/llvm_pass_timings.py b/numba/misc/llvm_pass_timings.py
|
||||
index 205bb3396..b3263dd45 100644
|
||||
--- a/numba/misc/llvm_pass_timings.py
|
||||
+++ b/numba/misc/llvm_pass_timings.py
|
||||
@@ -239,12 +239,14 @@ class ProcessedPassTimings:
|
||||
missing[k] = 0.0
|
||||
# parse timings
|
||||
n = r"\s*((?:[0-9]+\.)?[0-9]+)"
|
||||
- pat = f"\\s+{n}\\s*\\({n}%\\)" * (len(headers) - 1) + r"\s*(.*)"
|
||||
+ pat = f"\\s+(?:{n}\\s*\\({n}%\\)|-+)" * (len(headers) - 1)
|
||||
+ pat += r"\s*(.*)"
|
||||
for ln in line_iter:
|
||||
m = re.match(pat, ln)
|
||||
if m is not None:
|
||||
raw_data = list(m.groups())
|
||||
- data = {k: float(v) for k, v in zip(attrs, raw_data)}
|
||||
+ data = {k: float(v) if v is not None else 0.0
|
||||
+ for k, v in zip(attrs, raw_data)}
|
||||
data.update(missing)
|
||||
pass_name = raw_data[-1]
|
||||
rec = PassTimingRecord(
|
||||
diff --git a/numba/tests/test_llvm_pass_timings.py b/numba/tests/test_llvm_pass_timings.py
|
||||
index a7e9135cd..25b77e2c5 100644
|
||||
--- a/numba/tests/test_llvm_pass_timings.py
|
||||
+++ b/numba/tests/test_llvm_pass_timings.py
|
||||
@@ -5,6 +5,30 @@ from numba.tests.support import TestCase, override_config
|
||||
from numba.misc import llvm_pass_timings as lpt
|
||||
|
||||
|
||||
+timings_raw1 = """
|
||||
+===-------------------------------------------------------------------------===
|
||||
+ ... Pass execution timing report ...
|
||||
+===-------------------------------------------------------------------------===
|
||||
+ Total Execution Time: 0.0001 seconds (0.0001 wall clock)
|
||||
+
|
||||
+ ---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name ---
|
||||
+ 0.0001 ( 90.1%) 0.0001 ( 90.1%) 0.0001 ( 90.1%) 0.0001 ( 90.1%) A1
|
||||
+ 0.0000 ( 9.9%) 0.0000 ( 9.9%) 0.0000 ( 9.9%) 0.0000 ( 9.9%) A2
|
||||
+ 0.0001 (100.0%) 0.0001 (100.0%) 0.0001 (100.0%) 0.0001 (100.0%) Total
|
||||
+
|
||||
+""" # noqa: E501
|
||||
+
|
||||
+timings_raw2 = """
|
||||
+ Total Execution Time: 0.0001 seconds (0.0001 wall clock)
|
||||
+
|
||||
+ ---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name ---
|
||||
+ 0.0001 ( 90.1%) ----- 0.0001 ( 90.1%) 0.0001 ( 90.1%) A1
|
||||
+ 0.0000 ( 9.9%) ----- 0.0000 ( 9.9%) 0.0000 ( 9.9%) A2
|
||||
+ 0.0001 (100.0%) ----- 0.0001 (100.0%) 0.0001 (100.0%) Total
|
||||
+
|
||||
+""" # noqa: E501
|
||||
+
|
||||
+
|
||||
class TestLLVMPassTimings(TestCase):
|
||||
|
||||
def test_usage(self):
|
||||
@@ -61,6 +85,15 @@ class TestLLVMPassTimings(TestCase):
|
||||
self.assertGreaterEqual(last, cur)
|
||||
cur = last
|
||||
|
||||
+ def test_parse_raw(self):
|
||||
+ timings1 = lpt.ProcessedPassTimings(timings_raw1)
|
||||
+ self.assertAlmostEqual(timings1.get_total_time(), 0.0001)
|
||||
+ self.assertIsInstance(timings1.summary(), str)
|
||||
+
|
||||
+ timings2 = lpt.ProcessedPassTimings(timings_raw2)
|
||||
+ self.assertAlmostEqual(timings2.get_total_time(), 0.0001)
|
||||
+ self.assertIsInstance(timings2.summary(), str)
|
||||
+
|
||||
|
||||
class TestLLVMPassTimingsDisabled(TestCase):
|
||||
def test_disabled_behavior(self):
|
230
numba-pr7483-numpy1_21.patch
Normal file
230
numba-pr7483-numpy1_21.patch
Normal file
@ -0,0 +1,230 @@
|
||||
From 3a2c5042fa85ac9b8fe398d605d6d373d27f42bb Mon Sep 17 00:00:00 2001
|
||||
From: Stuart Archibald <stuartarchibald@users.noreply.github.com>
|
||||
Date: Thu, 14 Oct 2021 09:35:24 +0100
|
||||
Subject: [PATCH 1/7] Update build matrix for NumPy 1.21 as per NEP-029.
|
||||
|
||||
As title.
|
||||
---
|
||||
azure-pipelines.yml | 68 ++++++++++++++--------------
|
||||
buildscripts/azure/azure-windows.yml | 8 ++--
|
||||
2 files changed, 38 insertions(+), 38 deletions(-)
|
||||
|
||||
Index: numba-0.54.1/setup.py
|
||||
===================================================================
|
||||
--- numba-0.54.1.orig/setup.py
|
||||
+++ numba-0.54.1/setup.py
|
||||
@@ -22,8 +22,7 @@ except ImportError:
|
||||
min_python_version = "3.7"
|
||||
max_python_version = "3.10" # exclusive
|
||||
min_numpy_build_version = "1.11"
|
||||
-min_numpy_run_version = "1.17"
|
||||
-max_numpy_run_version = "1.21"
|
||||
+min_numpy_run_version = "1.18"
|
||||
min_llvmlite_version = "0.37.0rc1"
|
||||
max_llvmlite_version = "0.38"
|
||||
|
||||
@@ -360,7 +359,7 @@ packages = find_packages(include=["numba
|
||||
build_requires = ['numpy >={}'.format(min_numpy_build_version)]
|
||||
install_requires = [
|
||||
'llvmlite >={},<{}'.format(min_llvmlite_version, max_llvmlite_version),
|
||||
- 'numpy >={},<{}'.format(min_numpy_run_version, max_numpy_run_version),
|
||||
+ 'numpy >={}'.format(min_numpy_run_version),
|
||||
'setuptools',
|
||||
]
|
||||
|
||||
Index: numba-0.54.1/numba/__init__.py
|
||||
===================================================================
|
||||
--- numba-0.54.1.orig/numba/__init__.py
|
||||
+++ numba-0.54.1/numba/__init__.py
|
||||
@@ -137,10 +137,8 @@ def _ensure_critical_deps():
|
||||
if PYVERSION < (3, 7):
|
||||
raise ImportError("Numba needs Python 3.7 or greater")
|
||||
|
||||
- if numpy_version < (1, 17):
|
||||
- raise ImportError("Numba needs NumPy 1.17 or greater")
|
||||
- elif numpy_version > (1, 20):
|
||||
- raise ImportError("Numba needs NumPy 1.20 or less")
|
||||
+ if numpy_version < (1, 18):
|
||||
+ raise ImportError("Numba needs NumPy 1.18 or greater")
|
||||
|
||||
try:
|
||||
import scipy
|
||||
Index: numba-0.54.1/README.rst
|
||||
===================================================================
|
||||
--- numba-0.54.1.orig/README.rst
|
||||
+++ numba-0.54.1/README.rst
|
||||
@@ -50,7 +50,7 @@ Dependencies
|
||||
|
||||
* Python versions: 3.7-3.9
|
||||
* llvmlite 0.37.*
|
||||
-* NumPy >=1.17,<1.21 (can build with 1.11 for ABI compatibility).
|
||||
+* NumPy >=1.18 (can build with 1.11 for ABI compatibility).
|
||||
|
||||
Optionally:
|
||||
|
||||
Index: numba-0.54.1/docs/source/user/5minguide.rst
|
||||
===================================================================
|
||||
--- numba-0.54.1.orig/docs/source/user/5minguide.rst
|
||||
+++ numba-0.54.1/docs/source/user/5minguide.rst
|
||||
@@ -18,7 +18,7 @@ Out of the box Numba works with the foll
|
||||
support on M1/Arm64.
|
||||
* GPUs: Nvidia CUDA.
|
||||
* CPython
|
||||
-* NumPy 1.17 - latest
|
||||
+* NumPy 1.18 - latest
|
||||
|
||||
How do I get it?
|
||||
----------------
|
||||
Index: numba-0.54.1/numba/np/ufunc/_internal.c
|
||||
===================================================================
|
||||
--- numba-0.54.1.orig/numba/np/ufunc/_internal.c
|
||||
+++ numba-0.54.1/numba/np/ufunc/_internal.c
|
||||
@@ -275,6 +275,7 @@ static PyMemberDef dufunc_members[] = {
|
||||
*/
|
||||
|
||||
static struct _ufunc_dispatch {
|
||||
+ /* Note that the following may also hold `_PyCFunctionFastWithKeywords` */
|
||||
PyCFunctionWithKeywords ufunc_reduce;
|
||||
PyCFunctionWithKeywords ufunc_accumulate;
|
||||
PyCFunctionWithKeywords ufunc_reduceat;
|
||||
@@ -285,7 +286,7 @@ static struct _ufunc_dispatch {
|
||||
} ufunc_dispatch;
|
||||
|
||||
static int
|
||||
-init_ufunc_dispatch(void)
|
||||
+init_ufunc_dispatch(int *numpy_uses_fastcall)
|
||||
{
|
||||
int result = 0;
|
||||
PyMethodDef * crnt = PyUFunc_Type.tp_methods;
|
||||
@@ -328,6 +329,16 @@ init_ufunc_dispatch(void)
|
||||
result = -1; /* Unknown method */
|
||||
}
|
||||
if (result < 0) break;
|
||||
+
|
||||
+ /* Check whether NumPy uses fastcall (ufunc.at never uses it) */
|
||||
+ if (strncmp(crnt_name, "at", 3) != 0) {
|
||||
+ if (*numpy_uses_fastcall == -1) {
|
||||
+ *numpy_uses_fastcall = crnt->ml_flags & METH_FASTCALL;
|
||||
+ }
|
||||
+ else if (*numpy_uses_fastcall != (crnt->ml_flags & METH_FASTCALL)) {
|
||||
+ return -1;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
if (result == 0) {
|
||||
/* Sanity check. */
|
||||
@@ -343,6 +354,7 @@ init_ufunc_dispatch(void)
|
||||
return result;
|
||||
}
|
||||
|
||||
+
|
||||
static PyObject *
|
||||
dufunc_reduce(PyDUFuncObject * self, PyObject * args, PyObject *kws)
|
||||
{
|
||||
@@ -367,6 +379,47 @@ dufunc_outer(PyDUFuncObject * self, PyOb
|
||||
return ufunc_dispatch.ufunc_outer((PyObject*)self->ufunc, args, kws);
|
||||
}
|
||||
|
||||
+
|
||||
+/*
|
||||
+ * The following are the vectorcall versions of the above, since NumPy
|
||||
+ * uses the FASTCALL/Vectorcall protocol starting with version 1.21.
|
||||
+ * The only NumPy versions supporting vectorcall use Python 3.7 or higher.
|
||||
+ */
|
||||
+static PyObject *
|
||||
+dufunc_reduce_fast(PyDUFuncObject * self,
|
||||
+ PyObject *const *args, Py_ssize_t len_args, PyObject *kwnames)
|
||||
+{
|
||||
+ return ((_PyCFunctionFastWithKeywords)ufunc_dispatch.ufunc_reduce)(
|
||||
+ (PyObject*)self->ufunc, args, len_args, kwnames);
|
||||
+}
|
||||
+
|
||||
+static PyObject *
|
||||
+dufunc_reduceat_fast(PyDUFuncObject * self,
|
||||
+ PyObject *const *args, Py_ssize_t len_args, PyObject *kwnames)
|
||||
+{
|
||||
+ return ((_PyCFunctionFastWithKeywords)ufunc_dispatch.ufunc_reduceat)(
|
||||
+ (PyObject*)self->ufunc, args, len_args, kwnames);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static PyObject *
|
||||
+dufunc_accumulate_fast(PyDUFuncObject * self,
|
||||
+ PyObject *const *args, Py_ssize_t len_args, PyObject *kwnames)
|
||||
+{
|
||||
+ return ((_PyCFunctionFastWithKeywords)ufunc_dispatch.ufunc_accumulate)(
|
||||
+ (PyObject*)self->ufunc, args, len_args, kwnames);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static PyObject *
|
||||
+dufunc_outer_fast(PyDUFuncObject * self,
|
||||
+ PyObject *const *args, Py_ssize_t len_args, PyObject *kwnames)
|
||||
+{
|
||||
+ return ((_PyCFunctionFastWithKeywords)ufunc_dispatch.ufunc_outer)(
|
||||
+ (PyObject*)self->ufunc, args, len_args, kwnames);
|
||||
+}
|
||||
+
|
||||
+
|
||||
#if NPY_API_VERSION >= 0x00000008
|
||||
static PyObject *
|
||||
dufunc_at(PyDUFuncObject * self, PyObject * args)
|
||||
@@ -567,6 +620,41 @@ static struct PyMethodDef dufunc_methods
|
||||
{NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
+
|
||||
+/*
|
||||
+ * If Python is new enough, NumPy may use fastcall. In that case we have to
|
||||
+ * also use fastcall for simplicity and speed.
|
||||
+ */
|
||||
+static struct PyMethodDef dufunc_methods_fast[] = {
|
||||
+ {"reduce",
|
||||
+ (PyCFunction)dufunc_reduce_fast,
|
||||
+ METH_FASTCALL | METH_KEYWORDS, NULL },
|
||||
+ {"accumulate",
|
||||
+ (PyCFunction)dufunc_accumulate_fast,
|
||||
+ METH_FASTCALL | METH_KEYWORDS, NULL },
|
||||
+ {"reduceat",
|
||||
+ (PyCFunction)dufunc_reduceat_fast,
|
||||
+ METH_FASTCALL | METH_KEYWORDS, NULL },
|
||||
+ {"outer",
|
||||
+ (PyCFunction)dufunc_outer_fast,
|
||||
+ METH_FASTCALL | METH_KEYWORDS, NULL},
|
||||
+#if NPY_API_VERSION >= 0x00000008
|
||||
+ {"at",
|
||||
+ (PyCFunction)dufunc_at,
|
||||
+ METH_VARARGS, NULL},
|
||||
+#endif
|
||||
+ {"_compile_for_args",
|
||||
+ (PyCFunction)dufunc__compile_for_args,
|
||||
+ METH_VARARGS | METH_KEYWORDS,
|
||||
+ "Abstract method: subclasses should overload _compile_for_args() to compile the ufunc at the given arguments' types."},
|
||||
+ {"_add_loop",
|
||||
+ (PyCFunction)dufunc__add_loop,
|
||||
+ METH_VARARGS,
|
||||
+ NULL},
|
||||
+ {NULL, NULL, 0, NULL} /* sentinel */
|
||||
+};
|
||||
+
|
||||
+
|
||||
static PyObject *
|
||||
dufunc_getfrozen(PyDUFuncObject * self, void * closure)
|
||||
{
|
||||
@@ -680,8 +768,15 @@ MOD_INIT(_internal)
|
||||
return MOD_ERROR_VAL;
|
||||
|
||||
PyDUFunc_Type.tp_new = PyType_GenericNew;
|
||||
- if (init_ufunc_dispatch() <= 0)
|
||||
+
|
||||
+ int numpy_uses_fastcall = -1;
|
||||
+ if (init_ufunc_dispatch(&numpy_uses_fastcall) <= 0)
|
||||
return MOD_ERROR_VAL;
|
||||
+
|
||||
+ if (numpy_uses_fastcall) {
|
||||
+ PyDUFunc_Type.tp_methods = dufunc_methods_fast;
|
||||
+ }
|
||||
+
|
||||
if (PyType_Ready(&PyDUFunc_Type) < 0)
|
||||
return MOD_ERROR_VAL;
|
||||
Py_INCREF(&PyDUFunc_Type);
|
@ -1,52 +0,0 @@
|
||||
From 4811aeceb2dde05124697909b87cf4ad2ae07c65 Mon Sep 17 00:00:00 2001
|
||||
From: Stuart Archibald <stuartarchibald@users.noreply.github.com>
|
||||
Date: Wed, 17 Mar 2021 12:29:16 +0000
|
||||
Subject: [PATCH 1/2] Ignore warnings from packaging module when testing import
|
||||
behaviour.
|
||||
|
||||
As title.
|
||||
|
||||
Fixes #6831
|
||||
---
|
||||
numba/tests/test_import.py | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/numba/tests/test_import.py b/numba/tests/test_import.py
|
||||
index 7cc9082046..a46ad2df6c 100644
|
||||
--- a/numba/tests/test_import.py
|
||||
+++ b/numba/tests/test_import.py
|
||||
@@ -58,7 +58,9 @@ def test_no_accidental_warnings(self):
|
||||
# checks that importing Numba isn't accidentally triggering warnings due
|
||||
# to e.g. deprecated use of import locations from Python's stdlib
|
||||
code = "import numba"
|
||||
- flags = ["-Werror",]
|
||||
+ # See: https://github.com/numba/numba/issues/6831
|
||||
+ # bug in setuptools/packaging causing a deprecation warning
|
||||
+ flags = ["-Werror", "-Wignore::DeprecationWarning:packaging:"]
|
||||
self.run_in_subproc(code, flags)
|
||||
|
||||
def test_import_star(self):
|
||||
|
||||
From 94fc06e77b648b1cb5021cd6d460aa42808a0393 Mon Sep 17 00:00:00 2001
|
||||
From: Stuart Archibald <stuartarchibald@users.noreply.github.com>
|
||||
Date: Wed, 17 Mar 2021 16:42:14 +0000
|
||||
Subject: [PATCH 2/2] Respond to feedback
|
||||
|
||||
As title]
|
||||
---
|
||||
numba/tests/test_import.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/numba/tests/test_import.py b/numba/tests/test_import.py
|
||||
index a46ad2df6c..a0ca5725eb 100644
|
||||
--- a/numba/tests/test_import.py
|
||||
+++ b/numba/tests/test_import.py
|
||||
@@ -60,7 +60,7 @@ def test_no_accidental_warnings(self):
|
||||
code = "import numba"
|
||||
# See: https://github.com/numba/numba/issues/6831
|
||||
# bug in setuptools/packaging causing a deprecation warning
|
||||
- flags = ["-Werror", "-Wignore::DeprecationWarning:packaging:"]
|
||||
+ flags = ["-Werror", "-Wignore::DeprecationWarning:packaging.version:"]
|
||||
self.run_in_subproc(code, flags)
|
||||
|
||||
def test_import_star(self):
|
@ -1,3 +1,109 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 18 18:42:21 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Update to 0.54.1
|
||||
* This is a bugfix release for 0.54.0. It fixes a regression in
|
||||
structured array type handling, a potential leak on
|
||||
initialization failure in the CUDA target, a regression caused
|
||||
by Numba’s vendored cloudpickle module resetting dynamic
|
||||
classes and a few minor testing/infrastructure related
|
||||
problems.
|
||||
- Release summary for 0.54.0
|
||||
* This release includes a significant number of new features,
|
||||
important refactoring, critical bug fixes and a number of
|
||||
dependency upgrades.
|
||||
* Python language support enhancements:
|
||||
- Basic support for f-strings.
|
||||
- dict comprehensions are now supported.
|
||||
- The sum built-in function is implemented.
|
||||
* NumPy features/enhancements, The following functions are now
|
||||
supported:
|
||||
- np.clip
|
||||
- np.iscomplex
|
||||
- np.iscomplexobj
|
||||
- np.isneginf
|
||||
- np.isposinf
|
||||
- np.isreal
|
||||
- np.isrealobj
|
||||
- np.isscalar
|
||||
- np.random.dirichlet
|
||||
- np.rot90
|
||||
- np.swapaxes
|
||||
* Also np.argmax has gained support for the axis keyword argument
|
||||
and it’s now possible to use 0d NumPy arrays as scalars in
|
||||
__setitem__ calls.
|
||||
|
||||
Internal changes:
|
||||
* Debugging support through DWARF has been fixed and enhanced.
|
||||
* Numba now optimises the way in which locals are emitted to help
|
||||
reduce time spend in LLVM’s SROA passes.
|
||||
|
||||
CUDA target changes:
|
||||
* Support for emitting lineinfo to be consumed by profiling tools
|
||||
such as Nsight Compute
|
||||
* Improved fastmath code generation for various trig, division,
|
||||
and other functions
|
||||
* Faster compilation using lazy addition of libdevice to compiled
|
||||
units
|
||||
* Support for IPC on Windows
|
||||
* Support for passing tuples to CUDA ufuncs
|
||||
* Performance warnings:
|
||||
- When making implicit copies by calling a kernel on arrays in
|
||||
host memory
|
||||
- When occupancy is poor due to kernel or ufunc/gufunc
|
||||
configuration
|
||||
* Support for implementing warp-aggregated intrinsics:
|
||||
- Using support for more CUDA functions: activemask(),
|
||||
lanemask_lt()
|
||||
- The ffs() function now works correctly!
|
||||
* Support for @overload in the CUDA target
|
||||
|
||||
Intel kindly sponsored research and development that lead to a
|
||||
number of new features and internal support changes:
|
||||
* Dispatchers can now be retargetted to a new target via a user
|
||||
defined context manager.
|
||||
* Support for custom NumPy array subclasses has been added
|
||||
(including an overloadable memory allocator).
|
||||
* An inheritance based model for targets that permits targets to
|
||||
share @overload implementations.
|
||||
* Per function compiler flags with inheritance behaviours.
|
||||
* The extension API now has support for overloading class methods
|
||||
via the @overload_classmethod decorator.
|
||||
|
||||
Deprecations:
|
||||
* The ROCm target (for AMD ROC GPUs) has been moved to an
|
||||
“unmaintained” status and a seperate repository stub has been
|
||||
created for it at: https://github.com/numba/numba-rocm
|
||||
|
||||
CUDA target deprecations and breaking changes:
|
||||
* Relaxed strides checking is now the default when computing the
|
||||
contiguity of device arrays.
|
||||
* The inspect_ptx() method is deprecated. For use cases that
|
||||
obtain PTX for further compilation outside of Numba, use
|
||||
compile_ptx() instead.
|
||||
* Eager compilation of device functions (the case when
|
||||
device=True and a signature is provided) is deprecated.
|
||||
|
||||
Version support/dependency changes:
|
||||
* LLVM 11 is now supported on all platforms via llvmlite.
|
||||
* The minimum supported Python version is raised to 3.7.
|
||||
* NumPy version 1.20 is supported.
|
||||
* The minimum supported NumPy version is raised to 1.17 for
|
||||
runtime (compilation however remains compatible with NumPy
|
||||
1.11).
|
||||
* Vendor cloudpickle v1.6.0 – now used for all pickle operations.
|
||||
* TBB >= 2021 is now supported and all prior versions are
|
||||
unsupported (not easily possible to maintain the ABI breaking
|
||||
changes).
|
||||
- Full release notes;
|
||||
https://numba.readthedocs.io/en/0.54.1/release-notes.html
|
||||
- Drop patches merged upstream:
|
||||
* packaging-ignore-setuptools-deprecation.patch
|
||||
* numba-pr6851-llvm-timings.patch
|
||||
- Refresh skip-failing-tests.patch, fix-max-name-size.patch
|
||||
- Add numba-pr7483-numpy1_21.patch gh#numba/numba#7176,
|
||||
gh#numba/numba#7483
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 17 16:51:46 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package python-numba-test
|
||||
# spec file
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
#
|
||||
@ -18,7 +18,6 @@
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define skip_python2 1
|
||||
# NEP 29: python36-numpy and -scipy no longer in TW
|
||||
%define skip_python36 1
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
@ -29,7 +28,7 @@
|
||||
%bcond_with test
|
||||
%endif
|
||||
Name: python-numba%{psuffix}
|
||||
Version: 0.53.0
|
||||
Version: 0.54.1
|
||||
Release: 0
|
||||
Summary: NumPy-aware optimizing compiler for Python using LLVM
|
||||
License: BSD-2-Clause
|
||||
@ -37,22 +36,20 @@ URL: https://numba.pydata.org/
|
||||
Source: https://files.pythonhosted.org/packages/source/n/numba/numba-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM fix-max-name-size.patch -- fix for gh#numba/numba#3876 -- from gh#numba/numba#4373
|
||||
Patch0: fix-max-name-size.patch
|
||||
# PATCH-FIX-UPSTREAM packaging-ignore-setuptools-deprecation.patch -- gh#numba/numba#6837
|
||||
Patch1: https://github.com/numba/numba/pull/6837.patch#/packaging-ignore-setuptools-deprecation.patch
|
||||
# PATCH-FIX-USPTREAM ignore empty system time column on llvm timings -- gh#numba/numba#6851
|
||||
Patch2: numba-pr6851-llvm-timings.patch
|
||||
# PATCH-FIX-UPSTREAM support numpy 1.21 -- gh#numba/numba#7176, gh#numba/numba#7483
|
||||
Patch1: numba-pr7483-numpy1_21.patch
|
||||
# PATCH-FIX-OPENSUSE skip tests failing due to OBS specifics
|
||||
Patch3: skip-failing-tests.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module numpy-devel >= 1.15}
|
||||
BuildRequires: %{python_module devel >= 3.7}
|
||||
BuildRequires: %{python_module numpy-devel >= 1.18}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: tbb-devel
|
||||
Requires: python-llvmlite < 0.37
|
||||
Requires: python-llvmlite >= 0.36
|
||||
Requires: python-numpy >= 1.15
|
||||
BuildRequires: tbb-devel >= 2021
|
||||
Requires: python-llvmlite < 0.38
|
||||
Requires: python-llvmlite >= 0.37
|
||||
Requires: python-numpy >= 1.18
|
||||
Requires: python-scipy >= 0.16
|
||||
Requires(post): update-alternatives
|
||||
Requires(preun):update-alternatives
|
||||
@ -106,24 +103,20 @@ This package contains files for developing applications using numba.
|
||||
%setup -q -n numba-%{version}
|
||||
%autopatch -p1
|
||||
|
||||
# Incompatilbe numpy versions (?)
|
||||
# Check these with every version update! (Last check 0.53)
|
||||
# https://github.com/numba/numba/issues/5251
|
||||
# https://numba.discourse.group/t/helping-test-numba-0-53-0-rc/519/34
|
||||
rm numba/tests/test_np_functions.py
|
||||
rm numba/tests/test_array_reductions.py
|
||||
# timeouts randomly in OBS
|
||||
rm numba/tests/test_typedlist.py
|
||||
# if we reduced the amount of tests too much:
|
||||
#sed -i -e '/check_testsuite_size/ s/5000/3000/' numba/tests/test_runtests.py
|
||||
# sed -i -e '/check_testsuite_size/ s/5000/3000/' numba/tests/test_runtests.py
|
||||
# our setup imports distutils. Not sure why, but should not be a problem.
|
||||
sed -i -e "/def test_laziness/,/def/ {/'distutils',/ d}" numba/tests/test_import.py
|
||||
|
||||
sed -i -e '1{/env python/ d}' numba/misc/appdirs.py
|
||||
|
||||
%build
|
||||
%if !%{with test}
|
||||
export CFLAGS="%{optflags} -fPIC"
|
||||
%python_build
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if !%{with test}
|
||||
@ -154,7 +147,7 @@ mv numba_temp numba
|
||||
%post
|
||||
%{python_install_alternative numba pycc}
|
||||
|
||||
%preun
|
||||
%postun
|
||||
%python_uninstall_alternative numba
|
||||
|
||||
%files %{python_files} -f devel-files-exclude-%{python_bin_suffix}.files
|
||||
|
@ -1,39 +1,38 @@
|
||||
Index: numba-0.53.0/numba/tests/test_parfors.py
|
||||
Index: numba-0.54.0/numba/tests/test_parfors.py
|
||||
===================================================================
|
||||
--- numba-0.53.0.orig/numba/tests/test_parfors.py
|
||||
+++ numba-0.53.0/numba/tests/test_parfors.py
|
||||
@@ -1649,7 +1649,7 @@ class TestParfors(TestParforsBase):
|
||||
msg = ("The reshape API may only include one negative argument.")
|
||||
self.assertIn(msg, str(raised.exception))
|
||||
--- numba-0.54.0.orig/numba/tests/test_parfors.py
|
||||
+++ numba-0.54.0/numba/tests/test_parfors.py
|
||||
@@ -1146,6 +1146,7 @@ class TestParforNumPy(TestParforsBase):
|
||||
self.check_variants(test_impl2, data_gen)
|
||||
self.count_parfors_variants(test_impl2, data_gen)
|
||||
|
||||
- @skip_parfors_unsupported
|
||||
+ @unittest.skip("Fails on type check in OBS")
|
||||
def test_ndarray_fill(self):
|
||||
def test_impl(x):
|
||||
x.fill(7.0)
|
||||
@@ -2842,7 +2842,7 @@ class TestParforsVectorizer(TestPrangeBa
|
||||
@@ -3890,7 +3891,7 @@ class TestParforsVectorizer(TestPrangeBa
|
||||
# to check vsqrtpd operates on zmm
|
||||
match_vsqrtpd_on_zmm = re.compile('\n\s+vsqrtpd\s+.*zmm.*\n')
|
||||
|
||||
- @linux_only
|
||||
+ @unittest.skip("Our x86_64 asm is most probably different from the Travis one.")
|
||||
+ @unittest.skip("Our x86_64 asm is most probably different from the upstream one.")
|
||||
def test_vectorizer_fastmath_asm(self):
|
||||
""" This checks that if fastmath is set and the underlying hardware
|
||||
is suitable, and the function supplied is amenable to fastmath based
|
||||
@@ -2885,7 +2885,7 @@ class TestParforsVectorizer(TestPrangeBa
|
||||
@@ -3933,7 +3934,7 @@ class TestParforsVectorizer(TestPrangeBa
|
||||
# check no zmm addressing is present
|
||||
self.assertTrue('zmm' not in v)
|
||||
|
||||
- @linux_only
|
||||
+ @unittest.skip("Our x86_64 asm is most probably different from the Travis one.")
|
||||
+ @unittest.skip("Our x86_64 asm is most probably different from the upstream one.")
|
||||
def test_unsigned_refusal_to_vectorize(self):
|
||||
""" This checks that if fastmath is set and the underlying hardware
|
||||
is suitable, and the function supplied is amenable to fastmath based
|
||||
Index: numba-0.53.0/numba/tests/test_parfors_passes.py
|
||||
Index: numba-0.54.0/numba/tests/test_parfors_passes.py
|
||||
===================================================================
|
||||
--- numba-0.53.0.orig/numba/tests/test_parfors_passes.py
|
||||
+++ numba-0.53.0/numba/tests/test_parfors_passes.py
|
||||
@@ -512,6 +512,7 @@ class TestConvertLoopPass(BaseTest):
|
||||
--- numba-0.54.0.orig/numba/tests/test_parfors_passes.py
|
||||
+++ numba-0.54.0/numba/tests/test_parfors_passes.py
|
||||
@@ -516,6 +516,7 @@ class TestConvertLoopPass(BaseTest):
|
||||
str(raises.exception),
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user