Skip to content

ingonyama-zk/ingo-gpu-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ingo GPU challenge

Integer arithmetic is the backbone of cryptographic algorithms. However, the typical widths of numbers that provide acceptable security are not directly supported by standard hardware such as CPUs and GPUs. Therefore, we need to represent our integers as arrays of multiple "limbs", either 32 or 64 bits in size.

The challenge

Design a kernel that multiplies pairs of 256-bit numbers, getting 512-bit results. The goal is to maximize the throughput of the mutliplier.

Testing suite

To benchmark and test the code, we use a Rust wrapper. For Rust installation, see this link.

Once Rust is installed, the correctness of the code can be verified by running:

cargo test

And the performance can be measured by running:

cargo bench

There is baseline code that implements section 4 of this paper in cuda/mult.cu file. It is expected that only this file will be edited, the rest of the repo is meant to provide the infrastructure for easy testing and benchmarking.

You can parallelize the multiplier, or do the opposite - the only optimization goal is throughput. You can also change between 32-bit and 64-bit limbs, try using floating point arithmetic etc.

Any machine can be used, the only limitation is using a single GPU for measurements.

If there are any questions, you can file an issue in this repository.

Good luck and have fun!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published