Skip to content

Commit

Permalink
Update toolchain version.
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyalesokhin-starkware committed Dec 3, 2024
1 parent 6e7d2aa commit 462c339
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion crates/prover/src/core/backend/simd/bit_reverse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ mod tests {

let res = bit_reverse16(values.data.try_into().unwrap());

assert_eq!(res.map(PackedM31::to_array).flatten(), expected);
assert_eq!(res.map(PackedM31::to_array).as_flattened(), expected);
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion crates/prover/src/core/backend/simd/fft/ifft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ mod tests {
[val0.to_array(), val1.to_array()].concat()
};

assert_eq!(res, ground_truth_ifft(domain, values.flatten()));
assert_eq!(res, ground_truth_ifft(domain, values.as_flattened()));
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion crates/prover/src/core/backend/simd/fft/rfft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ mod tests {
[val0.to_array(), val1.to_array()].concat()
};

assert_eq!(res, ground_truth_fft(domain, values.flatten()));
assert_eq!(res, ground_truth_fft(domain, values.as_flattened()));
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion crates/prover/src/core/backend/simd/lookups/gkr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ impl GkrOps for SimdBackend {
}

// Start DP with CPU backend to avoid dealing with instances smaller than a SIMD vector.
let (y_last_chunk, y_rem) = y.split_last_chunk::<{ LOG_N_LANES as usize }>().unwrap();
let (y_rem, y_last_chunk) = y.split_last_chunk::<{ LOG_N_LANES as usize }>().unwrap();
let initial = SecureColumn::from_iter(cpu_gen_eq_evals(y_last_chunk, v));
assert_eq!(initial.len(), N_LANES);

Expand Down
4 changes: 2 additions & 2 deletions crates/prover/src/core/fri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ fn compute_decommitment_positions_and_witness_evals(
let mut witness_evals = Vec::new();

// Group queries by the folding coset they reside in.
for subset_queries in query_positions.group_by(|a, b| a >> fold_step == b >> fold_step) {
for subset_queries in query_positions.chunk_by(|a, b| a >> fold_step == b >> fold_step) {
let subset_start = (subset_queries[0] >> fold_step) << fold_step;
let subset_decommitment_positions = subset_start..subset_start + (1 << fold_step);
let mut subset_queries_iter = subset_queries.iter().peekable();
Expand Down Expand Up @@ -1020,7 +1020,7 @@ fn compute_decommitment_positions_and_rebuild_evals(
let mut subset_domain_index_initials = Vec::new();

// Group queries by the subset they reside in.
for subset_queries in queries.group_by(|a, b| a >> fold_step == b >> fold_step) {
for subset_queries in queries.chunk_by(|a, b| a >> fold_step == b >> fold_step) {
let subset_start = (subset_queries[0] >> fold_step) << fold_step;
let subset_decommitment_positions = subset_start..subset_start + (1 << fold_step);
decommitment_positions.extend(subset_decommitment_positions.clone());
Expand Down
2 changes: 1 addition & 1 deletion crates/prover/src/core/lookups/gkr_prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ pub fn prove_batch<B: GkrOps>(

// Seed the channel with the layer masks.
for (&instance, mask) in zip(&sumcheck_instances, &masks) {
channel.mix_felts(mask.columns().flatten());
channel.mix_felts(mask.columns().as_flattened());
layer_masks_by_instance[instance].push(mask.clone());
}

Expand Down
2 changes: 1 addition & 1 deletion crates/prover/src/core/lookups/gkr_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ pub fn partially_verify_batch(
for &instance in &sumcheck_instances {
let n_unused = n_layers - instance_n_layers(instance);
let mask = &layer_masks_by_instance[instance][layer - n_unused];
channel.mix_felts(mask.columns().flatten());
channel.mix_felts(mask.columns().as_flattened());
}

// Set the OOD evaluation point for layer above.
Expand Down
2 changes: 1 addition & 1 deletion crates/prover/src/core/pcs/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl<MC: MerkleChannel> CommitmentSchemeVerifier<MC> {
})
.0
.into_iter()
.collect::<Result<_, _>>()?;
.collect::<Result<(), _>>()?;

// Answer FRI queries.
let samples = sampled_points.zip_cols(proof.sampled_values).map_cols(
Expand Down
2 changes: 1 addition & 1 deletion crates/prover/src/core/vcs/blake2_merkle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl MerkleHasher for Blake2sMerkleHasher {
for chunk in padded_values.array_chunks::<16>() {
state = compress(state, unsafe { std::mem::transmute(chunk) }, 0, 0, 0, 0);
}
state.map(|x| x.to_le_bytes()).flatten().into()
state.map(|x| x.to_le_bytes()).as_flattened().into()
}
}

Expand Down
3 changes: 3 additions & 0 deletions crates/prover/src/examples/blake/round/constraints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ use crate::examples::blake::{Fu32, STATE_SIZE};
const INV16: BaseField = BaseField::from_u32_unchecked(1 << 15);
const TWO: BaseField = BaseField::from_u32_unchecked(2);


// TODO(ilya): test `total_sum` and remove `#[allow(dead_code)]`.
#[allow(dead_code)]
pub struct BlakeRoundEval<'a, E: EvalAtRow> {
pub eval: E,
pub xor_lookup_elements: &'a BlakeXorElements,
Expand Down
3 changes: 3 additions & 0 deletions crates/prover/src/examples/blake/scheduler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ pub type BlakeSchedulerComponent = FrameworkComponent<BlakeSchedulerEval>;

relation!(BlakeElements, N_ROUND_INPUT_FELTS);


// TODO(ilya): test `total_sum` and remove `#[allow(dead_code)]`.
#[allow(dead_code)]
pub struct BlakeSchedulerEval {
pub log_size: u32,
pub blake_lookup_elements: BlakeElements,
Expand Down
2 changes: 1 addition & 1 deletion crates/prover/src/examples/poseidon/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ mod tests {
for i in 0..16 {
internal_matrix[i][i] += BaseField::from_u32_unchecked(1 << (i + 1));
}
let matrix = RowMajorMatrix::<BaseField, 16>::new(internal_matrix.flatten().to_vec());
let matrix = RowMajorMatrix::<BaseField, 16>::new(internal_matrix.as_flattened().to_vec());

let expected_state = matrix.mul(state);
apply_internal_round_matrix(&mut state);
Expand Down
9 changes: 2 additions & 7 deletions crates/prover/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
#![allow(incomplete_features)]
#![feature(
array_chunks,
array_methods,
array_try_from_fn,
array_windows,
assert_matches,
exact_size_is_empty,
generic_const_exprs,
get_many_mut,
int_roundings,
is_sorted,
iter_array_chunks,
new_uninit,
portable_simd,
slice_first_last_chunk,
slice_flatten,
slice_group_by,
slice_ptr_get,
stdsimd
stdarch_x86_avx512,
trait_upcasting,
)]
pub mod constraint_framework;
pub mod core;
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-04"
channel = "nightly-2024-12-03"

0 comments on commit 462c339

Please sign in to comment.