diff options
Diffstat (limited to 'silx/opencl')
-rw-r--r-- | silx/opencl/codec/byte_offset.py | 6 | ||||
-rw-r--r-- | silx/opencl/common.py | 8 | ||||
-rw-r--r-- | silx/opencl/test/test_addition.py | 4 | ||||
-rw-r--r-- | silx/opencl/test/test_medfilt.py | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/silx/opencl/codec/byte_offset.py b/silx/opencl/codec/byte_offset.py index 565b0c5..eaf37ee 100644 --- a/silx/opencl/codec/byte_offset.py +++ b/silx/opencl/codec/byte_offset.py @@ -37,7 +37,7 @@ __authors__ = ["Jérôme Kieffer"] __contact__ = "jerome.kieffer@esrf.eu" __license__ = "MIT" __copyright__ = "European Synchrotron Radiation Facility, Grenoble, France" -__date__ = "24/10/2017" +__date__ = "11/10/2018" __status__ = "production" @@ -404,8 +404,8 @@ class ByteOffset(OpenclProcessing): allocator=functools.partial(out.base_data.get_sub_region, out.offset)) - evt = pyopencl.enqueue_copy_buffer( - self.queue, d_compressed.data, out.data, byte_count=byte_count) + evt = pyopencl.enqueue_copy(self.queue, out.data, d_compressed.data, + byte_count=byte_count) events.append( EventDescription("copy D -> D: internal -> out", evt)) diff --git a/silx/opencl/common.py b/silx/opencl/common.py index e955f46..9a04035 100644 --- a/silx/opencl/common.py +++ b/silx/opencl/common.py @@ -4,7 +4,7 @@ # Project: S I L X project # https://github.com/silx-kit/silx # -# Copyright (C) 2012-2017 European Synchrotron Radiation Facility, Grenoble, France +# Copyright (C) 2012-2018 European Synchrotron Radiation Facility, Grenoble, France # # Principal author: Jérôme Kieffer (Jerome.Kieffer@ESRF.eu) # @@ -34,7 +34,7 @@ __author__ = "Jerome Kieffer" __contact__ = "Jerome.Kieffer@ESRF.eu" __license__ = "MIT" __copyright__ = "2012-2017 European Synchrotron Radiation Facility, Grenoble, France" -__date__ = "16/10/2017" +__date__ = "20/09/2018" __status__ = "stable" __all__ = ["ocl", "pyopencl", "mf", "release_cl_buffers", "allocate_cl_buffers", "measure_workgroup_size", "kernel_workgroup_size"] @@ -51,7 +51,7 @@ logger = logging.getLogger(__name__) if os.environ.get("SILX_OPENCL") in ["0", "False"]: - logger.warning("Use of OpenCL has been disables from environment variable: SILX_OPENCL=0") + logger.info("Use of OpenCL has been disabled from environment variable: SILX_OPENCL=0") pyopencl = None else: try: @@ -317,7 +317,7 @@ class OpenCL(object): flop_core = 1 workgroup = device.max_work_group_size if (devtype == "CPU") and (pypl.vendor == "Apple"): - logger.warning("For Apple's OpenCL on CPU: Measuring actual valid max_work_goup_size.") + logger.info("For Apple's OpenCL on CPU: Measuring actual valid max_work_goup_size.") workgroup = _measure_workgroup_size(device, fast=True) if (devtype == "GPU") and os.environ.get("GPU") == "False": # Environment variable to disable GPU devices diff --git a/silx/opencl/test/test_addition.py b/silx/opencl/test/test_addition.py index cde86e2..3283a4d 100644 --- a/silx/opencl/test/test_addition.py +++ b/silx/opencl/test/test_addition.py @@ -35,7 +35,7 @@ __authors__ = ["Henri Payno, Jérôme Kieffer"] __contact__ = "jerome.kieffer@esrf.eu" __license__ = "MIT" __copyright__ = "2013 European Synchrotron Radiation Facility, Grenoble, France" -__date__ = "12/02/2018" +__date__ = "05/07/2018" import logging import numpy @@ -110,7 +110,7 @@ class TestAddition(unittest.TestCase): good = numpy.allclose(res, self.data - 5) if good and wg > self.max_valid_wg: self.__class__.max_valid_wg = wg - self.assert_(good, "calculation is correct for WG=%s" % wg) + self.assertTrue(good, "calculation is correct for WG=%s" % wg) @unittest.skipUnless(ocl, "pyopencl is missing") def test_measurement(self): diff --git a/silx/opencl/test/test_medfilt.py b/silx/opencl/test/test_medfilt.py index f4e4cc8..976b199 100644 --- a/silx/opencl/test/test_medfilt.py +++ b/silx/opencl/test/test_medfilt.py @@ -35,7 +35,7 @@ __authors__ = ["Jérôme Kieffer"] __contact__ = "jerome.kieffer@esrf.eu" __license__ = "MIT" __copyright__ = "2013-2017 European Synchrotron Radiation Facility, Grenoble, France" -__date__ = "15/03/2017" +__date__ = "05/07/2018" import sys @@ -112,7 +112,7 @@ class TestMedianFilter(unittest.TestCase): logger.info("test_medfilt: size: %s: skipped") else: logger.info("test_medfilt: size: %s error %s, t_ref: %.3fs, t_ocl: %.3fs" % r) - self.assert_(r.error == 0, 'Results are correct') + self.assertEqual(r.error, 0, 'Results are correct') def benchmark(self, limit=36): "Run some benchmarking" |