Re: [eigen] Back from google |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Back from google
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 4 Nov 2009 03:19:37 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=295xu8rbLEYhcm986tPy9WljMPy1PjvZQPcoj/2Wp2I=; b=HQUtfTjdObZvMNrQyqYKhpqRVvJibcA3Xhd4CsxsomOZpmr0/QpVIsfCWzX8cd0VEl OgPDkmy3S9TNm46U4vNC+g84fBxi57KZy3oZJ9CIawiN3h86Nuy/eW4M9YCrQr/9fgkA Vjo4UAPbUHceJM5fMvsMY3/JHCOiJ96sz6P8o=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=DQwzHy6ksev3R2sTGwcj5/M78Ly7ie+fmb+FANmJlrA5N2FSbR3Ix50oBZuUm0uNST 5goLCyiiQw5RWcq/GCAmh6KdXLz4DWfozM8xwrwz6uFatwQVr2jKtPeFHyC7RgGx4kBj /QB3vpeNDu+ZaF9aP24GA5QCjbEXtg3U2PaEs=
2009/11/4 Keir Mierle <mierle@xxxxxxxxx>:
>> * Just use sqrt() ? The questions are: are we OK to always pay for a
>> sqrt here? This seems like unneeded extra performance degradation for
>> small dyn-size matrices (of course it's negligible for large
>> matrices). In the default case of a compile-time constant, GCC >= 4.3
>> is able to compute the sqrt at compile-time, but i wonder about MSVC
>> and ICC.
>
> If the variable is encapsulated in a binary library, then the square root
> can also be stored in a variable so that it is only recomputed if the size
> changes; for example:
> void Eigen::SetCacheBlockSize(int new_size) {
> ei_cache_block_size = new_size;
> ei_sqrt_cache_block_size = sqrt(new_size)
> }
>>
>> * Introduce a separate preprocessor #define to let the user specify a
>> runtime cache size variable name?
>>
>> Or going farther into the direction of binary libraries:
>>
>> * Introduce a preprocessor symbol to define some global variables,
>> e.g. one for the cpu cache size? We'd need to tell the user that if he
>> wants to use the corresponding feature, then one of his source file
>> must define that macro before #including Eigen.
>>
>> There is of course always the option of creating an optional tiny
>> binary lib, but i still don't see a compelling reason to do that...
>
> I don't think a small binary library is crazy, provided it is optional and
> disabled by default.
"optional and disabled by default" works well indeed to address needs
of a company like Google where someone will take care of enabling that
feature. But it doesn't work so well with linux distros who will want
to stick to the default configuration, or will somehow pressure us to
make that the default as soon as some package requires eigen to be
configured with this option.
So i'm not ruling out a binary library, but i wanted to mention the downsides.
> This would also open the door to us determining cache
> sizes at startup, so the user doesn't have to.
Correct me if i'm wrong, as i'm really not an expert, but i thought
that knowing the CPU cache size only was enough information if we can
count on having all the CPU cache for ourselves in 1 single thread,
right? In general, it seemed to me that only the user could tell how
much cpu cache we could count on using. So, how is it useful to
determine the cpu cache size automatically?
> 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
>>
>>
>
>