Xpra: Ticket #384: cuda csc

Pointers:

See also:

Note: on Fedora 18, you need this fix



Thu, 18 Jul 2013 07:52:10 GMT - Antoine Martin: description changed


Sun, 21 Jul 2013 14:40:59 GMT - ahuillet:

As of r3943 this is integrated in Xpra. Needed:


Mon, 22 Jul 2013 12:12:10 GMT - Antoine Martin:

r3932 added hardcoded paths, r3961 replaces this with a call to pkgconfig, just place your machine/distro specific paths in that file instead, here is mine for CUDA 5.5 on x86_64 with an install prefix of /opt/cuda (symlinked from /opt/cuda-5.5):

prefix=/opt
exec_prefix=${prefix}
libdir=/opt/cuda/lib64
includedir=/opt/cuda/include
Name: cuda
Description: CUDA
Version: 1.0
Requires:
Conflicts:
Libs: -L${libdir} -L/usr/lib64/nvidia/ -lcuda -lnppc -lnppi -lnpps -lcudart
Cflags: -I${includedir}

Looks to me like this another module that should probably use an existing glue layer (NPP and OpenCV webcam app in Python


Mon, 02 Sep 2013 16:03:08 GMT - Antoine Martin: attachment set

work in progress pycuda code: done rgb to yuv


Tue, 03 Sep 2013 04:16:02 GMT - Antoine Martin: attachment set

works both ways now


Tue, 03 Sep 2013 08:17:35 GMT - Antoine Martin:

pycuda version replaces this code in r4269, adding benchmark data to wiki/CSC


Mon, 07 Oct 2013 07:53:49 GMT - Antoine Martin: attachment set

use code similar to #370 (custom kernels) instead of the useless nvidia npp


Mon, 07 Oct 2013 07:55:32 GMT - Antoine Martin:

Note: this is broken at present, but can be made to work using similar code to the one used in #370 - see patch above. The common cuda/kernel bits should be moved to a cuda support module.


Tue, 08 Oct 2013 17:25:07 GMT - Antoine Martin:

r4429 uses pycuda and custom kernels.

This isn't very fast and I'm not sure it even converts properly (mostly untested), but at least it runs and can be fixed, unlike the NPP version.

It is much slower than the opencl version (#422) - see wiki/CSC:

init_cuda(0) compiling kernel RGB_to_YUV444P
convert_image(<class 'xpra.codecs.image_wrapper.ImageWrapper'>\
    (RGBX:(0, 0, 2560, 1600, 32):PACKED)) planes=0, pixels=<type 'bytearray'>, size=16384000
allocation and upload took 6.9ms
RGB_to_YUV444P took 14.9ms
read back took 9.6ms, total time: 31.8
convert_image(<class 'xpra.codecs.image_wrapper.ImageWrapper'>\
    (RGBX:(0, 0, 2560, 1600, 32):PACKED)) planes=0, pixels=<type 'bytearray'>,
size=16384000
allocation and upload took 5.9ms
RGB_to_YUV444P took 14.7ms
read back took 11.1ms, total time: 32.2
RGBX    to YUV444P at  2560x1600        : 22 MPixels/s

Tue, 15 Oct 2013 12:20:52 GMT - Antoine Martin:

For TLS issues (if any), see ticket:422#comment:12.


Fri, 25 Oct 2013 03:41:46 GMT - Antoine Martin:

Updated pkgconfig file (we no longer need npp - if someone needs it, it should probably go in its own pkgconfig file):

prefix=/opt
exec_prefix=${prefix}
libdir=/opt/cuda/lib64
includedir=/opt/cuda/include
Name: cuda
Description: CUDA
Version: 1.0
Requires:
Conflicts:
Libs: -L${libdir} -L/usr/lib64/nvidia/ -lcuda -lcudart
Cflags: -I${includedir}

Mon, 11 Nov 2013 05:25:21 GMT - Antoine Martin:


Tue, 10 Dec 2013 09:04:50 GMT - Antoine Martin: owner changed

Minor fix in r4910.

Just like #422: looks good to me and the documentation is here: wiki/CSC

Any feedback or updated performance data?

Does this work if you suspend-resume the PC? (see ticket:422#comment:18)


Wed, 12 Feb 2014 19:17:54 GMT - Smo: status changed; resolution set

Works good for me closing the ticket for now.


Fri, 18 Apr 2014 08:27:26 GMT - Antoine Martin:

This module never worked properly (I get far too much corruption and random junk) and has now been removed in r6114.

I should probably try to get some fame and post an exploit showing how to use CUDA to read the browser's currently rendered page data as pixels (works with google chrome!)


Fri, 18 Apr 2014 15:23:54 GMT - alas:

Is it feasible to wait until there's a contest, or something, with prizes to go with the posting? Might as well get a little fortune as well, no?


Fri, 18 Apr 2014 15:31:42 GMT - Antoine Martin:

Not a bad idea. Sadly, nvidia (see bug bounty program.

If I have time, I'll send a quick post to the new full disclosure list instead.


Sat, 23 Jan 2021 04:53:45 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/384