Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

groth16-gpu #263

Merged
merged 9 commits into from
Jun 30, 2024
Merged

groth16-gpu #263

merged 9 commits into from
Jun 30, 2024

Conversation

ibmp33
Copy link
Contributor

@ibmp33 ibmp33 commented Jun 26, 2024

fix #129

// #[cfg(any(feature = "cuda", feature = "opencl"))]
// pub use gpu_specific::*;

// #[cfg(not(any(feature = "cuda", feature = "opencl")))]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the franklin_crypto project still being used in the non_gpu scenario?

#franklin-crypto = { path = "../../franklin-crypto", features = [ "plonk" ], version = "0.0.5"}

# Add cuda and opencl dependencies directly
ff = { version = "0.13.0", features = ["derive"], optional = true }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to use [target.'cfg(any(feature = "cuda", feature = "opencl"))'.dependencies] but cannot load crates.

@@ -46,7 +46,7 @@ ark-std = { version = "0.4.0", optional = true }
env_logger = "0.10"

[features]
default = ["bellman_vk_codegen/multicore", "franklin-crypto/multicore", "ethabi", "recursive_aggregation_circuit/multicore"]
default = ["bellman_vk_codegen/multicore", "franklin-crypto/multicore", "ethabi", "recursive_aggregation_circuit/multicore", "algebraic/default"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cargo build --release --features "opencl plonky/default recursion/default" # This command cannot include the default algebraic feature

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--features "A feature" --features "B features" ...

pairing = { version = "0.23.0", optional = true }
group = { version = "0.13.0", optional = true }
blstrs = { version = "0.7.0", features = ["__private_bench"], optional = true }
bellperson = { version = "0.25", default-features = false, optional = true }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use frankin-crypto by default.

}
Ok(custom_gates)
}

fn read_custom_gates_uses_list<R: Read>(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we miss a feature config here?

pairing = { version = "0.23.0", optional = true }
group = { version = "0.13.0", optional = true }
blstrs = { version = "0.7.0", features = ["__private_bench"], optional = true }
bellperson = { version = "0.26", default-features = false, features = ["groth16"], optional = true }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we group up the gpu dependencies from the cpu dependencies?

@@ -0,0 +1,2 @@
{"a": 3, "b": 11}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we hardcode those files in the source code accordingly to reduce the file scale? same for the algebraic project

}

component main = Multiplier();

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any way to reuse the circom and wasm files for both cpu and gpu algebraic?

@@ -0,0 +1,414 @@
// some codes borrowed from https://github.com/poma/zkutil/blob/master/src/r1cs_reader.rs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this file? since we have one in the algebraic-gpu

@eigmax eigmax merged commit 57e81bb into main Jun 30, 2024
5 checks passed
@eigmax eigmax deleted the groth16-gpu branch June 30, 2024 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GPU frankin crypto
2 participants