Orion
‘orion’ Dialect
The orion dialect is an entry dialect for the Orion compiler
into the heir ecosystem. It is primarily intended to enable comparisons between Orion and HEIR.
Because an existing translator was written that converts from Orion to HEIR’s CKKS dialect, this dialect serves to include the ops not supported by the CKKS dialect, but which are expressed as black boxes by Orion.
Orion ops
orion.chebyshev (heir::orion::ChebyshevOp)
Evaluates a Chebyshev polynomial on a ciphertext using pre-computed coefficients
Syntax:
operation ::= `orion.chebyshev` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes:
| Attribute | MLIR Type | Description |
|---|---|---|
coefficients | ::mlir::ArrayAttr | array attribute |
domain_start | ::mlir::FloatAttr | An Attribute containing a floating-point value |
domain_end | ::mlir::FloatAttr | An Attribute containing a floating-point value |
Operands:
| Operand | Description |
|---|---|
input | A ciphertext type |
Results:
| Result | Description |
|---|---|
result | A ciphertext type |
orion.linear_transform (heir::orion::LinearTransformOp)
Apply a linear transformation to the input ciphertext using pre-computed diagonals
Syntax:
operation ::= `orion.linear_transform` operands attr-dict `:` functional-type(operands, results)
This operation applies a linear transformation on a ciphertext using the provided float diagonals.
The diagonals input is a tensor where each row represents one non-zero
diagonal of the square matrix to evaluate.
The diagonal_indices attribute specifies the index of each corresponding diagonal
in diagonals. I.e., the first diagonal in the original matrix may have been zero
and omitted, and as a result the first entry of diagonals corresponds to
the diagonal with index diagonal_indices[0], and so on.
The orion_level attribute specifies the modulus level at which the operation
should be performed.
The bsgs_ratio attribute is used to optimize the linear transformation
using the baby-step giant-step algorithm.
The slots attribute specifies the number of slots in the ciphertext.
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes:
| Attribute | MLIR Type | Description |
|---|---|---|
diagonal_indices | ::mlir::DenseI32ArrayAttr | i32 dense array attribute |
orion_level | ::mlir::IntegerAttr | An Attribute containing a integer value |
bsgs_ratio | ::mlir::FloatAttr | An Attribute containing a floating-point value |
slots | ::mlir::IntegerAttr | An Attribute containing a integer value |
Operands:
| Operand | Description |
|---|---|
input | A ciphertext type |
diagonals | floating-point-like |
Results:
| Result | Description |
|---|---|
result | A ciphertext type |