← Back to team overview

ffc team mailing list archive

Re: [HG FFC] Added code to output number of operations needed to compute the element tensor (for quadrature representation).

 

Quoting Anders Logg <logg@xxxxxxxxx>:

> On Sat, Sep 06, 2008 at 09:23:39PM +0100, Garth N. Wells wrote:
> > FFC wrote:
> > > One or more new changesets pushed to the primary ffc repository.
> > > A short summary of the last three changesets is included below.
> > > 
> > > changeset:   1191:4129f43a04429e70de6383212ace548ca0fb7872
> > > tag:         tip
> > > user:        "Kristian Oelgaard <k.b.oelgaard@xxxxxxxxxx>"
> > > date:        Sat Sep 06 21:31:23 2008 +0200
> > > files:      
> src/ffc/compiler/codegeneration/quadrature/quadraturegenerator.py
> > > description:
> > > Added code to output number of operations needed to compute the element
> tensor (for quadrature representation).
> > >
> > 
> > Is this the number of flops inside the tabulate_tensor function, or is 
> > it related to FFC operations?

It is a count of all '*' and '+' operations on the RHS of all terms inside the
IP loop. So it's an approximation of the number of flops needed to tabulate the
element tensor. Anything that goes on before this loop is not taken into
account, but for complex forms this is insignificant anyway.
 
> > Garth
> 
> This should be fairly easy to add for the tensor representation as
> well, at least the number of flops to do the tensor contraction, so
> we can use this to decide which representation to use.

But you want to decide this before generating the code? Or do you suggest
compiling the code with both strategies and see which one produces the 'optimal'
code?
 
> We may then set the default representation to "auto" which chooses
> the correct strategy.

For this you definitely want some a priori estimation of the operation count.

Kristian

> -- 
> Anders
> 
> 
> > > 
> > > changeset:   1190:92c2bd57a74ad1b9b37c94adcd48a0383ab92cfa
> > > user:        "Kristian Oelgaard <k.b.oelgaard@xxxxxxxxxx>"
> > > date:        Sat Sep 06 20:58:36 2008 +0200
> > > files:       AUTHORS ChangeLog README TODO
> > > description:
> > > Added UFC as dependency in README. Update ChangeLog and TODO (arguments
> language and representation added to options dictionary).
> > > 
> > > 
> > > changeset:   1189:5fb1e4531ebbd0a7a9b49163ef85c07a69f3f045
> > > user:        "Garth N. Wells <gnw20@xxxxxxxxx>"
> > > date:        Sat Sep 06 17:59:30 2008 +0100
> > > files:       TODO
> > > description:
> > > Update TODO list.
> > > 
> > > ----------------------------------------------------------------------
> > > For more details, visit http://www.fenics.org/hg/ffc
> > > _______________________________________________
> > > FFC-dev mailing list
> > > FFC-dev@xxxxxxxxxx
> > > http://www.fenics.org/mailman/listinfo/ffc-dev
> > 
> > _______________________________________________
> > FFC-dev mailing list
> > FFC-dev@xxxxxxxxxx
> > http://www.fenics.org/mailman/listinfo/ffc-dev
> 




Follow ups

References