Skip to content

Commit 198c626

Browse files
committed
fix(hpu): increase number of tests to cope with probability of failure of both normality and expected value score
and raise expected value score check acceptable failure rate to 8%
1 parent 4ee0528 commit 198c626

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

tfhe/src/core_crypto/algorithms/test/noise_distribution/lwe_hpu_noise.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ pub const HPU_TEST_PARAMS_4_BITS_HPU_64_KS_21_132_TUNIFORM: HpuTestParams = HpuT
106106
message_modulus_log: CiphertextModulusLog(4),
107107
ct_width: 64,
108108
ksk_width: 21,
109-
//norm2: 8,
110109
norm2: 5,
111110
ntt_modulus: 18446744069414584321,
112111
};
@@ -582,7 +581,7 @@ fn hpu_noise_distribution(
582581
let expvalue_score_failure_rate = arithmetic_mean(&expvalue_score_result);
583582
println!("expected value score failure rate: {expvalue_score_failure_rate:?}");
584583
assert!(
585-
expvalue_score_failure_rate <= 0.065,
584+
expvalue_score_failure_rate <= 0.08,
586585
"expected value score failure rate is not acceptable"
587586
);
588587
}
@@ -732,13 +731,9 @@ static VARIANCE_MODE: HpuNoiseMode = HpuNoiseMode::Variance;
732731
// tests with >= 16k samples for variance check
733732
create_parameterized_test_hpu!(
734733
hpu_noise_distribution {
735-
//HPU_TEST_PARAMS_4_BITS_NATIVE_U64,
736-
//HPU_TEST_PARAMS_4_BITS_HPU_44_KS_21,
737-
//HPU_TEST_PARAMS_4_BITS_HPU_64_KS_21,
738734
HPU_TEST_PARAMS_4_BITS_HPU_64_KS_21_132_GAUSSIAN,
739735
HPU_TEST_PARAMS_4_BITS_HPU_64_KS_21_132_TUNIFORM,
740736
HPU_TEST_PARAMS_4_BITS_HPU_64_KS_21_132_TUNIFORM_2M128,
741-
//HPU_TEST_PARAMS_4_BITS_NATIVE_U64_132_BITS_GAUSSIAN,
742737
},
743738
16,
744739
5,
@@ -749,12 +744,11 @@ create_parameterized_test_hpu!(
749744
// tests for checking normality & expected value after KS
750745
create_parameterized_test_hpu!(
751746
hpu_noise_distribution {
752-
//HPU_TEST_PARAMS_4_BITS_HPU_64_KS_21_132_GAUSSIAN,
753747
HPU_TEST_PARAMS_4_BITS_HPU_64_KS_21_132_TUNIFORM,
754748
HPU_TEST_PARAMS_4_BITS_HPU_64_KS_21_132_TUNIFORM_2M128,
755749
},
756750
2,
757-
80,
758751
100,
752+
160,
759753
NORMALITY_MODE
760754
);

0 commit comments

Comments
 (0)