Dear Bill,

Thanks for your detailed reply and all the useful references (I've
started going through them and the first one looks quite interesting).

My needs are actually quite humble.  The amount of data I need to load
is not offensive and I think my computation is very CPU bound (involving
several large nested for loops).  I think its a problem which is
naturally suited to a GPU.  I should emphasize I don't need a given
large-integer computation to be spread across multiple threads.  The
integers I use won't be very big, just too big to fit in a 32/64 bit
word.  So I don't want to make the large-int functions multi-threaded,
but just to run them many times on different GPU threads.  Do you still
think the GPU will not give me a speed benefit?

Since it looks like GMP/MPIR will be hard to use I'm looking at a more
basic implementation:

http://en.literateprograms.org/Arbitrary-precision_integer_arithmetic_%28C%29

which I can just include in my multithreaded code.  No doubt this is
slower than GMP/MPIR but hopefully not so much so that it negates the
benefits of multi-threading.

I will first benchmark the above against GMP and see how much slower it
is before trying to implement a GPU-ed version of this but would still
appreciate anyone's thoughts or suggestions.

thank you



On 09/07/2011 11:38 PM, Bill Hart wrote:
> Hi Prefer,
>
> We have to moderate all accounts on the mpir list too. However now
> that you have your first post you shouldn't need to wait for
> moderation any more.
>
> There are various people who are trying things (mostly not associated
> with MPIR I believe):
>
> http://www.bealto.com/gpu-benchmarks_intro.html
> http://individual.utoronto.ca/haojunliu/courses/ECE1724_Report.pdf
> http://domino.mpi-inf.mpg.de/intranet/ag1/ag1publ.nsf/0/ca00677497561c7ec125763c0044a41a/$FILE/gpgpu_mul.pdf
> http://www.comp.hkbu.edu.hk/~pgday/2009/10th_papers/kzhao.pdf
> http://hal-lirmm.ccsd.cnrs.fr/docs/00/43/06/89/PDF/article-parco09.pdf
>
> Plus many more, some of which I've seen and others I have not.
>
> The issue for me with GPU's is still getting the data in and out of
> them. This is no problem for matrices but a bottleneck for
> polynomials.
>
> Regarding just compiling for the GPU, well it's not so simple. Firstly
> you'd have to do a generic C build because the assembly language
> support is not there. Secondly the uild system in MPIR is not trivial.
> With a few weeks work you might get something going. That's my
> opinion.
>
> I think the result would be very slow though.
>
> Bill.
>
> On 7 September 2011 13:14, Prefer Anon <[email protected]> wrote:
>> I'd like ask about the status of Cuda/OpenCL and MPIR.  Googling a bit
>> it seems the last discussion was some time ago.  I am trying to
>> improve the speed of some code by moving it to the GPU but the problem
>> is that it currently uses the mpz functions in GMP which are compiled
>> for standard processors.  I am trying to figure out the easiest way to
>> get large-integer support for some simple computations I need to do on
>> a GPU.  I guess this is not yet supported by MPIR but I was wondering
>> how difficult it would be to just extract the relevant functions
>> (mpz_*) and compile them using the GPU compiler (i.e. just include
>> them in my code by hand with some modifications so that e.g. nvcc
>> picks them up).  Or is there a more clever way to do this?
>>
>> To be clear I don't really need the mpz functions themselves to be
>> parallelized on multiple GPU threads...I just want the existing
>> functions to be compiled by the GPU compiler.  This would seem like a
>> much more constrained task so I'm wondering if anyone has already done
>> this.  I might try it for the functions I want but I'm worried that
>> extracting all the dependencies will be a fair amount of work.
>>
>> thanks!
>>
>> btw I tried posting a similar question on the GMP list but it awaits
>> moderation.
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "mpir-devel" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to 
>> [email protected].
>> For more options, visit this group at 
>> http://groups.google.com/group/mpir-devel?hl=en.
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en.

Reply via email to