On Sun, Feb 13, 2011 at 8:54 PM, Brian Granger <[email protected]> wrote: > Andy, > > On Sun, Feb 13, 2011 at 11:34 AM, Andy Ray Terrel <[email protected]> > wrote: >> I'm collaborating with some people on generating kernels for opencl >> and nvidia. Probably the big issue is not getting code that runs but >> finding the right systems that run faster, most code will actually >> slow down on a gpu. If people are really interested in this I can >> start pulling things back into the sympy repo. >> >> I don't know which systems the quantum people are solving but my guess >> would be that it would be easier to grab some libraries that does >> dense linear algebra well rather than put a good generator in SymPy. >> If there was a description of the system that needs to be solved, I >> could spend some cycles helping people speed it up. > > > We have a number of different problems we are solving using the > quantum stuff. Here is an overview: > > 1. We have long sequences of extremely large, but extremely sparse > unitary matrices. We simply need to do sparse matrix-vector > multiplies, but many times. We have written specialized functions > that do this logic using sympy and we also have a scipy.sparse > version, but it is still slow. Our next step is to autogenerate the C > code. The sparse matrices are small enough that we will probably > hardcode their elements in the C code.
First thing I would say is that we should try out Nathan Bell's other code, CUSP [0], or Theano [1]. We've talked about interfacing to Theano in the past and it seems general enough to be interesting to most of sympy users. Now the size of these sparse matrices matter quite a bit but if you need greater than 75% peak of the machine, then I would be interested in pulling something into my research library [2] and making generating a fast sparse mat-vec. I am already looking into this with some people for stencil calculations. [0] http://code.google.com/p/cusp-library/ [1] http://deeplearning.net/software/theano/ [2] http://andy.terrel.us/ignition/ (Very sparse demos) > > 2. The next class is algorithms that use sympy's symbolic > manipulation capabilities. This will be extremely difficult to code > up using C as it uses *all* of sympys internal symbolic logic. This > will probably need specialized code in python/cython *or* simply > optimizing the critical paths in sympy. Yeah this step is wide open. Does the cython core (sympyx) help? > > 3. For time dependent problems we need matrix exponentials of both > sparse and dense matrices. Again, here, we can do this using > numpy/scipy.sparse, but lack a symbolic equivalent. Not much to say here. Trying cusp might help get gpu's running. But symbolic versions will probably never get really high performance. -- Andy > > But, overall, you are right that using numpy/scipy.sparse for most of > our heavy lifting is the way to go. Also, other users may have > completely different usage cases for the quantum stuff. > > Cheers, > > Brian > >> -- Andy >> >> On Sun, Feb 13, 2011 at 1:12 PM, Vinzent Steinberg >> <[email protected]> wrote: >>> On 12 Feb., 16:43, william ratcliff <[email protected]> >>> wrote: >>>> One of our thoughts was that we should autogenerate C code that could be >>>> run >>>> on a GPU....I hope to be able to be able to explore this later in the year. >>> >>> This should be quite possible with a modified C printer and pyopencl >>> [1]. >>> >>> Vinzent >>> >>> >>> [1] http://mathema.tician.de/software/pyopencl >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "sympy" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group at >>> http://groups.google.com/group/sympy?hl=en. >>> >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sympy" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/sympy?hl=en. >> >> > > > > -- > Brian E. Granger, Ph.D. > Assistant Professor of Physics > Cal Poly State University, San Luis Obispo > [email protected] > [email protected] > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/sympy?hl=en. > > -- Andy R. Terrel, Ph.D. Postdoctoral Fellow Texas Advanced Computing Center University of Texas at Austin [email protected] -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
