update gpu building

This commit is contained in:
Ho
2025-09-15 19:57:04 +09:00
parent 9998069515
commit 953ba50c07
5 changed files with 1218 additions and 1206 deletions

109
Cargo.lock generated
View File

@@ -1561,6 +1561,12 @@ dependencies = [
"serde",
]
[[package]]
name = "bytesize"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f5c434ae3cf0089ca203e9019ebe529c47ff45cefe8af7c85ecb734ef541822f"
[[package]]
name = "bzip2-sys"
version = "0.1.13+1.0.8"
@@ -1939,6 +1945,30 @@ dependencies = [
"syn 2.0.101",
]
[[package]]
name = "cuda-config"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ee74643f7430213a1a78320f88649de309b20b80818325575e393f848f79f5d"
dependencies = [
"glob",
]
[[package]]
name = "cuda-runtime-sys"
version = "0.3.0-alpha.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d070b301187fee3c611e75a425cf12247b7c75c09729dbdef95cb9cb64e8c39"
dependencies = [
"cuda-config",
]
[[package]]
name = "cudarc"
version = "0.9.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1871a911a2b9a3f66a285896a719159985683bf9903aa2cf89e0c9f53e14552"
[[package]]
name = "darling"
version = "0.20.11"
@@ -4516,6 +4546,9 @@ dependencies = [
"openvm-circuit-derive",
"openvm-circuit-primitives",
"openvm-circuit-primitives-derive",
"openvm-cuda-backend",
"openvm-cuda-builder",
"openvm-cuda-common",
"openvm-instructions",
"openvm-mod-circuit-builder",
"openvm-rv32-adapters",
@@ -4593,6 +4626,9 @@ dependencies = [
"openvm-circuit-derive",
"openvm-circuit-primitives",
"openvm-circuit-primitives-derive",
"openvm-cuda-backend",
"openvm-cuda-builder",
"openvm-cuda-common",
"openvm-instructions",
"openvm-rv32-adapters",
"openvm-rv32im-circuit",
@@ -4659,6 +4695,9 @@ dependencies = [
"openvm-circuit-derive",
"openvm-circuit-primitives",
"openvm-circuit-primitives-derive",
"openvm-cuda-backend",
"openvm-cuda-builder",
"openvm-cuda-common",
"openvm-instructions",
"openvm-poseidon2-air",
"openvm-stark-backend",
@@ -4695,7 +4734,9 @@ dependencies = [
"num-bigint 0.4.6",
"num-traits",
"openvm-circuit-primitives-derive",
"openvm-cuda-backend",
"openvm-cuda-builder",
"openvm-cuda-common",
"openvm-stark-backend",
"rand 0.8.5",
"tracing",
@@ -4726,6 +4767,38 @@ dependencies = [
"static_assertions",
]
[[package]]
name = "openvm-cuda-backend"
version = "1.2.0"
source = "git+https://github.com/openvm-org/stark-backend.git?tag=v1.2.0#64c72dba9db8dedad1c936a04fa344b4b9ecb1cd"
dependencies = [
"bincode 2.0.1",
"bincode_derive",
"derivative",
"derive-new 0.7.0",
"itertools 0.14.0",
"lazy_static",
"metrics",
"openvm-cuda-builder",
"openvm-cuda-common",
"openvm-stark-backend",
"openvm-stark-sdk",
"p3-baby-bear",
"p3-commit",
"p3-dft",
"p3-field",
"p3-fri",
"p3-matrix",
"p3-merkle-tree",
"p3-symmetric",
"p3-util",
"rustc-hash 2.1.1",
"serde",
"serde_json",
"thiserror 1.0.69",
"tracing",
]
[[package]]
name = "openvm-cuda-builder"
version = "1.2.0"
@@ -4735,6 +4808,19 @@ dependencies = [
"glob",
]
[[package]]
name = "openvm-cuda-common"
version = "1.2.0"
source = "git+https://github.com/openvm-org/stark-backend.git?tag=v1.2.0#64c72dba9db8dedad1c936a04fa344b4b9ecb1cd"
dependencies = [
"bytesize",
"lazy_static",
"metrics",
"openvm-cuda-builder",
"thiserror 1.0.69",
"tracing",
]
[[package]]
name = "openvm-custom-insn"
version = "0.1.0"
@@ -4763,11 +4849,14 @@ dependencies = [
"openvm-circuit",
"openvm-circuit-derive",
"openvm-circuit-primitives",
"openvm-cuda-backend",
"openvm-cuda-common",
"openvm-ecc-transpiler",
"openvm-instructions",
"openvm-mod-circuit-builder",
"openvm-rv32-adapters",
"openvm-stark-backend",
"openvm-stark-sdk",
"rand 0.8.5",
"serde",
"serde_with",
@@ -4856,6 +4945,9 @@ dependencies = [
"openvm-circuit-derive",
"openvm-circuit-primitives",
"openvm-circuit-primitives-derive",
"openvm-cuda-backend",
"openvm-cuda-builder",
"openvm-cuda-common",
"openvm-instructions",
"openvm-keccak256-transpiler",
"openvm-rv32im-circuit",
@@ -4903,12 +4995,15 @@ name = "openvm-mod-circuit-builder"
version = "1.4.0"
source = "git+https://github.com/openvm-org/openvm.git?tag=v1.4.0#39ee587f0f73646e3753cb2aa5f34885d4efffe0"
dependencies = [
"cuda-runtime-sys",
"itertools 0.14.0",
"num-bigint 0.4.6",
"num-traits",
"openvm-circuit",
"openvm-circuit-primitives",
"openvm-cuda-backend",
"openvm-cuda-builder",
"openvm-cuda-common",
"openvm-instructions",
"openvm-stark-backend",
"openvm-stark-sdk",
@@ -4930,6 +5025,9 @@ dependencies = [
"openvm-circuit-derive",
"openvm-circuit-primitives",
"openvm-circuit-primitives-derive",
"openvm-cuda-backend",
"openvm-cuda-builder",
"openvm-cuda-common",
"openvm-instructions",
"openvm-native-compiler",
"openvm-poseidon2-air",
@@ -5054,6 +5152,7 @@ dependencies = [
"openvm-circuit",
"openvm-circuit-derive",
"openvm-circuit-primitives",
"openvm-cuda-backend",
"openvm-ecc-circuit",
"openvm-ecc-guest",
"openvm-instructions",
@@ -5062,6 +5161,7 @@ dependencies = [
"openvm-pairing-transpiler",
"openvm-rv32im-circuit",
"openvm-stark-backend",
"openvm-stark-sdk",
"rand 0.8.5",
"serde",
"strum 0.26.3",
@@ -5161,9 +5261,13 @@ dependencies = [
"openvm-circuit-derive",
"openvm-circuit-primitives",
"openvm-circuit-primitives-derive",
"openvm-cuda-backend",
"openvm-cuda-builder",
"openvm-cuda-common",
"openvm-instructions",
"openvm-rv32im-transpiler",
"openvm-stark-backend",
"openvm-stark-sdk",
"rand 0.8.5",
"serde",
"strum 0.26.3",
@@ -5220,6 +5324,7 @@ dependencies = [
"openvm-build",
"openvm-circuit",
"openvm-continuations",
"openvm-cuda-backend",
"openvm-ecc-circuit",
"openvm-ecc-transpiler",
"openvm-keccak256-circuit",
@@ -5282,6 +5387,9 @@ dependencies = [
"openvm-circuit",
"openvm-circuit-derive",
"openvm-circuit-primitives",
"openvm-cuda-backend",
"openvm-cuda-builder",
"openvm-cuda-common",
"openvm-instructions",
"openvm-rv32im-circuit",
"openvm-sha256-air",
@@ -8074,6 +8182,7 @@ source = "git+https://github.com/scroll-tech/zkvm-prover?rev=060be4c#060be4c0461
dependencies = [
"base64 0.22.1",
"bincode 1.3.3",
"cudarc",
"eyre",
"git-version",
"hex",

View File

@@ -1,45 +1,44 @@
[patch."https://github.com/openvm-org/openvm.git"]
openvm-build = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false }
openvm-circuit = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false }
openvm-continuations = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false }
openvm-instructions ={ git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false }
openvm-native-circuit = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false }
openvm-native-compiler = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false }
openvm-native-recursion = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false }
openvm-native-transpiler = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false }
openvm-rv32im-transpiler = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false }
openvm-sdk = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false, features = ["parallel", "bench-metrics", "evm-prove"] }
openvm-transpiler = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false }
openvm-build = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.4.0-c033e18-pipe", default-features = false }
openvm-circuit = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.4.0-c033e18-pipe", default-features = false }
openvm-continuations = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.4.0-c033e18-pipe", default-features = false }
openvm-instructions ={ git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.4.0-c033e18-pipe", default-features = false }
openvm-native-circuit = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.4.0-c033e18-pipe", default-features = false }
openvm-native-compiler = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.4.0-c033e18-pipe", default-features = false }
openvm-native-recursion = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.4.0-c033e18-pipe", default-features = false }
openvm-native-transpiler = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.4.0-c033e18-pipe", default-features = false }
openvm-rv32im-transpiler = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.4.0-c033e18-pipe", default-features = false }
openvm-sdk = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.4.0-c033e18-pipe", default-features = false, features = ["parallel", "bench-metrics", "evm-prove"] }
openvm-transpiler = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.4.0-c033e18-pipe", default-features = false }
[patch."https://github.com/openvm-org/stark-backend.git"]
openvm-stark-backend = { git = "ssh://git@github.com/scroll-tech/openvm-stark-gpu.git", branch = "main", features = ["gpu"] }
openvm-stark-sdk = { git = "ssh://git@github.com/scroll-tech/openvm-stark-gpu.git", branch = "main", features = ["gpu"] }
openvm-stark-backend = { git = "ssh://git@github.com/scroll-tech/openvm-stark-gpu.git", branch = "update-p3-gpu-v0.2.2", features = ["gpu"] }
openvm-stark-sdk = { git = "ssh://git@github.com/scroll-tech/openvm-stark-gpu.git", branch = "update-p3-gpu-v0.2.2", features = ["gpu"] }
[patch."https://github.com/Plonky3/Plonky3.git"]
p3-air = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
p3-field = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
p3-commit = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
p3-matrix = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
p3-air = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }
p3-field = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }
p3-commit = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }
p3-matrix = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }
p3-baby-bear = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", features = [
"nightly-features",
], tag = "v0.2.1" }
p3-koala-bear = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
p3-util = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
p3-challenger = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
p3-dft = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
p3-fri = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
p3-goldilocks = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
p3-keccak = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
p3-keccak-air = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
p3-blake3 = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
p3-mds = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
p3-merkle-tree = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
p3-monty-31 = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
p3-poseidon = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
p3-poseidon2 = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
p3-poseidon2-air = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
p3-symmetric = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
p3-uni-stark = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
p3-maybe-rayon = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" } # the "parallel" feature is NOT on by default to allow single-threaded benchmarking
p3-bn254-fr = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" }
], tag = "v0.2.2" }
p3-koala-bear = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }
p3-util = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }
p3-challenger = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }
p3-dft = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }
p3-fri = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }
p3-goldilocks = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }
p3-keccak = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }
p3-keccak-air = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }
p3-blake3 = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }
p3-mds = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }
p3-merkle-tree = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }
p3-monty-31 = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }
p3-poseidon = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }
p3-poseidon2 = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }
p3-poseidon2-air = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }
p3-symmetric = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }
p3-uni-stark = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }
p3-maybe-rayon = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" } # the "parallel" feature is NOT on by default to allow single-threaded benchmarking
p3-bn254-fr = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.2" }

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,7 @@ clean:
# build gpu prover, never touch lock file
build:
GO_TAG=${GO_TAG} GIT_REV=${GIT_REV} ZK_VERSION=${ZK_VERSION} cargo build -Z unstable-options --release -p prover --lockfile-path ./Cargo.lock
GO_TAG=${GO_TAG} GIT_REV=${GIT_REV} ZK_VERSION=${ZK_VERSION} cargo build -Z unstable-options --release -p prover --features cuda --lockfile-path ./Cargo.lock
version:
echo ${GO_TAG}-${GIT_REV}-${ZK_VERSION}

View File

@@ -33,3 +33,7 @@ clap = { version = "4.5", features = ["derive"] }
ctor = "0.2.8"
url = { version = "2.5.4", features = ["serde",] }
serde_bytes = "0.11.15"
[features]
default = []
cuda = ["scroll-zkvm-prover/cuda"]