Theano lives on

I use PyTensor and am thankful for the work of the team. But I have also invested much time and effort in the Theano GPU backend “gpuarray” and have many custom functions written in raw CUDA that interface nicepy to Theano. Therefore, I have continued to maintain it, not professionally, but still is compatible with latest Numpy-1.26.4, and CUDA-12. I also have “Makefiles” that take my Theano code and modify it to be compatible with Pytensor, so I can use my code in either framework, although GPU works only with Theano. . If anyone is interested, I have located the Theano fixes at
GitHub - pbaggens1/theano_pmb: A version of Theano, that works with latest Numpy, Cuda, etc.
I’d welcome any comments or help.
Paul

Have you considered making it an extension of PyTensor?

I’d be open to that… I’m just not software professional, so might not be the right person to do that. But perhaps I can do it. What would I need to integrate it in? The problem I see, is that Theano_PMB, as I call it, is a variation of the last official Theano, and there might be too many differences with current Pytensor. I have, however, marked all the changes so they are easy to find. WHat do you think?

here are also corresponding changes to pycuda, pygpu, and scikit-cuda, all of which I have noted in the Github I mentioned.

I haven’t looked carefully, but the idea would be that someone can install pytensor and your package and use the two seamlessly. Users could combine GPU Ops from the gpu-package with Ops from the main package, or you may need rewrites to move things from CPU to GPU.

I don’t remember exactly how the GPU was controlled in Theano, so there may be some hard to work around incompatibilities. I don’t think this is a minor work though

I also don’t know how difficult it would be, but I think it would be very worthwhile. I remember seeing that the Theano “gpuarray” GPU interface was discontinued. Not sure how hard it would be to re-insert it.. I’d be glad to help, to the degree I can. As I said, all my changes have been marked with the letters “PMB”, and these should be looked at by someone with a deeper understanding of Theano, to see if these changes could be better or more consistently implemented. Let me know how I can help.

To be clear, the goal is not to reinsert in the codebase, but make it so it can be made to work together when users install an extra package on top of PyTensor. We are still not interested in supporting GPU directly due to little developer capacity

Oh, I see. Like adding the “gpuarray” GPU interface to Pytensor. Well, that’s over my head, but I’d be willing to help, if spearheaded by someone else. Keep me posted.

1 Like