Commit Graph

3351 Commits

Author SHA1 Message Date
Alexandre Péré
9b5a2e46da feat(compiler): support multi-circuit compilation 2024-03-01 15:35:52 +01:00
Umut
3247a28d9d feat(frontend-python): additional graph processors nightly-2024.02.29 nightly-2024.02.28 nightly-2024.02.27 nightly-2024.03.01 2024-02-26 19:09:13 +03:00
Antoniu Pop
bda568ab6b feat(compiler): distributed execution - on-demand key transfer to remote nodes. nightly-2024.02.24 2024-02-23 13:55:52 +00:00
Antoniu Pop
e67aa9b499 feat(compiler): upgrade HPX library version to 1.9.1. 2024-02-23 11:47:37 +00:00
Antoniu Pop
da1f30023f feat(compiler): upgrade HPX library version to 1.9.1. 2024-02-23 10:31:18 +00:00
rudy
2f7d3ff2cc chore(frontend-python): private release tests nightly-2024.02.23 nightly-2024.02.22 2024-02-21 17:11:15 +01:00
rudy
1a4de9beae fix(frontend-python): declare graphviz pytest mark 2024-02-21 17:08:58 +01:00
rudy
da2134337e fix(frontend-python): package test should not install graphviz on macos 2024-02-21 17:08:58 +01:00
rudy
de0af6638c fix(frontend-python): package test should install extra requires on linux 2024-02-21 14:07:47 +01:00
rudy
e1d7be02c6 fix(frontend-python): macos os tests without graphviz nightly-2024.02.21 2024-02-20 17:23:58 +01:00
Umut
29503dfc17 feat(compiler): fusing table lookups 2024-02-20 12:39:57 +01:00
Umut
efc9314d25 fix(frontend-python): stop crashing on scalar squeeze 2024-02-20 12:37:48 +01:00
Umut
565e6f2796 feat(frontend-python): identity extension 2024-02-20 12:37:48 +01:00
Bourgerie Quentin
22bbdec086 fix(ci/compiler): Remove KeySetCache directory on mac os CI to avoid space disk issues 2024-02-20 09:17:13 +01:00
Alexandre Péré
c53985f112 fix(compiler): fix double free on aliased outputs nightly-2024.02.20 2024-02-19 16:14:12 +01:00
rudy
b324ca8391 fix(frontend-python): bitwise tests coverage nightly-2024.02.17 2024-02-16 13:47:38 +01:00
rudy
9fdb959beb fix(frontend-python): failure to display invalid input set value nightly-2024.02.16 2024-02-15 17:13:05 +01:00
yuxizama
34628ec6c5 docs(common): Update Readme.md structure nightly-2024.02.15 2024-02-14 15:31:10 +01:00
Alexandre Péré
d1b62462f2 fix(compiler): fix mac arm exception propagation
On Mac arm, the c api backing the python bindings does not propagate the
exceptions properly to the concretelang python module. This makes all
exceptions raised through `CompilerEngine.cpp` fall in the catch-all
case of the pybind exceptions handler.

Since there is no particular need for a public c api, we just remove it
from the bindings, and move all the content of `CompilerEngine.cpp`
directly in the `CompilerAPIModule.cpp` file.
2024-02-14 15:08:19 +01:00
Bourgerie Quentin
a654e68eab chore(ci): Update cuda version nightly-2024.02.14 2024-02-13 17:02:46 +01:00
Bourgerie Quentin
712924a297 test(frontend-python): Temporary skip test_minimum_maximum on multi parameter optimization waiting parametrization fixes 2024-02-13 17:02:46 +01:00
Bourgerie Quentin
1545779e6a chore(ci): Cleanup main jobs dispatch 2024-02-13 17:02:46 +01:00
Bourgerie Quentin
bdc1151356 chore(compiler): Update dockers base image 2024-02-13 17:02:46 +01:00
Bourgerie Quentin
ebea2e3cae chore(ci): Reduce number of compiler test for macos 2024-02-13 17:02:46 +01:00
rudy
0376a175a9 fix(frontend-python): test_min_max, extend marking xfail 2024-02-13 17:02:46 +01:00
Bourgerie Quentin
dd62426320 chore(ci): Cleanup host tmp dir even if tests fails 2024-02-13 17:02:46 +01:00
Bourgerie Quentin
aa5d7edfbc chore(ci): Fix package name for testing wheel 2024-02-13 17:02:46 +01:00
Bourgerie Quentin
f9e3cb0735 chore(ci): Fix tag filtering 2024-02-13 17:02:46 +01:00
Bourgerie Quentin
5687bce9e3 chore(frontend-python): Fix hack for multiple omp library in macos tests 2024-02-13 17:02:46 +01:00
Bourgerie Quentin
3b94f3b84e chore(compiler): Fixing docker build issue by cleaning dnf and set the right rust nighlty version 2024-02-13 17:02:46 +01:00
Bourgerie Quentin
7c3e4388aa chore(ci): Use a stable version of the nightly rust toolchain for concrete-cpu build 2024-02-13 17:02:46 +01:00
Bourgerie Quentin
b29aa78a1f chore(optimizer): Remove nightly check as it randomy fail because of the unstable version 2024-02-13 17:02:46 +01:00
Bourgerie Quentin
5b3ab5f4b3 chore(ci): Trigger main jobs on push on release branches 2024-02-13 17:02:46 +01:00
rudy
86e88443fc feat(optimizer): accept high precision weight nightly-2024.02.13 nightly-2024.02.10 nightly-2024.02.09 2024-02-08 17:53:23 +01:00
rudy
c5692397b4 chore(frontend-python): converter, getattr call with default nightly-2024.02.08 nightly-2024.02.07 2024-02-06 15:11:20 +01:00
Umut
965f5d2780 chore(ci): run apt update before apt install during python release 2024-02-06 08:59:37 +01:00
Andi Drebes
972eb962ee test(compiler): Add check tests for type inference
Add various check tests for type inference testing forward and
backward propagation, including propagation into nested regions.
nightly-2024.02.06 nightly-2024.02.03
2024-02-01 16:18:45 +01:00
Andi Drebes
21a7eead6c refactor(compiler): Re-implement TFHE multi-parameter parametrization with type inference
The current pass applying the parameters determined by the optimizer
to the IR propagates the parametrized TFHE types to operations not
directly tagged with an optimizer ID only under certain conditions. In
particular, it does not always properly propagate types into nested
regions (e.g., of `scf.for` loops).

