GMP+MPFR to GPU?

Torbjorn Granlund tg at gmplib.org
Tue Dec 7 23:36:08 CET 2010


Paul.Zimmermann at loria.fr writes:

  concerning the recent thread about GMP+MPFR on GPU, I recommend looking at the
  slides of a talk given by Marcelo Kaihara (EPFL) at our seminar:
  http://caramel.loria.fr/sem-slides/201011041030.pdf
  
  Slide 30 gives a comparison between GMP and current GPUs, and shows that GMP is
  still very competitive.
  
Alas, the comparison presents strangely low GMP scores.  When I time it
now, I get 4900 ops/s while the slides say the very exact number 2738.9.
(I scale my number down from a faster system.)  Can OpenSSL possibly add
that much overhead?  I very much doubt it.  I suspect the guy is using a
quite obsolete GMP release, or a misconfigured GMP.

To make a fair comparison this needs to be done:

1. Use high-end hardware in both cases (i.e., a 3.5 GHz AMD processor)

2. Compare both routines in a raw way, not your own routines in a raw
   way and GMP wrapped inside a slow library

3. Use the latest version of both packages

Even with the presented numbers, I am not so sure about the conclusions.
I'd say GPUs are still lame for most bignum calculations, even if
ever-so-advanced lazy carry schemes are implemented.

(I did some research in the area for Cray about 1 years ago, and
explored many of the tricks suggested in the slides.  Some if it is in
GMP's mpn/cray/ieee directory since then.  The mul_basecase code therein
avoids almost all inter-dependencies.)

-- 
Torbjörn


More information about the gmp-devel mailing list