maweigert / gputools

GPU accelerated image/volume processing in Python
BSD 3-Clause "New" or "Revised" License
108 stars 20 forks source link

Python 3 compatibility #3

Closed robintw closed 7 years ago

robintw commented 8 years ago

Note: This PR is not ready to be merged yet, it is just a way to start discussion...

I've managed to get parts of gputools working on Python 3 :-) Basically I've commented out all of the bits that use pyfft, and then dealt with various other Py2->Py3 stuff (eg. print needing brackets etc) and the convolution functions all seem to work.

I've had a bit of a look at the documentation for reikna (http://reikna.publicfields.net/en/latest/) and I can't really understand it. Do you think there is any easy way to replace pyfft with reikna? If so, then it would probably be reasonably easy to get the whole of gputools working on Python 3.

(If not, is it worth opening an issue saying that reikna is the suggested replacement for pyfft but it's not very easy to replicate the functionality?)

hadim commented 8 years ago

Python 3 compat would be nice ! Any news here ?

robintw commented 8 years ago

Unfortunately not, I haven't had much time to look at this - and I really struggled with getting the replacement for pyfft to work (and kinda got lost in the tangent of trying to make pyfft Python 3 compatible). If anyone else wants to take this over they'd be more than welcome!

hadim commented 8 years ago

pyfft seems to be deprecated in favor of this project : https://github.com/fjarri/reikna (compatible with Python 3)

maweigert commented 8 years ago

Sorry, forgot to give an update on this. Main reason for sticking to py2 is indeed the (deprecated) pyfft dependency - I wanted to replace pyfft with reikna for a long time already, but I always got a 2x3 performance drop for 2d/3d ffts (which I use mostly). I'll give a shot soon again, but until then, I'll have to stick to the current py2 dependency. I'll leave the issue open still. Anyhow, thanks for the efforts @robintw @hadim !

maweigert commented 7 years ago

As of version 0.2.2 gputools is now python2.7 and 3 compatible! :) Likewise, pyfft dependency was removed in favour of reikna (thanks @hadim!) Closing the PR therefore. Thanks @robintw for the nudge (took me some time time to act on it though :)