Re: [eigen] Eigen AVX support - first steps |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [eigen] Eigen AVX support - first steps
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Mon, 15 Apr 2013 17:06:59 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=DmuaNsA1Cf0Z8xVJ5yWqd2J5XXnufCMaBsTbPRG4PLk=; b=b2cDw0oNAbC5rAD/b6F1Z2Y0VGsxPlGFIJKQ5QVtQoPv7zVdMXZPtto/vmBJexYHxB VpK7oVNWM/IjYm9Sm9tjhfHCnrccJQZXq6z+dsalGp92OVM23wtXcz7ZgX6Q6fycHrtC zyLm5QZcZVeaVNv7Vg+k3qge2IwJ8P0+8V5UDuaqATYYaoNeLLtaIapfjwLZyju8LMmm HqE7jc1fB6td59ZV19PGsil56zPWRBvrDFlWNHsMds9+1kq5PtSt91Q+/PER43AKxAvI UNr6SmqHgvNwAaBiofY3a6dNVLtZJmeIG9+c5emd2e1hbHExC5TA5tmb2x53ggH9vpff o1iA==
Hi Rohit,
thank you for the hard work.
On Sun, Apr 14, 2013 at 6:47 AM, Rohit Garg <rpg.314@xxxxxxxxx> wrote:
> I have pushed some code to the eigen-avx repository at bitbucket.
>
> a) All the additions reside in the AVX folder, along with altivec, neon and
> SSE. I have split up the single and double precision code into two files as
> one file was getting too big.
I'm not sure decoupling float and double really helps readability
since in 99% of the cases they should be extremely similar, but ok.
> b) The integer code has been removed as AVX does not have int support. Once
> real numbers are done, we can move on to complex number support.
indeed, that's for AVX2 that should be available in coming soon CPUs.
> c) I had a few questions about some of the intrinsic functions, I have
> written them in the questions.txt file. in the AVX folder.
I'll answer them in a second email.
> d) So far, I have just migrated the intrinsic functions from SSE over to
> AVX. All my changes are so far limited to the AVX folder in the arch folder.
> I have not run any tests and this code is not hooked up to the rest of the
> eigen code base as yet. The reduction functions have been tested separately,
> so they should be fine.
Look at the Eigen/Core header file. Before testing for SSE, if __AVX__
is defined then we should define a EIGEN_VECTORIZE_AVX token that will
be used later to include your files instead of the ones in SSE. Then,
in CMakeLists.txt, you can add an option to enable AVX in unit tests,
and start with the packet_math unit tests.
I guess we well also have to move the alignement requirement to the
packet_traits instead of the somewhat hardcoded 16 bytes. For initial
testing though, you can make sure that pload and pstore also work on
16bytes aligned data.
> e) I have made no attempt for micro-optimization so far. Once this works we
> can move to optimization.
sure!
gael
> f) Code review welcome. :)
>
> Cheers,
>
> --
> Rohit Garg
>
> http://rpg-314.blogspot.com/
>
> Graduate Student
> Applied and Engineering Physics
> Cornell University