[Kstars-devel] Some very preliminary results with OpenCL

Henry de Valence hdevalence at hdevalence.ca
Tue Jul 16 07:23:31 UTC 2013


Hi all,

Yesterday I just got to the point where I could make some hacky comparison
between new code and old code. I made an array of a million points and
computed the precession, nutation, and equatorial-to-horizontal change
using on the one hand the old implementation from SkyPoint and on the other
an OpenCL kernel.

The result was 4282ms vs 39ms, which is a fairly dramatic improvement.
However it's very preliminary for the following reasons:

1. The OpenCL code is not optimised at all. Also none of the other code is
optimised. So this is a very misleading comparison from the start.

2. It does not compute aberration, and the aberration code is likely to be
relatively slower because the problem is not as easy to linearize. There is
a very elegant approach I read about that uses Möbius transformations to
carry out the computation without using trig functions, but I need to work
out some details before I can implement it. Once we add abberation and also
refraction the speed gain should drop somewhat.

3. The test is very synthetic since processing a million points is
basically the best case in terms of overhead, and in practice our gains
will depend on details about how much we can win by restructuring the
expensive skycomponents so they fit this computational model (which is the
second half of my project basically). In practice there will be more
overhead than this example.

So for these reasons one should not place much faith in this results, but I
thought I would share them anyways since they're quite hopeful. It seems
that there is a good chance that we will be able to do better on the
performance side.

Henry

P.S.
I wrote a blog post on some of my progress so far:

http://www.hdevalence.ca/blog/2013-07-09-kstars-gsoc-progress-update

but I remember now that I never sent it to the list. I am planning to write
another once I finish up the parts that I'm working on now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20130716/3ebd0369/attachment.html>


More information about the Kstars-devel mailing list