Thanks Fred. That gives me a sense of scale. The longer expressions I've
encountered so far in our work far have 1000 to 5000 common subexpressions
(although it wouldn't be hard to create problems that have hundreds of
thousands of cses). So this isn't at the scale your are talking about for
vector addition, so maybe I wouldn't have any gain. If I could speed up the
execution in the 1.5x-5x realm, that would be a big help. These expression
evaluations are required for simulating the multibody systems and the
simulation time is the bottle neck in my data processing routine. We'd like
to be able to simulate our systems at 10-50x real time speed so that we can
get results back in hours as opposed to days. I've found some papers with
the google search "parallel evaluation of mathematical expressions" and
have gotten some hits.


Jason
moorepants.info
+01 530-601-9791


On Sun, Mar 16, 2014 at 9:48 PM, Frédéric Bastien <[email protected]> wrote:

> Someone contributed recently modificatin that allow Theano elemwise to
> run in parallel on the CPU. We found that it is useless or harmful to
> run in parallel for the addition of 2 vectors if their is less then
> 200k elements in the vectors. This is just to show how big is the cost
> to start/stop threads via openmp.
>
> So if you don't have more computation then that in your graph, maybe
> it won't be possible to have speed gain with g++ openmp
> implementation.
>
> If you have enough work, openmp can parallelize tasks. So you can just
> fill a list or task ready to run and the openmp back-end will run it.
> each task could just add more tasks to that list when it finished.
>
> Fred
>
> On Sun, Mar 16, 2014 at 9:30 PM, Jason Moore <[email protected]> wrote:
> > In the mechanics package we generate very long mathematical expressions
> > which we then want to evaluate numerically as fast as possible. To do
> this,
> > we generate code in a low level language and typically use common
> > subexpression elimination as a pre-compile optimization step*. I'm
> wondering
> > if there are possibilities of parallelizing the evaluation of the these
> > cse'd expressions. It seems that if the cse dependency graph was formed
> that
> > you may be able to see groups of cses that could be executed in
> parallel. I
> > haven't found anything online yet that shows anyone doing this or even
> > attempting it. Either I don't have the right search terms, nobody's done
> it,
> > or it isn't possible to get much (or any) gain for general expressions.
> Does
> > anyone know if this is possible and, if so, is there a standard way to
> build
> > the dependency graph?
> >
> > * this may not gain us much, as good compilers probably do this for us,
> but
> > it does have gains for higher level interpreted languages
> >
> > Jason
> > moorepants.info
> > +01 530-601-9791
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "sympy" 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 http://groups.google.com/group/sympy.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/sympy/CAP7f1AhANchPrPu2gAFzbYNZuUsregFEtbgZpppbNH6fpbhC2A%40mail.gmail.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" 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 http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/CADKKbthPPTo8pqBsekBrbO_ngYqdTvpLNJv1dmCjBPEsGw4qEA%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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 http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAP7f1Aj1t2z4%2Bm1ASsBitY4JzAewnzTCR0o310iyzimQRfTW2w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to