Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bigint in OpenCL and Python

I am trying to implement RSA in Python but I want to run the intensive calculations on the GPU. I have successfully implemented my own modulo expoentiation running in PyOpenCL, but I max out on six digit integers for both the base and exponent. Larger numbers than that and the GPU crashes.

I need to create an array of very large integer values in numpy and send them along to the PyOpenCL code, and do both multiplication and modulo operations with the large integers on the GPU.

Has anyone done anything similar before? Googling cuda and bigint doesn't give any good results. :(

like image 328
Christoffer Reijer Avatar asked Oct 21 '22 11:10

Christoffer Reijer


1 Answers

BigInt as arbitrary precision int (see: http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic)?

If that is the case, you need an arbitrary precision library for Opencl/Cuda.

Quick googling shows for example: http://www.hpcs.cs.tsukuba.ac.jp/~nakayama/cump/

like image 52
sanyi Avatar answered Oct 24 '22 09:10

sanyi