diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 00000000..b5f85119 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,8 @@ +cff-version: 1.2.0 +message: "If you use this software, please cite it as below." +authors: +- family-names: "Ingonyama" +title: "Icicle: GPU Library for ZK Acceleration" +version: 0.1.0 +date-released: 2023-03-08 +url: "https://github.com/ingonyama-zk/icicle" diff --git a/README.md b/README.md index 394cf6dc..0ade6aa0 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,13 @@ ICICLE is a CUDA implementation of general functions widely used in ZKP. ICICLE ## Build and usage -> NOTE: [NVCC] is a prerequisite for building. + +### Prerequisites + +- [NVCC] +- cmake 3.18 and above + +### Steps 1. Define or select a curve for your application; we've provided a [template][CRV_TEMPLATE] for defining a curve 2. Include the curve in [`curve_config.cuh`][CRV_CONFIG] @@ -59,6 +65,8 @@ cmake --build build cd build && ctest ``` +NOTE: If you are using cmake versions < 3.24 add `-DCUDA_ARCH=` to the command `cmake -S . -B build` + ### Rust Bindings For convenience, we also provide rust bindings to the ICICLE library for the following primitives: @@ -188,8 +196,8 @@ See [LICENSE-MIT][LMIT] for details. [BLS12-377]: ./icicle/curves/bls12_377/supported_operations.cu [BN254]: ./icicle/curves/bn254/supported_operations.cu [NVCC]: https://docs.nvidia.com/cuda/#installation-guides -[CRV_TEMPLATE]: ./icicle/curves/curve_template.cuh -[CRV_CONFIG]: ./icicle/curves/curve_config.cuh +[CRV_TEMPLATE]: ./icicle/curves/curve_template/ +[CRV_CONFIG]: ./icicle/curves/index.cu [B_SCRIPT]: ./build.rs [FDI]: https://github.com/ingonyama-zk/fast-danksharding [LMIT]: ./LICENSE diff --git a/icicle/CMakeLists.txt b/icicle/CMakeLists.txt index b4c3f345..95c5b874 100644 --- a/icicle/CMakeLists.txt +++ b/icicle/CMakeLists.txt @@ -7,7 +7,9 @@ set(CMAKE_CUDA_STANDARD_REQUIRED TRUE) set(CMAKE_CXX_STANDARD_REQUIRED TRUE) # add the target cuda architectures # each additional architecture increases the compilation time and output file size -if (NOT DEFINED CMAKE_CUDA_ARCHITECTURES) +if (${CMAKE_VERSION} VERSION_LESS "3.24.0") + set(CMAKE_CUDA_ARCHITECTURES ${CUDA_ARCH}) +else() set(CMAKE_CUDA_ARCHITECTURES native) # on 3.24+, on earlier it is ignored, and the target is not passed endif () project(icicle LANGUAGES CUDA CXX) diff --git a/icicle/curves/bls12_381/params.cuh b/icicle/curves/bls12_381/params.cuh index d1da2931..98a8a04a 100644 --- a/icicle/curves/bls12_381/params.cuh +++ b/icicle/curves/bls12_381/params.cuh @@ -408,4 +408,4 @@ namespace PARAMS_BLS12_381 { static constexpr storage weierstrass_b_g2_im = { 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}; -} // namespace PARAMS_BLS12_381 \ No newline at end of file +} // namespace PARAMS_BLS12_381