Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/runs-on.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ images:
runners:
gpu-nvidia:
cpu: [32, 64]
family: ["g6"]
hdd: 200
family: ["g6"]
3 changes: 2 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
"runs-on",
"runner=32cpu-linux-x64",
"run-id=${{ github.run_id }}",
"spot=false"
"spot=false",
"disk=large"
]
steps:

Expand Down
6 changes: 5 additions & 1 deletion Dockerfile.server
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Start with a base image that includes CUDA
FROM nvidia/cuda:12.5.1-devel-ubuntu22.04 AS builder
FROM nvidia/cuda:12.9.0-devel-ubuntu22.04 AS builder

# Install necessary packages
RUN apt-get update && apt-get install -y \
Expand Down Expand Up @@ -39,6 +39,10 @@ RUN mkdir -p /root/.ssh && chmod 700 /root/.ssh \
&& ssh-keyscan github.com >> /root/.ssh/known_hosts \
&& git config --global url."[email protected]:".insteadOf "https://github.com/"

RUN nvcc --version

RUN df -h

# Build the Rust project
RUN --mount=type=ssh CARGO_NET_GIT_FETCH_WITH_CLI=true cargo build -p moongate-server --release

Expand Down
4 changes: 3 additions & 1 deletion Dockerfile.toolchain
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Start with a base image that includes CUDA
FROM nvidia/cuda:12.5.1-devel-ubuntu22.04 AS builder
FROM nvidia/cuda:12.9.0-devel-ubuntu22.04 AS builder

# Install necessary packages
RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y \
Expand All @@ -15,6 +15,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

RUN nvcc --version

# Set the working directory in the container
WORKDIR /usr/src/app

Expand Down
5 changes: 4 additions & 1 deletion core/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ fn main() {
cc_builder.flag("--expt-relaxed-constexpr");
cc_builder.flag("-gencode=arch=compute_86,code=sm_86");
cc_builder.flag("-gencode=arch=compute_89,code=sm_89");
cc_builder.flag("-gencode=arch=compute_89,code=compute_89");
cc_builder.flag("-gencode=arch=compute_90,code=sm_90");
cc_builder.flag("-gencode=arch=compute_100,code=sm_100");
cc_builder.flag("-gencode=arch=compute_120,code=sm_120");
cc_builder.flag("-gencode=arch=compute_120,code=compute_120");

env::set_var("DEP_SPPARK_ROOT", "../sppark");
if let Some(include) = env::var_os("DEP_SPPARK_ROOT") {
Expand Down
17 changes: 14 additions & 3 deletions core/src/challenger/grinding_challenger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
use sp1_stark::{inner_perm, InnerChallenger};

use crate::{
challenger::grinding_challenger::DeviceGrindingChallenger, cuda_runtime::stream::CudaStream,

Check failure on line 112 in core/src/challenger/grinding_challenger.rs

View workflow job for this annotation

GitHub Actions / Formatting & Clippy

unused import: `challenger::grinding_challenger::DeviceGrindingChallenger`
};

#[test]
Expand All @@ -117,7 +117,7 @@
(1..20).for_each(|bits| {
let mut challenger = InnerChallenger::new(inner_perm());

let stream = CudaStream::default();

Check failure on line 120 in core/src/challenger/grinding_challenger.rs

View workflow job for this annotation

GitHub Actions / Formatting & Clippy

unused variable: `stream`

// Observe 7 elements to make the input buffer almost full and trigger duplexing on
// device.
Expand All @@ -136,12 +136,23 @@
// Clone the original challenger because after grinding on device the internal state
// of `challenger` will change.
let mut original_challenger = challenger.clone();
let result = challenger.grind_device(bits, &stream);
let result = challenger.grind(bits);

assert!(original_challenger.check_witness(bits, result));

let mut original_challenger_2 = challenger_2.clone();
let result_2 = challenger_2.grind_device(bits, &stream);
let mut original_challenger_2: p3_challenger::DuplexChallenger<
BabyBear,
p3_poseidon2::Poseidon2<
BabyBear,
p3_poseidon2::Poseidon2ExternalMatrixGeneral,
p3_baby_bear::DiffusionMatrixBabyBear,
16,
7,
>,
16,
8,
> = challenger_2.clone();
let result_2 = challenger_2.grind(bits);

assert!(original_challenger_2.check_witness(bits, result_2));

Expand Down
4 changes: 2 additions & 2 deletions core/src/fri/open.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
use sp1_stark::Com;

use p3_baby_bear::BabyBear;
use p3_challenger::{CanObserve, CanSample, CanSampleBits};
use p3_challenger::{CanObserve, CanSample, CanSampleBits, GrindingChallenger};
use p3_field::{AbstractExtensionField, AbstractField, TwoAdicField};
use p3_fri::{BatchOpening, CommitPhaseProofStep, FriProof, QueryProof};
use sp1_stark::Challenger;

use crate::{
challenger::grinding_challenger::DeviceGrindingChallenger,

Check failure on line 16 in core/src/fri/open.rs

View workflow job for this annotation

GitHub Actions / Formatting & Clippy

unused import: `challenger::grinding_challenger::DeviceGrindingChallenger`

Check failure on line 16 in core/src/fri/open.rs

View workflow job for this annotation

GitHub Actions / Formatting & Clippy

unused import: `challenger::grinding_challenger::DeviceGrindingChallenger`
cuda_runtime::stream::CudaStream,
device::{
memory::{ToDevice, ToHost},
Expand Down Expand Up @@ -84,7 +84,7 @@
.in_scope(|| commit_phase(committer, input, log_max_height, challenger));

let pow_witness = tracing::debug_span!("pow witness")
.in_scope(|| challenger.grind_device(config.proof_of_work_bits, main_stream));
.in_scope(|| challenger.grind(config.proof_of_work_bits));

let query_indices: Vec<usize> =
(0..config.num_queries).map(|_| challenger.sample_bits(log_max_height)).collect();
Expand Down
1 change: 1 addition & 0 deletions perf/run_s3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ aws s3 cp s3://sp1-testing-suite/$s3_path/stdin.bin stdin.bin
export RUST_LOG=debug
export FIX_CORE_SHAPES=true
export FIX_RECURSION_SHAPES=true
export SP1_ALLOW_DEPRECATED_HOOKS=true

# Run moongate-perf
RUST_BACKTRACE=full cargo run -p moongate-perf --release -- --program-path program.bin --stdin-path stdin.bin --stage $stage --trace nvtx
Expand Down
Loading