Skip to content

Commit 09579a1

Browse files
committed
chore(ci): re-enable release profile for doctest
- following merge of 17.0.4 in rust stable the bug uncovered by lto on aarch64 has been fixed rust-lang/rust#116941 so we remove the hard coded override - update nightly toolchain to have fixed LLVM as well - fix lints linked to latest nightly
1 parent 62feb59 commit 09579a1

File tree

15 files changed

+23
-26
lines changed

15 files changed

+23
-26
lines changed

.github/workflows/aws_tfhe_fast_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
8181
- name: Run user docs tests
8282
run: |
83-
CARGO_PROFILE=release_lto_off make test_user_doc
83+
make test_user_doc
8484
8585
- name: Run js on wasm API tests
8686
run: |

.github/workflows/aws_tfhe_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
8484
- name: Run user docs tests
8585
run: |
86-
CARGO_PROFILE=release_lto_off make test_user_doc
86+
make test_user_doc
8787
8888
- name: Gen Keys if required
8989
run: |

.github/workflows/m1_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
8686
- name: Run user docs tests
8787
run: |
88-
CARGO_PROFILE=release_lto_off make test_user_doc
88+
make test_user_doc
8989
9090
# JS tests are more easily launched in docker, we won't test that on M1 as docker is pretty
9191
# slow on Apple machines due to the virtualization layer.

concrete-csprng/src/seeders/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ pub trait Seeder {
2222
}
2323

2424
mod implem;
25+
// This import statement can be empty if seeder features are disabled, rustc's behavior changed to
26+
// warn of empty modules, we know this can happen, so allow it.
27+
#[allow(unused_imports)]
2528
pub use implem::*;
2629

2730
#[cfg(test)]

scripts/integer-tests.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ not_multi_bit="_multi_bit"
2222
signed=""
2323
not_signed=""
2424
cargo_profile="release"
25-
# TODO: revert to release once the bug is properly fixed/identified
26-
cargo_profile_doctests="release_lto_off"
2725
avx512_feature=""
2826

2927
while [ -n "$1" ]
@@ -163,7 +161,7 @@ cargo "${RUST_TOOLCHAIN}" nextest run \
163161

164162
if [[ "${multi_bit}" == "" ]]; then
165163
cargo "${RUST_TOOLCHAIN}" test \
166-
--profile "${cargo_profile_doctests}" \
164+
--profile "${cargo_profile}" \
167165
--package tfhe \
168166
--features="${ARCH_FEATURE}",integer,internal-keycache,"${avx512_feature}" \
169167
--doc \

