pyqtgraph/pyqtgraph/util
Martin Chase f2b4a15b2d
Performance enhancement: use CUDA in ImageItem (#1466)
* Add CLI args to video speed test for easier / automated benchmarking

* use a buffer-qimage so we can avoid allocing so much

this should improve performance under windows

* playing with numba

* oh, mins/maxes in the other order

* maybe put the cupy in here and see what happens

* pre-alloc for gpu and cpu

* handle possibility of not having cupy

* no numba in this branch

* organize imports

* name them after their use, not their expected device

* cupy.take does not support clip mode, so do it explicitly

* add CUDA option to the VideoSpeedTest

* rename private attr xp to _xp

* handle resizes at the last moment

* cupy is less accepting of lists as args

* or somehow range isn't allowed? what histogram is this?

* construct the array with python objects

* get the python value right away

* put LUT into cupy if needed

* docstring about cuda toolkit version

* better handling and display of missing cuda lib

* lint

* import need

* handle switching between cupy and numpy in a single ImageItem

* only use xp when necessary

we can now depend on numpy >= 1.17, which means __array_function__-implementing cupy can
seamlessly pass into numpy functions. the remaining uses of xp are for our functions which
need to allocate new data structures, an operation that has to be substrate-specific.

remove empty_cupy; just check if the import succeeded, instead.

* use an option to control use of cupy

* convert cupy.ceil array to int for easier mathing

* RawImageWidget gets to use the getCupy function now, too

* raise error to calm linters; rename for clarity

* Add Generated Template Files

* document things better

* cruft removal

* warnings to communicate when cupy is expected but somehow broken

* playing with settings to suss out timeout

* playing with more stuff to suss out timeout

* replace with empty list

* skip test_ExampleApp on linux+pyside2 only

Co-authored-by: Luke Campagnola <luke.campagnola@gmail.com>
Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2021-01-19 21:26:24 -08:00
..
colorama Added Travis CI support 2014-03-30 02:51:32 -04:00
tests fix iteritems 2018-05-15 16:37:20 -07:00
__init__.py Moved lru_cache to util, test to util/tests 2014-03-05 09:16:53 -05:00
cprint.py Import from python2_3 for all uses of basestring, cmp, and xrange 2015-05-19 09:29:55 -04:00
cupy_helper.py Performance enhancement: use CUDA in ImageItem (#1466) 2021-01-19 21:26:24 -08:00
garbage_collector.py MNT: Print function -> Print statement 2015-07-11 11:17:48 -05:00
get_resolution.py fix get_resolution.py to use QScreen 2021-01-16 14:33:47 +08:00
lru_cache.py fix lru_cache 2018-05-16 08:33:51 -07:00
mutex.py Allow Mutex to be used as drop-in replacement for python's Lock 2017-09-13 22:14:29 -07:00
pil_fix.py Remove old PIL-fix files, replace with equivalent runtime-patching code. 2014-08-07 09:13:32 -04:00