From 746e5c280d3c221558748c9a866bd6a24665cfb2 Mon Sep 17 00:00:00 2001 From: Luis Montero Date: Tue, 4 Jun 2024 18:49:10 +0200 Subject: [PATCH] chore: debugging fhe inference in gh action --- src/concrete/ml/common/preprocessors.py | 2 +- .../evaluate_one_example_fhe.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/concrete/ml/common/preprocessors.py b/src/concrete/ml/common/preprocessors.py index 74bbfa2d6..bb75bdadc 100644 --- a/src/concrete/ml/common/preprocessors.py +++ b/src/concrete/ml/common/preprocessors.py @@ -1694,7 +1694,7 @@ def apply(self, graph: Graph) -> None: assert isinstance(lsbs_to_remove, int) assert isinstance(max_acc_size, int) - print(f"{number_of_tlus=}, {lsbs_to_remove=} {coefficients.shape=}, {offsets.shape=}") + # print(f"{number_of_tlus=}, {lsbs_to_remove=} {coefficients.shape=}, {offsets.shape=}") if number_of_tlus == -1: # Don't do here for now # print("SKIPPING NODE") diff --git a/use_case_examples/cifar/cifar_brevitas_training/evaluate_one_example_fhe.py b/use_case_examples/cifar/cifar_brevitas_training/evaluate_one_example_fhe.py index 469128968..a290f03d6 100644 --- a/use_case_examples/cifar/cifar_brevitas_training/evaluate_one_example_fhe.py +++ b/use_case_examples/cifar/cifar_brevitas_training/evaluate_one_example_fhe.py @@ -18,7 +18,7 @@ from concrete.ml.quantization import QuantizedModule from concrete.ml.torch.compile import compile_brevitas_qat_model -SIMULATE_ONLY = True +SIMULATE_ONLY = False CURRENT_DIR = Path(__file__).resolve().parent KEYGEN_CACHE_DIR = CURRENT_DIR.joinpath(".keycache") @@ -128,11 +128,11 @@ def wrapper(*args, **kwargs): open("cifar10.graph", "w").write(str(quantized_numpy_module.fhe_circuit)) open("cifar10.mlir", "w").write(quantized_numpy_module.fhe_circuit.mlir) -import sys - -if sys.platform == "darwin": - print("skipping fhe evaluation on darwin platform") - sys.exit(0) +# import sys +# +# if sys.platform == "darwin": +# print("skipping fhe evaluation on darwin platform") +# sys.exit(0) if not SIMULATE_ONLY: # Key generation