Problems with RawGLImageWidget in VideoSpeedTest.py #3373
-
|
Hi, I tried the example VideoSpeedTest.py, if I checked 'Use CUDA (GPU) if available' with RawGLImageWidget, I got errors below. Looked like cupy array cannot be converted to opengl texture. Did I miss something? I used Win10 with RTX3060 laptop. Main conda env listed |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Looking at the source code of pyqtgraph 0.13.7, The code to add support seems trivial enough but it would still involve a GPU (cupy array) -> CPU (numpy array) -> GPU (opengl texture) trip. But if you did really want to make use of If you are interested, you could implement the following to avoid the GPU->CPU memory copy. |
Beta Was this translation helpful? Give feedback.
Looking at the source code of pyqtgraph 0.13.7,
cupysupport is available forRawImageWidgetbut not forRawImageGLWidget.The code to add support seems trivial enough but it would still involve a GPU (cupy array) -> CPU (numpy array) -> GPU (opengl texture) trip.
But if you did really want to make use of
cupyarrays withRawImageGLWidgetin your code, you could simply do the conversion of thecupyarray tonumpyarray manually?If you are interested, you could implement the following to avoid the GPU->CPU memory copy.
https://gist.github.com/keckj/e37d312128eac8c5fca790ce1e7fc437
https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__OPENGL.html
https://docs.nvidia.com/cuda/cuda-ru…