Skip to content

Commit eef1ad0

Browse files
VitaliiHVitaliiH
authored andcommitted
alt extend
1 parent f85d116 commit eef1ad0

File tree

1 file changed

+12
-3
lines changed
  • crates/prover/src/core/backend/icicle

1 file changed

+12
-3
lines changed

crates/prover/src/core/backend/icicle/circle.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,20 @@ impl PolyOps for IcicleBackend {
103103
folded
104104
}
105105

106+
// fn extend(poly: &CirclePoly<Self>, log_size: u32) -> CirclePoly<Self> {
107+
// assert!(log_size >= poly.log_size());
108+
// let count_zeros_to_extend = poly.coeffs.len();
109+
// let coeffs = DeviceVec::cuda_malloc_extend_with_zeros(&poly.coeffs.data, count_zeros_to_extend).unwrap();
110+
// CirclePoly::new(DeviceColumn {data: coeffs})
111+
// }
112+
106113
fn extend(poly: &CirclePoly<Self>, log_size: u32) -> CirclePoly<Self> {
107114
assert!(log_size >= poly.log_size());
108-
let count_zeros_to_extend = poly.coeffs.len();
109-
let coeffs = DeviceVec::cuda_malloc_extend_with_zeros(&poly.coeffs.data, count_zeros_to_extend).unwrap();
110-
CirclePoly::new(DeviceColumn {data: coeffs})
115+
116+
let mut device_column = DeviceColumn::zeros(1 << log_size);
117+
poly.coeffs.data.copy_to_device(&mut device_column.data).unwrap();
118+
119+
CirclePoly::new(device_column)
111120
}
112121

113122
fn evaluate(

0 commit comments

Comments
 (0)