Re: [eigen] Back from google

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


2009/11/4 Rohit Garg <rpg.314@xxxxxxxxx>:
> On Wed, Nov 4, 2009 at 2:38 PM, Keir Mierle <mierle@xxxxxxxxx> wrote:
>
>> I don't know the details, but I believe the cache is yours until the next
>> context switch.
>
> Only for single threaded apps. For multi-threaded apps, if the no. of
> active threads matches the number of hw threads, then it is ok,
> otherwise it'll naturally trash cache.

Pardon my ignorance, but by hw threads you mean the number of CPU cores?

It is true that each CPU core typically has a small amount of cache
exclusively for itself, but in most CPUs, the bigger part of the cache
memory is shared among CPU cores.

For example, on my core i7-720QM, I have 4 cores, each of them has 256
KiB of L2 cache which is very little, and then there is 6 MiB of
shared L3 cache.

So far we are typically doing only 1 level of blocking in the algos,
so we consider only that shared L3 cache. Not sure but i seem to
remember that Gael's matrix product actually does 2 levels of blocking
and the smaller one may actually fit in my L2 caches, but that's so
far only an accident: Eigen doesnt currently try to be so clever about
caches.

To make things worse, HT makes it appear like 8 cores (8 hardware
threads) but i dont think there is 8 separate caches, so actually the
number of hardware threads doesn't seem to be the relevant metric
here, rather the number of cpu cores, right?

Benoit

>>
>>>
>>> > It's extra maintenance, but
>>> > going forward it may be required if we wish Eigen to get used in
>>> > prebuilt
>>> > software. For example, consider packages depending on Eigen compiled for
>>> > debian, or libmv when eventually bundled with blender.
>>>
>>> I do understand that the current solution of having the cache size
>>> known at build time, is not satisfactory :)
>>>
>>> > There was another item brought up by a Googler, who couldn't make lunch,
>>> > which was that there aren't any benchmarks on the wiki comparing sparse
>>> > performance. It would be nice if the benchmark suite included
>>> > comparisons
>>> > against, e.g. gmm++ and ublas. I realize most of the solvers are
>>> > implemented
>>> > by other backends, but things like sparse matrix multiplication is still
>>> > done natively.
>>>
>>> ---> that would be nice indeed! And an accessible "junior job" for
>>> someone wanting to contribute! The next question is if that can be
>>> done in BTL, that i dont know.
>>>
>>> > Thanks for joining us for lunch!
>>>
>>> Thanks a ton for the invitation!
>>> Everyone: Google offices are up to their reputation, the place is a
>>> sort of hacker paradise with palm trees, free food, and technical chat
>>> all over the place, from what i could see.
>>>
>>> Benoit
>>>
>>> > Keir
>>> >>
>>> >>
>>> >> Benoit
>>> >>
>>> >>
>>> >
>>> >
>>>
>>>
>>
>>
>
>
>
> --
> Rohit Garg
>
> http://rpg-314.blogspot.com/
>
> Senior Undergraduate
> Department of Physics
> Indian Institute of Technology
> Bombay
>
>
>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/