Skip to content

Commit

Permalink
fix examples as worksapce for shared compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
yshekel committed Oct 9, 2024
1 parent eede005 commit cf30d22
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions examples/rust/cargo.toml → examples/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[workspace.package]

[workspace]
members = [
"arkworks-icicle-conversions", "hash-and-merkle",
members = [
"msm",
"ntt",
"polynomials",
"arkworks-icicle-conversions",
"hash-and-merkle",
]

Expand All @@ -15,6 +15,7 @@ icicle-runtime = { path = "../../wrappers/rust/icicle-runtime" }
icicle-core = { path = "../../wrappers/rust/icicle-core" }
icicle-bn254 = { path = "../../wrappers/rust/icicle-curves/icicle-bn254" }
icicle-bls12-377 = { path = "../../wrappers/rust/icicle-curves/icicle-bls12-377" }
icicle-babybear = { path = "../../wrappers/rust/icicle-fields/icicle-babybear" }
rand = "0.8"
clap = { version = "<=4.4.12", features = ["derive"] }

2 changes: 1 addition & 1 deletion examples/rust/arkworks-icicle-conversions/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ICICLE_CUDA_SOURCE_DIR="${ICILE_DIR}/backend/cuda"
if [ "$DEVICE_TYPE" == "CUDA" ] && [ ! -d "${ICICLE_BACKEND_INSTALL_DIR}" ] && [ -d "${ICICLE_CUDA_SOURCE_DIR}" ]; then
echo "Building icicle with CUDA backend"
cargo build --release --features=cuda
export ICICLE_BACKEND_INSTALL_DIR=$(realpath "./target/release/deps/icicle/lib/backend")
export ICICLE_BACKEND_INSTALL_DIR=$(realpath "../target/release/deps/icicle/lib/backend")
cargo run --release --features=cuda -- --device-type "${DEVICE_TYPE}"
else
echo "Building icicle without CUDA backend, ICICLE_BACKEND_INSTALL_DIR=${ICICLE_BACKEND_INSTALL_DIR}"
Expand Down
2 changes: 1 addition & 1 deletion examples/rust/hash-and-merkle/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ICICLE_CUDA_SOURCE_DIR="${ICILE_DIR}/backend/cuda"
if [ "$DEVICE_TYPE" == "CUDA" ] && [ ! -d "${ICICLE_BACKEND_INSTALL_DIR}" ] && [ -d "${ICICLE_CUDA_SOURCE_DIR}" ]; then
echo "Building icicle with CUDA backend"
cargo build --release --features=cuda
export ICICLE_BACKEND_INSTALL_DIR=$(realpath "./target/release/deps/icicle/lib/backend")
export ICICLE_BACKEND_INSTALL_DIR=$(realpath "../target/release/deps/icicle/lib/backend")
cargo run --release --features=cuda -- --device-type "${DEVICE_TYPE}"
else
echo "Building icicle without CUDA backend, ICICLE_BACKEND_INSTALL_DIR=${ICICLE_BACKEND_INSTALL_DIR}"
Expand Down
2 changes: 1 addition & 1 deletion examples/rust/msm/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ICICLE_CUDA_SOURCE_DIR="${ICILE_DIR}/backend/cuda"
if [ "$DEVICE_TYPE" == "CUDA" ] && [ ! -d "${ICICLE_BACKEND_INSTALL_DIR}" ] && [ -d "${ICICLE_CUDA_SOURCE_DIR}" ]; then
echo "Building icicle with CUDA backend"
cargo build --release --features=cuda
export ICICLE_BACKEND_INSTALL_DIR=$(realpath "./target/release/deps/icicle/lib/backend")
export ICICLE_BACKEND_INSTALL_DIR=$(realpath "../target/release/deps/icicle/lib/backend")
cargo run --release --features=cuda -- --device-type "${DEVICE_TYPE}"
else
echo "Building icicle without CUDA backend, ICICLE_BACKEND_INSTALL_DIR=${ICICLE_BACKEND_INSTALL_DIR}"
Expand Down
2 changes: 1 addition & 1 deletion examples/rust/ntt/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ICICLE_CUDA_SOURCE_DIR="${ICILE_DIR}/backend/cuda"
if [ "$DEVICE_TYPE" == "CUDA" ] && [ ! -d "${ICICLE_BACKEND_INSTALL_DIR}" ] && [ -d "${ICICLE_CUDA_SOURCE_DIR}" ]; then
echo "Building icicle with CUDA backend"
cargo build --release --features=cuda
export ICICLE_BACKEND_INSTALL_DIR=$(realpath "./target/release/deps/icicle/lib/backend")
export ICICLE_BACKEND_INSTALL_DIR=$(realpath "../target/release/deps/icicle/lib/backend")
cargo run --release --features=cuda -- --device-type "${DEVICE_TYPE}"
else
echo "Building icicle without CUDA backend, ICICLE_BACKEND_INSTALL_DIR=${ICICLE_BACKEND_INSTALL_DIR}"
Expand Down
2 changes: 1 addition & 1 deletion examples/rust/polynomials/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ICICLE_CUDA_SOURCE_DIR="${ICILE_DIR}/backend/cuda"
if [ "$DEVICE_TYPE" == "CUDA" ] && [ ! -d "${ICICLE_BACKEND_INSTALL_DIR}" ] && [ -d "${ICICLE_CUDA_SOURCE_DIR}" ]; then
echo "Building icicle with CUDA backend"
cargo build --release --features=cuda
export ICICLE_BACKEND_INSTALL_DIR=$(realpath "./target/release/deps/icicle/lib/backend")
export ICICLE_BACKEND_INSTALL_DIR=$(realpath "../target/release/deps/icicle/lib/backend")
cargo run --release --features=cuda -- --device-type "${DEVICE_TYPE}"
else
echo "Building icicle without CUDA backend, ICICLE_BACKEND_INSTALL_DIR=${ICICLE_BACKEND_INSTALL_DIR}"
Expand Down

0 comments on commit cf30d22

Please sign in to comment.