Skip to content

Commit 530c90b

Browse files
committed
gpu process sumcheck in dag form
1 parent 584d9d9 commit 530c90b

File tree

5 files changed

+163
-62
lines changed

5 files changed

+163
-62
lines changed

Cargo.lock

Lines changed: 75 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[workspace]
22
members = [
3-
"ceno_cli",
4-
"ceno_emul",
5-
"ceno_host",
6-
"ceno_rt",
7-
"ceno_syscall",
8-
"ceno_zkvm",
9-
"derive",
10-
"examples-builder",
11-
"examples",
12-
"guest_libs/*",
3+
"ceno_cli",
4+
"ceno_emul",
5+
"ceno_host",
6+
"ceno_rt",
7+
"ceno_syscall",
8+
"ceno_zkvm",
9+
"derive",
10+
"examples-builder",
11+
"examples",
12+
"guest_libs/*",
1313
]
1414
resolver = "2"
1515

@@ -62,11 +62,11 @@ secp = "0.4.1"
6262
serde = { version = "1.0", features = ["derive", "rc"] }
6363
serde_json = "1.0"
6464
smallvec = { version = "1.13.2", features = [
65-
"const_generics",
66-
"const_new",
67-
"serde",
68-
"union",
69-
"write",
65+
"const_generics",
66+
"const_new",
67+
"serde",
68+
"union",
69+
"write",
7070
] }
7171
strum = "0.26"
7272
strum_macros = "0.26"
@@ -75,13 +75,13 @@ thiserror = "2"
7575
thread_local = "1.1"
7676
tiny-keccak = { version = "2.0.2", features = ["keccak"] }
7777
tracing = { version = "0.1", features = [
78-
"attributes",
78+
"attributes",
7979
] }
8080
tracing-forest = { version = "0.1.6" }
8181
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
8282
uint = "0.8"
8383

84-
ceno_gpu = { path = "utils/cuda_hal", package = "cuda_hal" }
84+
ceno_gpu = { git = "ssh://[email protected]/scroll-tech/ceno-gpu.git", package = "cuda_hal", branch = "main", default-features = false, features = ["bb31"] }
8585

8686
[profile.dev]
8787
lto = "thin"
@@ -96,17 +96,17 @@ opt-level = 3
9696
[profile.release]
9797
lto = "thin"
9898

99-
# [patch."ssh://[email protected]/scroll-tech/ceno-gpu.git"]
100-
# ceno_gpu = { path = "../ceno-gpu/cuda_hal", package = "cuda_hal", default-features = false, features=["bb31"] }
99+
[patch."ssh://git@github.com/scroll-tech/ceno-gpu.git"]
100+
ceno_gpu = { path = "../ceno-gpu/cuda_hal", package = "cuda_hal", default-features = false, features = ["bb31"] }
101101

102-
# [patch."https://github.com/scroll-tech/gkr-backend"]
103-
# ff_ext = { path = "../gkr-backend/crates/ff_ext", package = "ff_ext" }
104-
# mpcs = { path = "../gkr-backend/crates/mpcs", package = "mpcs" }
105-
# multilinear_extensions = { path = "../gkr-backend/crates/multilinear_extensions", package = "multilinear_extensions" }
106-
# p3 = { path = "../gkr-backend/crates/p3", package = "p3" }
107-
# poseidon = { path = "../gkr-backend/crates/poseidon", package = "poseidon" }
108-
# sp1-curves = { path = "../gkr-backend/crates/curves", package = "sp1-curves" }
109-
# sumcheck = { path = "../gkr-backend/crates/sumcheck", package = "sumcheck" }
110-
# transcript = { path = "../gkr-backend/crates/transcript", package = "transcript" }
111-
# whir = { path = "../gkr-backend/crates/whir", package = "whir" }
112-
# witness = { path = "../gkr-backend/crates/witness", package = "witness" }
102+
[patch."https://github.com/scroll-tech/gkr-backend"]
103+
ff_ext = { path = "../gkr-backend/crates/ff_ext", package = "ff_ext" }
104+
mpcs = { path = "../gkr-backend/crates/mpcs", package = "mpcs" }
105+
multilinear_extensions = { path = "../gkr-backend/crates/multilinear_extensions", package = "multilinear_extensions" }
106+
p3 = { path = "../gkr-backend/crates/p3", package = "p3" }
107+
poseidon = { path = "../gkr-backend/crates/poseidon", package = "poseidon" }
108+
sp1-curves = { path = "../gkr-backend/crates/curves", package = "sp1-curves" }
109+
sumcheck = { path = "../gkr-backend/crates/sumcheck", package = "sumcheck" }
110+
transcript = { path = "../gkr-backend/crates/transcript", package = "transcript" }
111+
whir = { path = "../gkr-backend/crates/whir", package = "whir" }
112+
witness = { path = "../gkr-backend/crates/witness", package = "witness" }

gkr_iop/src/gkr/layer.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,15 @@ pub struct Layer<E: ExtensionField> {
103103
pub main_sumcheck_expression_monomial_terms: Option<Vec<Term<Expression<E>, Expression<E>>>>,
104104
pub main_sumcheck_expression: Option<Expression<E>>,
105105

106+
// flatten computation dag
107+
pub main_sumcheck_expression_dag: Option<(
108+
Vec<u32>,
109+
Vec<Instance>,
110+
Vec<Expression<E>>,
111+
Vec<Either<E::BaseField, E>>,
112+
(usize, usize),
113+
)>,
114+
106115
// rotation sumcheck expression, only optionally valid for zerocheck
107116
// store in 2 forms: expression & monomial
108117
pub rotation_sumcheck_expression_monomial_terms:
@@ -175,6 +184,7 @@ impl<E: ExtensionField> Layer<E> {
175184
expr_names,
176185
main_sumcheck_expression_monomial_terms: None,
177186
main_sumcheck_expression: None,
187+
main_sumcheck_expression_dag: None,
178188
rotation_sumcheck_expression_monomial_terms: None,
179189
rotation_sumcheck_expression: None,
180190
};

0 commit comments

Comments
 (0)