You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/docs/icicle/arch_overview.md
-3
Original file line number
Diff line number
Diff line change
@@ -21,12 +21,9 @@ ICICLE is designed to be extensible, allowing developers to integrate new backen
21
21
-**Custom Backends:** Developers can create their own backends to leverage different hardware or optimize for specific use cases. The process of building and integrating a custom backend is documented in the [Build Your Own Backend](./build_your_own_backend.md) section.
22
22
-**Pluggable Components:** ICICLE's architecture allows for easy integration of additional cryptographic primitives or enhancements, ensuring that the framework can evolve with the latest advancements in cryptography and hardware acceleration.
23
23
24
-
TODO ADD diagram
25
-
26
24
## Multi-Device Support
27
25
28
26
-**Scalability:** ICICLE supports multi-device configurations, enabling the distribution of workloads across multiple GPUs or other hardware accelerators. This feature allows for scaling ZK proofs and other cryptographic operations across larger data centers or high-performance computing environments.
29
-
-**Device Management:** The architecture includes tools for managing multiple devices, ensuring that resources are efficiently utilized and that workloads are balanced across available hardware.
To install the libs, specify the install prefix in the [cmake command](./getting_started.md#build-commands)
46
-
`-DCMAKE_INSTALL_PREFIX=/install/dir/`. Default install path is `/usr/local` if not specified.
45
+
`-DCMAKE_INSTALL_PREFIX=/install/dir/`. Default install path on linux is `/usr/local` if not specified. For other systems it may differ. The cmake command will print it to the log
-`-DBUILD_TESTS=ON/OFF`: Enable or disable tests. `default=OFF`.
82
+
-`-DBUILD_BENCHMARKS=ON/OFF`: Enable or disable benchmarks. `default=OFF`.
83
83
84
84
### Rust: Build, Test, and Install
85
85
@@ -91,22 +91,28 @@ To build and test ICICLE in Rust, follow these steps:
91
91
```
92
92
93
93
2.**Build the Rust project:**
94
-
```bash
95
-
TODO what about features? Now it doesn't make sense to disable features.
94
+
TODO what about features? Now it doesn't make sense to disable features.
95
+
```bash
96
96
cargo build --release
97
97
```
98
98
99
-
3. **Run tests:**
99
+
4.**Run tests:**
100
100
```bash
101
101
cargo test
102
102
```
103
+
:::note
104
+
Most tests assume a CUDA backend is installed and fail otherwise.
105
+
:::
103
106
104
-
4. **Install the library:**: The libraries are installed to the `target/<buildmode>/deps/icicle` dir by default. For custom install dir. define the env variable `export ICICLE_INSTALL_DIR=/path/to/install/dir` before building or via cargo:
107
+
5.**Install the library:**
108
+
109
+
By default, the libraries are installed to the `target/<buildmode>/deps/icicle` dir. For custom install dir. define the env variable:
105
110
```bash
106
-
TODO support cargo install
107
-
cargo install --path /path/to/install/dir
111
+
export ICICLE_INSTALL_DIR=/path/to/install/dir
108
112
```
109
113
114
+
(TODO: cargo install ?)
115
+
110
116
#### Use as cargo dependency
111
117
112
118
In cargo.toml, specify the ICICLE libs to use:
@@ -116,15 +122,16 @@ In cargo.toml, specify the ICICLE libs to use:
# add other ICICLE crates here if need additional fields/curves
119
126
```
120
127
121
128
:::note
122
129
Can specify `branch = <branch-name>` or `tag = <tag-name>` or `rev = <commit-id>`.
123
130
:::
124
131
125
-
The libs will be built and installed to `target/<buildmode>/deps/icicle` so you can easily link to them. Alternatively you can set `ICICLE_INSTALL_DIR` env variable to have it installed elsewhere.
132
+
As explained above, the libs will be built and installed to `target/<buildmode>/deps/icicle` so you can easily link to them. Alternatively you can set`ICICLE_INSTALL_DIR` env variable for a custom install directory.
126
133
:::note
127
-
Make sure to have the icicle libs available when deploying an application that depends on icicle shared libs.
134
+
Make sure to install the icicle libs when installing a library/application that depends on icicle.
The ICICLE device library serves as an abstraction layer for interacting with various hardware devices. It provides a comprehensive interface for tasks such as setting the active device, querying device-specific information like free and total memory, determining the number of available devices, and managing memory allocation. Additionally, it offers functionality for copying data to and from devices, managing task queues (streams) for efficient device utilization, and abstracting the complexities of device management away from the user.
See programmers guide for more details. [C++](./programmers_guide/cpp#device-management), [Rust](./programmers_guide/rust#device-management), [Go TODO](./programmers_guide/go)
16
12
17
13
## ICICLE Core
18
14
@@ -31,22 +27,22 @@ Each library has a corresponding crate. See [programmers guide](./programmers_gu
The API is template and can work with all ICICLE curves (if corresponding lib is linked).
83
+
The API is template and can work with all ICICLE curves (if corresponding lib is linked), including G2 groups.
84
84
:::
85
85
86
86
### Batched MSM
@@ -91,14 +91,17 @@ Config fields `are_bases_shared` and `batch_size` are used to configure msm for
91
91
92
92
### G2 MSM
93
93
94
-
G2 MSM is also supported for most curves. It is similar to G1 MSM but using the G2 types instead.
94
+
for G2 MSM, use the [same msm api](#msm-function) with the G2 types.
95
95
96
+
:::note
97
+
Supported curves have types for both G1 and G2.
98
+
:::
96
99
97
100
### Precompution
98
101
99
102
#### What It Does:
100
103
101
-
- Precomputation: The function computes a set of additional points derived from the original base points. These precomputed points are stored and later reused during the MSM computation.
104
+
- The function computes a set of additional points derived from the original base points. These precomputed points are stored and later reused during the MSM computation.
102
105
- Purpose: By precomputing and storing these points, the MSM operation can reduce the number of operations needed at runtime, which can significantly speed up the calculation.
103
106
104
107
#### When to Use:
@@ -112,18 +115,18 @@ eIcicleError msm_precompute_bases(const A* input_bases, int bases_size, const MS
112
115
```
113
116
114
117
:::note
115
-
User is allocating the `output_bases` (on host or device memory) and later use it when calling msm.
118
+
User is allocating the `output_bases` (on host or device memory) and later use it as bases when calling msm.
116
119
:::
117
120
118
121
## Rust and Go bindings
119
122
123
+
The Rust and Go bindings provide equivalent functionality for their respective environments. Refer to their documentation for details on usage.
124
+
120
125
-[Golang](../golang-bindings/msm.md)
121
126
-[Rust](../rust-bindings/msm.md)
122
127
123
-
The Rust and Go bindings provide equivalent functionality for their respective environments. Refer to their documentation for details on usage.
124
-
125
128
## CUDA backend MSM
126
-
This section describes the CUDA msm implementation and how to use it.
129
+
This section describes the CUDA msm implementation and how to customize it (optional).
0 commit comments