Dnia 2012-09-28, pią o godzinie 12:44 +0300, Tomi Pieviläinen pisze: > On Thu, Sep 27, 2012 at 08:51:12PM +0200, Tomasz Rybak wrote: > > Dnia 2012-09-27, czw o godzinie 19:27 +0200, Tomasz Rybak pisze: > > > Dnia 2012-09-27, czw o godzinie 15:23 +0100, Freddie Witherden pisze: > > > > Hello, > > > > > > > > While attempting to compile PyCUDA under Python 3: > > > > > > > [ cut ] > > > > Also, are there any other potential issues with PyCUDA and Python 3.x > > > > that I should be aware of? > > > > > > > > > > I was able to build Debian package python3-pycuda. > > > Version from git compiles without any problems. > > > I have not uploaded it into Debian though, as there > > > are problems with compiling kernels under Python 3, > > > and I was not able to fix it yet. > > > > > > > When I try to run tests (e.g. python3 test_cumath.py) I get > > TypeError: Type str doesn't support the buffer API 20 times, > > That comes from different types: str in py2 is a bytestring, but in > py3k it's unicode string. In other words, pycuda hasn't been ported to > py3k.
Yeah, you are right - I totally forgot about this change to str in Python 2 -> Python 3 transition. I've looked more deeply into PyCUDA (and PyOpenCL for comparison) code and it seems that problem might lie with pytools. PyOpenCL just passes strings to OpenCL functions. PyCUDA needs to call nvcc and it uses pytools.preforrk.call_capture_output to do so. call_capture_output uses Popen.communicate() - which returns buffer, not string. Then PyCUDA tries to find some string in the output - and we have type mismatch between string and buffer. I am not sure whether pytools or PyCUDA needs fixing. Any thoughts, Andreas? Best regards/ -- Tomasz Rybak GPG/PGP key ID: 2AD5 9860 Fingerprint A481 824E 7DD3 9C0E C40A 488E C654 FB33 2AD5 9860 http://member.acm.org/~tomaszrybak
signature.asc
Description: This is a digitally signed message part
_______________________________________________ PyCUDA mailing list [email protected] http://lists.tiker.net/listinfo/pycuda
