Rotom
‘rotom’ Dialect
Dialect for Rotom’s layout representation. See the Rotom paper: https://eprint.iacr.org/2025/1319
Rotom attributes
DimAttr
A single Rotom layout dimension.
Syntax:
#rotom.dim<
int64_t, # dim
int64_t, # size
int64_t # stride
>
Encodes a traversal dimension: logical axis index, size, and stride.
Sentinel dim values (no source tensor axis):
-1: replication (logical fill along this layout piece)-2: gap (padding / unused slots; constrained to zero in materialization)
Non-negative dim values index into the logical tensor shape.
Parameters:
| Parameter | C++ type | Description |
|---|---|---|
| dim | int64_t | |
| size | int64_t | |
| stride | int64_t |
LayoutAttr
A Rotom layout made from an ordered list of dims.
Syntax:
#rotom.layout<
::mlir::ArrayAttr, # dims
int64_t # n
>
A Rotom layout is an ordered list of rotom.dim dimensions plus the slot
count n (ciphertext slot capacity).
The verifier determines which dims map across ciphertexts vs within slots and checks the slot-side invariant that sizes and strides are powers of two (after splitting).
For tensor_ext materialization, the first entry in dims is the
ciphertext side of Rotom’s ; split (one piece); remaining entries are
in-slot. See Section 4.2 of the Rotom paper.
Parameters:
| Parameter | C++ type | Description |
|---|---|---|
| dims | ::mlir::ArrayAttr | |
| n | int64_t |