CUDA, OPENCL AND GMP. TOWARDS A HYBRID GMP?
Allan Menezes
amenezes007 at sympatico.ca
Thu Apr 25 20:45:39 CEST 2013
Dear Tobjorn, Todd,
I had brought this question up long before of using specifcally CUDA and NVIDIA GPUs
to accelerate some GMP functions. To compromise one can create a hybrid gmp library where some
gmp functions are executed on the host machines CPU and some on the GPU and some perhaps a
combination of both. For example there exists a GMP port of some mpf fumctions in CUMP (google
cump and cuda) . But my much earlier suggestion was using par4all software (google par4all)
to change carefully the generic subdirectory of C routines in the gmp library by the pat4all software
into CUDA routines which can be compiled with nvcc. Par4all takes as input a C program and outputs
a paralellized .cu file. On the other hand for AMD Graphic Cards or NVIDIA with OpenCl one could use
SnuCl( google snucl opencl).
Par4all would only compile source C files into .cu which would could still be under the Creative Commons
Licensing paradigm and the end user with a suitable configure could compile the the hybrid GMP library
on his/her/other machine using ones on install CUDA software. Hence the branch Hybrid GMP library source as distributed
would be suitably open source.
Notably a good high end GPU would be the Geforce TITAN for about $1000CDN which boasts a double precision
peak of 1.3 Teraflops and $.5 Teraflops single precision to test it on.
Allan
More information about the gmp-discuss
mailing list