Skip to content

Commit

Permalink
chore: debugging fhe inference in gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
fd0r committed Jun 4, 2024
1 parent 364dc5a commit 746e5c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/concrete/ml/common/preprocessors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 746e5c2

Please sign in to comment.