On Sunday, November 20, 2016 at 2:21:27 PM UTC, René Mérou wrote: > > Hello > > I'm interested in using the GPUs to enhance my computational power > implementing mathematical algorithms. I prefer free software and open > standards, of course, and that's why I selected OpenCL and SageMath. > > https://en.wikipedia.org/wiki/OpenCL > > I have been looking for some examples of Sage code using OpenCL but I > can't > find any. > > The only path I see for the moment is to use python in a sage program > calling > the PyOpenCL. https://mathema.tician.de/software/pyopencl/ > <https://www.google.com/url?q=https%3A%2F%2Fmathema.tician.de%2Fsoftware%2Fpyopencl%2F&sa=D&sntz=1&usg=AFQjCNFJCWGr58YK0XdNs-UYyQIWBP60hQ> > > I did not test it yet. I prefer to find a direct sage functionality but I > am > starting to doubt their existence. >
pyopenCL looks like a reasonable choice if you need to use openCL from Sage. There are also Cython extension proposals (a.k.a. CEPs) to support openCL, but I'd be surprised if anything stable in that direction exists. > > I write you for helping to find *examples of code* or at least *any guide* > on how > to use OpenCL with Sage or any other possibly better ideas. > > Assuming openCL is installed, installing pyopencl into Sage's python should be easy, although I don't have a machine with openCL installed to try it. Basically, one should start "sage's shell", sage -sh, which is basically bash with properly set environment variables, and do pyopenCL's python configure.py followed by make install pyopenCL requirements like numpy would already be satisfied (numpy is standard in sage) Then you should be able to run pyopnCL examples from Sage (fingers crossed, naturally) There could potentially be some name clashes (e.g. sage has 'matrix()' in its global namespace), but it should not be too problematic I think... HTH Dima > Sincerely > Jean-René Mérou > > PS.: I use debian GNU/Linux. > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
