fix(compiler/lowlfhe): lwe_ciphertext as memref element type

This commit is contained in:
Quentin Bourgerie
2021-08-23 18:10:12 +02:00
parent 7850b359f3
commit ce776c0eba
2 changed files with 13 additions and 6 deletions

View File

@@ -1,3 +1,9 @@
add_mlir_dialect(LowLFHEOps LowLFHE)
#add_mlir_doc(MidLFHEDialect -gen-dialect-doc MidLFHEDialect zamalang/)
#add_mlir_doc(MidLFHEOps -gen-op-doc MidLFHEOps zamalang/)
set(LLVM_TARGET_DEFINITIONS LowLFHEOps.td)
mlir_tablegen(LowLFHEOps.h.inc -gen-op-decls)
mlir_tablegen(LowLFHEOps.cpp.inc -gen-op-defs)
mlir_tablegen(LowLFHEOpsTypes.h.inc -gen-typedef-decls -typedefs-dialect=LowLFHE)
mlir_tablegen(LowLFHEOpsTypes.cpp.inc -gen-typedef-defs -typedefs-dialect=LowLFHE)
mlir_tablegen(LowLFHEOpsDialect.h.inc -gen-dialect-decls -dialect=LowLFHE)
mlir_tablegen(LowLFHEOpsDialect.cpp.inc -gen-dialect-defs -dialect=LowLFHE)
add_public_tablegen_target(MLIRLowLFHEOpsIncGen)
add_dependencies(mlir-headers MLIRLowLFHEOpsIncGen)

View File

@@ -1,10 +1,11 @@
#ifndef ZAMALANG_DIALECT_LowLFHE_IR_LowLFHE_TYPES
#define ZAMALANG_DIALECT_LowLFHE_IR_LowLFHE_TYPES
include "mlir/IR/BuiltinTypes.td"
include "zamalang/Dialect/LowLFHE/IR/LowLFHEDialect.td"
class LowLFHE_Type<string name> : TypeDef<LowLFHE_Dialect, name> { }
class LowLFHE_Type<string name, list<Trait> traits = []> : TypeDef<LowLFHE_Dialect, name, traits> { }
def EncryptionRandomGeneratorType : LowLFHE_Type<"EncryptionRandomGenerator"> {
let mnemonic = "enc_rand_gen";
@@ -113,7 +114,7 @@ def ForeignPlaintextListType : LowLFHE_Type<"ForeignPlaintextList"> {
}
def LweCiphertextType : LowLFHE_Type<"LweCiphertext"> {
def LweCiphertextType : LowLFHE_Type<"LweCiphertext", [MemRefElementTypeInterface]> {
let mnemonic = "lwe_ciphertext";
let summary = "LWE ciphertext";