filecoin-project / ec-gpu Goto Github PK
View Code? Open in Web Editor NEWOpenCL code generator for finite-field arithmetic over arbitrary prime fields
License: Other
OpenCL code generator for finite-field arithmetic over arbitrary prime fields
License: Other
Currently there is support for 64-bit limbs on NVidia devices. Though it seems that it doesn't improve the performance significantly. Hence remove support for it and only support 32-bit limbs.
Given a "G1_affine" type point G (x, y), then - G should be (x, Fq_P - y). A "G1_projective" point is marked as P, so G1_ sub_ mixed(P,G) = G1_ add_ mixed(P,-G)。 I want to know what is wrong with this understanding? Or can you provide some help for the calculation of "G1_sub_mixed"?
I am doing a state-of-the-art of the existing libraries on GPU, and I stumbled upon your project.
What exactly finite fields are supported ? Only fields of characteristic 2 ?
Extension or only prime fields ?
Single or multi-word fields ?
Are there optimisations for some of them.
In the FFT, the parameter is often a power of two. Do you only tackle these ?
The description looks very vague to me.e
Do you have benchmark plots with comparison NVIDIA vs AMD ?
https://docs.rs/crate/ec-gpu-gen/0.2.1/builds/531107
I have nix-based fix which adds the cudatoolkit
dependency to fix this: https://github.com/lurk-lang/ec-gpu/blob/df6de7cd06e37ce3ba8d311e5d6c073a6e87b15a/flake.nix#L51, but presumably there's a non-nix way to get the docs.rs CI to include this.
I want some papers or blogs about the principles of "FFT" which used in "/ec-gpu/ec-gpu-gen/src/fft_cpu.rs/parallel_fft()".
Hi!
I'm trying to use generated GPU code for bls12_377
and stumbled accross the function Fq_mul_nvidia
, it doesn't work for me (ofc I have Nvidia gpu) while Fq_mul_default
works fine. Are there any possible pitfalls of this function? The bls12_377
has 377-bit module len, could it be a crux of the problem? Or does it depends on a type of a limb? I'm using Limb64
since code I'm trying to optimize uses 64-bit limbs.
in the code for "cuda", I noticed that you used an optimization in the "POINT_multiexp" KERNEL as shown below
// O_o, weird optimization, having a single special case makes it
// tremendously faster!
// 511 is chosen because it's half of the maximum bucket len, but
// any other number works... Bigger indices seems to be better...
if(ind == 511) buckets[510] = G1_add_mixed(buckets[510], bases[i]);
else if(ind--) buckets[ind] = G1_add_mixed(buckets[ind], bases[i]);
but when I remove the else branch, it becomes as shown below,
if(ind--) buckets[ind] = G1_add_mixed(buckets[ind], bases[i]);
After testing on "RTX 3060", when the input scale is "2 ^ 21" and the input point is "G2Affine",Your optimization has obvious effect. When the input scale is "2 ^ 21" and the input point is of "G1Affine" type ,Your optimization has no effect, but will lead to long execution time.
Could you tell us in detail the role of optimization here?
I want to transform the result of the function "multiexp" in gpu from the form of "::Curve" to "&[u8]".I want to use function "to_uncompressed" and "from_uncompressed".But these methods are in "G1Projective" and I can not use them in a "::Curve" .
Please help me with this!
Hi, I'm trying to run the tests on my GPU. Wanted to know if it can run on GTX Titan X (Maxwell, 2015). When I run cargo test
I get the following output
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.