-
Notifications
You must be signed in to change notification settings - Fork 207
Ns/versionize clean #1326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ns/versionize clean #1326
Changes from all commits
66de07a
3e74923
6dd23f2
76521d8
0adda8a
3179349
e584417
c01e933
ebf35c9
3f3fc99
14caba8
61aeb93
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ target/ | |
# In case of symlinked keys | ||
/keys | ||
|
||
**/*.rmeta | ||
**/Cargo.lock | ||
**/*.bin | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ BENCH_OP_FLAVOR?=DEFAULT | |
NODE_VERSION=22 | ||
FORWARD_COMPAT?=OFF | ||
BACKWARD_COMPAT_DATA_URL=https://github.com/zama-ai/tfhe-backward-compat-data.git | ||
BACKWARD_COMPAT_DATA_BRANCH=v0.1 | ||
IceTDrinker marked this conversation as resolved.
Show resolved
Hide resolved
|
||
BACKWARD_COMPAT_DATA_DIR=tfhe-backward-compat-data | ||
# sed: -n, do not print input stream, -e means a script/expression | ||
# 1,/version/ indicates from the first line, to the line matching version at the start of the line | ||
|
@@ -148,6 +149,11 @@ install_tarpaulin: install_rs_build_toolchain | |
cargo $(CARGO_RS_BUILD_TOOLCHAIN) install cargo-tarpaulin --locked || \ | ||
( echo "Unable to install cargo tarpaulin, unknown error." && exit 1 ) | ||
|
||
.PHONY: install_tfhe_lints # Install custom tfhe-rs lints | ||
install_tfhe_lints: | ||
(cd utils/cargo-tfhe-lints-inner && cargo install --path .) && \ | ||
cd utils/cargo-tfhe-lints && cargo install --path . | ||
Comment on lines
+152
to
+155
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does it try to reinstall everytime ? My main question here being that if the tool gets updated does the install step try to update the already installed tool ? Alternatively is the installation mandatory or could it be run as a standalone executable maybe ? Separate question: does it require a dedicated toolchain as was shown in the tutorial ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes this is reinstalled every times but if its code did not change it is instant. Yes it needs a specific toolchain which is the one used by rustc-tools. The toolchain is specified in the toolchain.txt. Only the |
||
|
||
.PHONY: check_linelint_installed # Check if linelint newline linter is installed | ||
check_linelint_installed: | ||
@printf "\n" | linelint - > /dev/null 2>&1 || \ | ||
|
@@ -330,6 +336,11 @@ clippy_cuda_backend: install_rs_check_toolchain | |
RUSTFLAGS="$(RUSTFLAGS)" cargo "$(CARGO_RS_CHECK_TOOLCHAIN)" clippy --all-targets \ | ||
-p tfhe-cuda-backend -- --no-deps -D warnings | ||
|
||
.PHONY: tfhe_lints # Run custom tfhe-rs lints | ||
tfhe_lints: install_tfhe_lints | ||
cd tfhe && RUSTFLAGS="$(RUSTFLAGS)" cargo tfhe-lints \ | ||
--features=$(TARGET_ARCH_FEATURE),boolean,shortint,integer -- -D warnings | ||
|
||
.PHONY: build_core # Build core_crypto without experimental features | ||
build_core: install_rs_build_toolchain install_rs_check_toolchain | ||
RUSTFLAGS="$(RUSTFLAGS)" cargo $(CARGO_RS_BUILD_TOOLCHAIN) build --profile $(CARGO_PROFILE) \ | ||
|
@@ -1037,7 +1048,7 @@ write_params_to_file: install_rs_check_toolchain | |
|
||
.PHONY: clone_backward_compat_data # Clone the data repo needed for backward compatibility tests | ||
clone_backward_compat_data: | ||
./scripts/clone_backward_compat_data.sh $(BACKWARD_COMPAT_DATA_URL) tfhe/$(BACKWARD_COMPAT_DATA_DIR) | ||
./scripts/clone_backward_compat_data.sh $(BACKWARD_COMPAT_DATA_URL) $(BACKWARD_COMPAT_DATA_BRANCH) tfhe/$(BACKWARD_COMPAT_DATA_DIR) | ||
|
||
tfhe/$(BACKWARD_COMPAT_DATA_DIR): clone_backward_compat_data | ||
|
||
|
@@ -1067,7 +1078,7 @@ sha256_bool: install_rs_check_toolchain | |
|
||
.PHONY: pcc # pcc stands for pre commit checks (except GPU) | ||
pcc: no_tfhe_typo no_dbg_log check_fmt lint_doc check_md_docs_are_tested check_intra_md_links \ | ||
clippy_all check_compile_tests | ||
clippy_all tfhe_lints check_compile_tests | ||
|
||
.PHONY: pcc_gpu # pcc stands for pre commit checks for GPU compilation | ||
pcc_gpu: clippy_gpu clippy_cuda_backend check_compile_tests_benches_gpu | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use tfhe_versionable::VersionsDispatch; | ||
|
||
use crate::boolean::ciphertext::{Ciphertext, CompressedCiphertext}; | ||
|
||
#[derive(VersionsDispatch)] | ||
pub enum CiphertextVersions { | ||
V0(Ciphertext), | ||
} | ||
|
||
#[derive(VersionsDispatch)] | ||
pub enum CompressedCiphertextVersions { | ||
V0(CompressedCiphertext), | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
use tfhe_versionable::VersionsDispatch; | ||
|
||
use crate::boolean::client_key::ClientKey; | ||
|
||
#[derive(VersionsDispatch)] | ||
pub enum ClientKeyVersions { | ||
V0(ClientKey), | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
use tfhe_versionable::VersionsDispatch; | ||
|
||
use crate::boolean::key_switching_key::KeySwitchingKey; | ||
|
||
#[derive(VersionsDispatch)] | ||
pub enum KeySwitchingKeyVersions { | ||
V0(KeySwitchingKey), | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pub mod ciphertext; | ||
pub mod client_key; | ||
pub mod key_switching_key; | ||
pub mod parameters; | ||
pub mod public_key; | ||
pub mod server_key; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use tfhe_versionable::VersionsDispatch; | ||
|
||
use crate::boolean::parameters::{BooleanKeySwitchingParameters, BooleanParameters}; | ||
|
||
#[derive(VersionsDispatch)] | ||
pub enum BooleanParametersVersions { | ||
V0(BooleanParameters), | ||
} | ||
|
||
#[derive(VersionsDispatch)] | ||
pub enum BooleanKeySwitchingParametersVersions { | ||
V0(BooleanKeySwitchingParameters), | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use tfhe_versionable::VersionsDispatch; | ||
|
||
use crate::boolean::public_key::{CompressedPublicKey, PublicKey}; | ||
|
||
#[derive(VersionsDispatch)] | ||
pub enum PublicKeyVersions { | ||
V0(PublicKey), | ||
} | ||
|
||
#[derive(VersionsDispatch)] | ||
pub enum CompressedPublicKeyVersions { | ||
V0(CompressedPublicKey), | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use tfhe_versionable::VersionsDispatch; | ||
|
||
use crate::boolean::server_key::{CompressedServerKey, ServerKey}; | ||
|
||
#[derive(VersionsDispatch)] | ||
pub enum ServerKeyVersions { | ||
V0(ServerKey), | ||
} | ||
|
||
#[derive(VersionsDispatch)] | ||
pub enum CompressedServerKeyVersions { | ||
V0(CompressedServerKey), | ||
} |
Uh oh!
There was an error while loading. Please reload this page.