tfhe/benches/shortint/bench.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ fn _bench_wopbs_param_message_8_norm2_5(c: &mut Criterion) {
393393
let mut bench_group = c.benchmark_group("programmable_bootstrap");
394394

395395
let param = WOPBS_PARAM_MESSAGE_4_NORM2_6_KS_PBS;
396-
let param_set: ShortintParameterSet = param.try_into().unwrap();
396+
let param_set: ShortintParameterSet = param.into();
397397
let pbs_params = param_set.pbs_parameters().unwrap();
398398

399399
let keys = KEY_CACHE_WOPBS.get_from_param((pbs_params, param));

tfhe/examples/regex_engine/engine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub fn has_match(
1919

2020
let res = if branches.len() <= 1 {
2121
branches
22-
.get(0)
22+
.first()
2323
.map_or(exec.ct_false(), |branch| branch(&mut exec))
2424
.0
2525
} else {

tfhe/src/core_crypto/fft_impl/fft128_u128/crypto/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use dyn_stack::{GlobalPodBuffer, PodStack, ReborrowMut};
22

33
use super::super::super::{fft128, fft128_u128};
4-
use super::super::math::fft::{Fft128, Fft128View};
4+
use super::super::math::fft::Fft128View;
55
use crate::core_crypto::fft_impl::common::tests::{
66
gen_keys_or_get_from_cache_if_enabled, generate_keys,
77
};

tfhe/src/core_crypto/fft_impl/fft128_u128/math/fft/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::core_crypto::commons::utils::izip;
2-
pub use crate::core_crypto::fft_impl::fft128::math::fft::{Fft128, Fft128View};
2+
pub use crate::core_crypto::fft_impl::fft128::math::fft::Fft128View;
33
use concrete_fft::fft128::f128;
44
use dyn_stack::PodStack;
55

tfhe/src/js_on_wasm_api/boolean.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ impl Boolean {
195195
}
196196

197197
#[wasm_bindgen]
198-
pub fn trivial_encrypt(&mut self, message: bool) -> BooleanCiphertext {
198+
pub fn trivial_encrypt(message: bool) -> BooleanCiphertext {
199199
set_hook(Box::new(console_error_panic_hook::hook));
200200
BooleanCiphertext(crate::boolean::ciphertext::Ciphertext::Trivial(message))
201201
}

tfhe/src/js_on_wasm_api/mod.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
#[cfg(feature = "shortint-client-js-wasm-api")]
22
mod shortint;
3-
#[cfg(feature = "shortint-client-js-wasm-api")]
4-
pub use shortint::*;
53

64
#[cfg(feature = "boolean-client-js-wasm-api")]
75
mod boolean;
8-
#[cfg(feature = "boolean-client-js-wasm-api")]
9-
pub use boolean::*;
106

7+
// We need to use the init_thread_pool for it to be publicly visible but it appears unused when
8+
// compiling
9+
#[allow(unused_imports)]
1110
#[cfg(feature = "parallel-wasm-api")]
1211
pub use wasm_bindgen_rayon::init_thread_pool;
1312

1413
mod js_high_level_api;
15-
pub use js_high_level_api::*;

tfhe/src/js_on_wasm_api/shortint.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use crate::core_crypto::commons::generators::DeterministicSeeder;
2-
pub use crate::core_crypto::commons::math::random::Seed;
2+
use crate::core_crypto::commons::math::random::Seed;
33
use crate::core_crypto::prelude::ActivatedRandomGenerator;
4-
pub use crate::shortint::parameters::parameters_compact_pk::*;
5-
pub use crate::shortint::parameters::*;
4+
use crate::shortint::parameters::parameters_compact_pk::*;
5+
use crate::shortint::parameters::*;
66
use wasm_bindgen::prelude::*;
77

88
use std::panic::set_hook;
@@ -349,7 +349,7 @@ impl Shortint {
349349
let mut seeder = DeterministicSeeder::<ActivatedRandomGenerator>::new(Seed(seed));
350350
ShortintClientKey(
351351
crate::shortint::engine::ShortintEngine::new_from_seeder(&mut seeder)
352-
.new_client_key(parameters.0.try_into().unwrap()),
352+
.new_client_key(parameters.0.into()),
353353
)
354354
}
355355

tfhe/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ pub mod shortint;
9595
#[cfg(feature = "__wasm_api")]
9696
/// cbindgen:ignore
9797
mod js_on_wasm_api;
98-
#[cfg(feature = "__wasm_api")]
99-
pub use js_on_wasm_api::*;
10098

10199
#[cfg(all(
102100
doctest,
@@ -106,15 +104,15 @@ pub use js_on_wasm_api::*;
106104
))]
107105
mod test_user_docs;
108106

109-
/// cbindgen:ignore
110107
#[cfg(feature = "integer")]
108+
/// cbindgen:ignore
111109
pub(crate) mod high_level_api;
112110

113111
#[cfg(feature = "integer")]
114112
pub use high_level_api::*;
115113

116-
/// cbindgen:ignore
117114
#[cfg(any(test, doctest, feature = "internal-keycache"))]
115+
/// cbindgen:ignore
118116
pub mod keycache;
119117

120118
#[cfg(feature = "safe-deserialization")]

tfhe/src/shortint/parameters/parameters_wopbs_prime_moduli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pub use crate::core_crypto::commons::dispersion::{DispersionParameter, StandardDev};
1+
pub use crate::core_crypto::commons::dispersion::StandardDev;
22
pub use crate::core_crypto::commons::parameters::{
33
DecompositionBaseLog, DecompositionLevelCount, GlweDimension, LweDimension, PolynomialSize,
44
};

toolchain.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly-2023-10-17
1+
nightly-2023-11-30

0 commit comments

Comments
 (0)