Skip to content
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

Preserve explicit optimizer partition frontiers for TFHE circuit parametrization #702

Merged
merged 6 commits into from
Mar 8, 2024

Commits on Mar 6, 2024

  1. feat(compiler): Add functions for type inference debugging to TypeInf…

    …erenceUtils
    
    The main debugging function is
    `TypeInferenceUtils::dumpAllState(mlir::Operation* op)` which dumps
    the entire state of type inference for the function containing `op`.
    andidr committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    3d16efb View commit details
    Browse the repository at this point in the history
  2. feat(compiler): Add dialect with operations related to the optimizer

    This adds a new dialect called `Optimizer` with operations related to
    the Concrete Optimizer. Currently, there is only one operation
    `optimizer.partition_frontier` that can be inserted between a producer
    and a consumer which belong to different partitions computed by the
    optimizer. The purpose of this operation is to preserve explicit key
    changes from the invocation of the optimizer on high-level dialects
    (i.e., FHELinalg / FHE) until the IR is provided with actual
    references to keys in low-level dialects (i.e., TFHE).
    andidr committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    8e660e2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a701b3a View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2024

  1. fix(compiler): Preserve explicit optimizer partition boundaries throu…

    …gh the pipeline
    
    The Concrete Optimizer is invoked on a representation of the program
    in the high-level FHELinalg / FHE Dialects and yields a solution with
    a one-to-one mapping of operations to keys. However, the abstractions
    used by these dialects do not allow for references to keys and the
    application of the solution is delayed until the pipeline reaches a
    representation of the program in the lower-level TFHE dialect. Various
    transformations applied by the pipeline along the way may break the
    one-to-one mapping and add indirections into producer-consumer
    relationships, resulting in ambiguous or partial mappings of TFHE
    operations to the keys. In particular, explicit frontiers between
    optimizer partitions may not be recovered.
    
    This commit preserves explicit frontiers between optimizer partitions
    as `optimizer.partition_frontier` operations and lowers these to
    keyswitch operations before parametrization of TFHE operations.
    andidr committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    9b68783 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b958914 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3219929 View commit details
    Browse the repository at this point in the history