For those interested in following along I'm working off of my blas branch. Here is a link to the comparison master->blas
https://github.com/mrocklin/sympy/compare/blas In particular I recommend looking at matrices/expressions/blas.py. This branch also includes my work on matrix assumptions (separate PR). The goal is to create Fortran code from MatrixExprs. The work left to do can be decomposed into the following tasks 1. Write a good Computation class (the current structure isn't yet ideal) 2. Write down enough of BLAS to get going (close!) 3. Write down rules that translate MatrixExprs into BLAS computations (this is easier if we have good pattern matching) 4. Write down strategies to handle non-confluent rules (there are lots of possible solutions) 5. Use f2py to reconnect the Fortran code to numpy interface 6. Compare SymPy MatExpr times to NumPy times. I expect we'll be able to generate code that is several times faster than NumPy while still maintaining a nice interface. On Thu, Oct 25, 2012 at 12:58 PM, Øyvind Jensen <jensen.oyv...@gmail.com>wrote: > > >> If you don't mind, maybe we should CC the mailing list? > > > > Go for it. I've been flooding the list recently which is why I didn't do > > this earlier. > > > > I've recently been working on a Theano-like graph for SymPy (a > Computation > > object). I'm may be reinventing something. I'm working off of this branch > > https://github.com/mrocklin/sympy/tree/blas . What is there now will > soon > > change however. I'm still trying to figure out the best way to do this. > > > > Question about codegen. I have to compose routines that have multiple > > out-params and inplace operations. Is SymPy codegen equipped to handle > this? > > Does it have tools to reason about these sorts of problems? Maybe this > will > > become clearer to me when I do the mat-vec multiply example. > > Multiple output has at least some support. In test_codegen.py you 'll > find test_multiple_results_f(). What kind of inplace operations are you > referring to? > > I took a quick glance at your blas branch. I think that your Computation > class is somewhat comparable with codegen.Routine, except that you are > doing it properly. The Routine class aims to describe how a given > mathematical expression can be programmed as a function or subroutine. But > with the Computation class, you aim to describe also the relationship > between several computations, isn't that right? It might be a good idea to > remove or at least shrink the Routine class in favor of your stuff. > > If you want codegen to support MatrixExpr objects, you would need to > implement them in the code printers, and I guess you will also need to hack > the constructor of Routine. > > > Cheers, > Øyvind > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/sympy/-/9PvoswQHp6kJ. > > To post to this group, send email to sympy@googlegroups.com. > To unsubscribe from this group, send email to > sympy+unsubscr...@googlegroups.com. > 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 sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.