diff options
author | Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr> | 2019-12-23 14:04:37 +0100 |
---|---|---|
committer | Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr> | 2019-12-23 14:04:37 +0100 |
commit | 4b9a78d3afad181b195ccfe5bf7f6b7c8fb6aa50 (patch) | |
tree | 99db5a342a22b6666016abf5cd229719a42c3741 /debian/patches/0006-Tests-if-openCL-can-be-used.patch | |
parent | 454fbfb813aa6f084211672c832091d80a4fa783 (diff) |
refreshed patch series
Diffstat (limited to 'debian/patches/0006-Tests-if-openCL-can-be-used.patch')
-rw-r--r-- | debian/patches/0006-Tests-if-openCL-can-be-used.patch | 29 |
1 files changed, 11 insertions, 18 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 index 52a8c93..78a3bf8 100644 --- a/debian/patches/0006-Tests-if-openCL-can-be-used.patch +++ b/debian/patches/0006-Tests-if-openCL-can-be-used.patch @@ -3,26 +3,19 @@ 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(-) + silx/opencl/common.py | 2 ++ + 1 file changed, 2 insertions(+) diff --git a/silx/opencl/common.py b/silx/opencl/common.py -index 1f9df50..73cf676 100644 +index 110d941..3525bf4 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 +@@ -75,6 +75,8 @@ if pyopencl is None: + WRITE_ONLY = 1 + READ_ONLY = 1 + READ_WRITE = 1 ++else: ++ mf = pyopencl.mem_flags - if pyopencl is None: - class mf(object): + + FLOP_PER_CORE = {"GPU": 64, # GPU, Fermi at least perform 64 flops per cycle/multicore, G80 were at 24 or 48 ... |