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.