This burdens preceding transformations that are applied in between the
invocation of the optimizer and the parametrization pass with
data-flow analysis and book-keeping in order to tag newly inserted
operations with the right optimizer IDs that ensure proper
parametrization.

This commit replaces the current parametrization pass with a new pass
that propagates parametrized TFHE types up and down def-use chains
using type inference and a proper rewriter. The pass is limited to the
operations supported by `TFHEParametrizationTypeResolver::resolve`.
2024-02-01 16:18:45 +01:00
Andi Drebes
775171c69d fix(compiler): Run canonicalizer after TFHE circuit parametrization
In order to avoid leftover TFHE operations to be lowered further down
the pipeline after parametrization, run the canonicalizer, which
includes dead code eliminiation.
2024-02-01 16:18:45 +01:00
Andi Drebes
bc171dde82 test(compiler): Run canonicalizer in TFHE parametrization tests 2024-02-01 16:18:45 +01:00
Andi Drebes
79d8337026 feat(compiler): Add support for batched keyswitch ops in TFHE key normalization 2024-02-01 16:18:45 +01:00
Andi Drebes
1faeb2d10d feat(compiler): Add rewriter applying the results from type inference
This adds the `TypeInferenceRewriter` class, which applies the results
for type inference obtained from the state of a `DataFlowSolver` and
from a final invocation of a type resolver to a module.
2024-02-01 16:18:45 +01:00
Andi Drebes
43180a70be feat(compiler): Add infrastructure for type inference
Type inference is implemented through the two classes
`ForwardTypeInferenceAnalysis` and `BackwardTypeInferenceAnalysis`,
which can be used as forward and backward dataflow analyses with the
MLIR sparse dataflow analysis framework.

Both classes rely on a type resolver, which must be a class inheriting
`TypeResolver` and that specifies which types are to be considered as
unresolved and that resolves the actual types for the values related
to an operation based on the previous state of type inference.

The type inference state for an operation is represented by an
instance of the class `LocalInferenceState`, which maps the values
related to an operation to instances of `InferredType` (either
indicating the inferred type as an `mlir::Type` or indicating that no
type has been inferred, yet).

The local type inference by a type resolver can be implemented with
type constraints (instances of sub-classes of `TypeConstraint`), which
can be combined into a `TypeConstraintSet`. The latter provides a
function that attempts to apply the constraints until the resulting
type inference state converges.

There are multiple, predefined type constraint classes for common
constraints (e.g., if two values must have the same type or the same
element type). These exist both as static constraints and as dynamic
constraints. Some pre-defined type constraints depend on a class that
yields a pair of values for which the contraints shall be applied
(e.g., yielding two operands or an operand and a result, etc.).
2024-02-01 16:18:45 +01:00
Andi Drebes
e78883cc24 feat(compiler): Add a dialect for type inference debugging
The `TypeInference` dialect provides three operations.

The operation `TypeInference.propagate_downwards` respresents a type
barrier, which is supposed to forward the type of its operand as its
result type during type inference.

The operation `TypeInference.propagate_upwards` also respresents a
type barrier, but is supposed to forward the type of its result as the
type for its operand during type inference.

The operation `TypeInference.unresolved_conflict` can be used as a
marker when two different types have beed inferred for a value (e.g.,
one type during forward dataflow analysis and the other during
backward dataflow analysis)
2024-02-01 16:18:45 +01:00
Andi Drebes
9ca9369413 chore(compiler): Bump MLIR fork to version with fix for backward dataflow analysis 2024-02-01 16:18:45 +01:00
Andi Drebes
8b1c6ab034 fix(compiler): Fix typos in the summaries of batched TFHE ops 2024-02-01 16:18:45 +01:00
Umut
000ca60062 feat(frontend-python): if then else extension nightly-2024.02.02 2024-02-01 12:18:52 +02:00
Umut
868a910e23 chore(frontend-python): fix pylint warnings 2024-02-01 12:18:52 +02:00
rudy
fe4735162f fix(ci): use bigger storage to account for keys in concrete tests 2024-02-01 10:22:09 +02:00
Andi Drebes
8d71dc2028 feat(compiler): Add verifier to TFHE.encode_expand_lut_for_bootstrap nightly-2024.02.01 nightly-2024.01.30 nightly-2024.01.31 2024-01-29 15:35:14 +01:00