diff options
author | Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> | 2019-07-05 16:53:08 +0200 |
---|---|---|
committer | Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> | 2019-07-05 16:53:08 +0200 |
commit | 8ff15764a99df31a5d75e1e19a89b413408cfcc2 (patch) | |
tree | ce3b7925bdce33294daa71ff6cf0b85a0e82386b /debian | |
parent | 488cf9a749ac24122e94b194808ae766d46d0c1d (diff) |
Added test on openCL's use
Diffstat (limited to 'debian')
-rw-r--r-- | debian/patches/0006-Tests-if-openCL-can-be-used.patch | 28 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 29 insertions, 0 deletions
diff --git a/debian/patches/0006-Tests-if-openCL-can-be-used.patch b/debian/patches/0006-Tests-if-openCL-can-be-used.patch new file mode 100644 index 0000000..69ba42f --- /dev/null +++ b/debian/patches/0006-Tests-if-openCL-can-be-used.patch @@ -0,0 +1,28 @@ +From: Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> +Date: Fri, 5 Jul 2019 16:52:20 +0200 +Subject: Tests if openCL can be used + +--- + silx/opencl/common.py | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/silx/opencl/common.py b/silx/opencl/common.py +index 17c67d1..421a35a 100644 +--- a/silx/opencl/common.py ++++ b/silx/opencl/common.py +@@ -60,7 +60,14 @@ else: + logger.warning("Unable to import pyOpenCl. Please install it from: http://pypi.python.org/pypi/pyopencl") + pyopencl = None + else: +- import pyopencl.array as array ++ try: ++ pyopencl.get_platforms() ++ except pyopencl.LogicError: ++ logger.warning("The module pyOpenCL has been imported but can't be used here") ++ pyopencl = None ++ else: ++ import pyopencl.array as array ++ mf = pyopencl.mem_flags + + if pyopencl is None: + class mf(object): diff --git a/debian/patches/series b/debian/patches/series index 6669377..64e7e06 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ 0003-do-not-modify-PYTHONPATH-from-setup.py.patch 0004-fix-missing-import.patch 0005-fix-problem-with-sift-import.patch +0006-Tests-if-openCL-can-be-used.patch |