mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 03:25:05 -05:00
fix: solo_key::analyse, rm unused field
was used only to prevent too conservatives pre-cuts, we no longer have pre-cuts
This commit is contained in:
@@ -104,8 +104,6 @@ pub struct OperationDag {
|
||||
// Collect all operators ouput variances
|
||||
pub out_variances: Vec<SymbolicVariance>,
|
||||
pub nb_luts: u64,
|
||||
// True if all luts have noise with origin VarianceOrigin::Input
|
||||
pub has_only_luts_with_inputs: bool,
|
||||
// The full dag levelled complexity
|
||||
pub levelled_complexity: LevelledComplexity,
|
||||
// Dominating variances and bounds per precision
|
||||
@@ -413,16 +411,12 @@ pub fn analyze(
|
||||
&in_luts_variance,
|
||||
noise_config,
|
||||
);
|
||||
let has_only_luts_with_inputs = in_luts_variance
|
||||
.iter()
|
||||
.all(|(_, _, sb)| sb.origin() == VarianceOrigin::Input);
|
||||
let result = OperationDag {
|
||||
operators: dag.operators.clone(),
|
||||
out_variances,
|
||||
nb_luts,
|
||||
levelled_complexity,
|
||||
constraints_by_precisions,
|
||||
has_only_luts_with_inputs,
|
||||
};
|
||||
assert_properties_correctness(&result);
|
||||
result
|
||||
@@ -866,24 +860,4 @@ mod tests {
|
||||
prev_safe_noise_bound = ns.safe_variance_bound;
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_1_layer_lut() {
|
||||
let mut graph = unparametrized::OperationDag::new();
|
||||
let input1 = graph.add_input(1, Shape::number());
|
||||
let _lut1 = graph.add_lut(input1, FunctionTable::UNKWOWN, 1);
|
||||
let _lut2 = graph.add_lut(input1, FunctionTable::UNKWOWN, 1);
|
||||
let analysis = analyze(&graph);
|
||||
assert!(analysis.has_only_luts_with_inputs);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_2_layer_lut() {
|
||||
let mut graph = unparametrized::OperationDag::new();
|
||||
let input1 = graph.add_input(1, Shape::number());
|
||||
let lut1 = graph.add_lut(input1, FunctionTable::UNKWOWN, 1);
|
||||
let _lut2 = graph.add_lut(lut1, FunctionTable::UNKWOWN, 1);
|
||||
let analysis = analyze(&graph);
|
||||
assert!(!analysis.has_only_luts_with_inputs);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user