Skip to content

Commit 62e10bb

Browse files
committed
Follow upstream changes on naming
1 parent ae4b18d commit 62e10bb

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

lib/Dialect/BGV/IR/BGVOps.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def BGV_RotateColumnsOp : BGV_Op<"rotate_cols", [AllTypesMatch<["input", "output
107107

108108
let arguments = (ins
109109
LWECiphertext:$input,
110-
Builtin_IntegerAttr:$offset
110+
Builtin_IntegerAttr:$static_shift
111111
);
112112

113113
let results = (outs
@@ -133,7 +133,7 @@ def BGV_RotateRowsOp : BGV_Op<"rotate_rows", [AllTypesMatch<["input", "output"]>
133133

134134
let arguments = (ins
135135
LWECiphertext:$input,
136-
Builtin_IntegerAttr:$offset
136+
Builtin_IntegerAttr:$static_shift
137137
);
138138

139139
let results = (outs

lib/Dialect/CKKS/IR/CKKSOps.td

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def CKKS_RotateOp : CKKS_Op<"rotate", [AllTypesMatch<["input", "output"]>]> {
9797

9898
let arguments = (ins
9999
LWECiphertext:$input,
100-
Builtin_IntegerAttr:$offset
100+
Builtin_IntegerAttr:$static_shift
101101
);
102102

103103
let results = (outs
@@ -173,9 +173,6 @@ def CKKS_RelinearizeOp : CKKS_Op<"relinearize", [SameOperandsAndResultRings,
173173
let results = (outs
174174
LWECiphertext:$output
175175
);
176-
177-
// let hasVerifier = 1;
178-
let assemblyFormat = "operands attr-dict `:` qualified(type($input)) `->` qualified(type($output))" ;
179176
}
180177

181178
def CKKS_RescaleOp : CKKS_Op<"rescale"> {

lib/Dialect/LWE/Conversions/LWEToOpenfhe/LWEToOpenfhe.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,11 @@ struct ConvertRotateOp : public OpConversionPattern<RotateOp> {
114114
Value cryptoContext = result.value();
115115
Location loc = op.getLoc();
116116

117-
// Get the rotation index
118-
auto rotIndexAttr = adaptor.getOffset();
119-
int64_t rotIndex = rotIndexAttr.getInt();
117+
// Get the rotation index, normalized to i64 so the kmrt key type and the
118+
// arith.constant agree regardless of whether the input attr was i32/i64.
119+
auto rotIndexAttrIn = adaptor.getStaticShift();
120+
int64_t rotIndex = rotIndexAttrIn.getInt();
121+
auto rotIndexAttr = rewriter.getI64IntegerAttr(rotIndex);
120122

121123
// Create a constant for the rotation index
122124
Value rotIndexValue = rewriter.create<mlir::arith::ConstantOp>(

0 commit comments

Comments
 (0)