Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #486 from WoutLegiest:tfhe-rs-fpga
PiperOrigin-RevId: 614037544
- Loading branch information
Showing
19 changed files
with
663 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# CGGIToTfheRustBool tablegen and headers. | ||
|
||
load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library") | ||
|
||
package( | ||
default_applicable_licenses = ["@heir//:license"], | ||
default_visibility = ["//visibility:public"], | ||
) | ||
|
||
exports_files( | ||
[ | ||
"CGGIToTfheRustBool.h", | ||
], | ||
) | ||
|
||
gentbl_cc_library( | ||
name = "pass_inc_gen", | ||
tbl_outs = [ | ||
( | ||
[ | ||
"-gen-pass-decls", | ||
"-name=CGGIToTfheRustBool", | ||
], | ||
"CGGIToTfheRustBool.h.inc", | ||
), | ||
( | ||
["-gen-pass-doc"], | ||
"CGGIToTfheRustBool.md", | ||
), | ||
], | ||
tblgen = "@llvm-project//mlir:mlir-tblgen", | ||
td_file = "CGGIToTfheRustBool.td", | ||
deps = [ | ||
"@llvm-project//mlir:OpBaseTdFiles", | ||
"@llvm-project//mlir:PassBaseTdFiles", | ||
], | ||
) |
16 changes: 16 additions & 0 deletions
16
include/Conversion/CGGIToTfheRustBool/CGGIToTfheRustBool.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#ifndef INCLUDE_CONVERSION_CGGITOTFHERUSTBOOL_CGGITOTFHERUSTBOOL_H_ | ||
#define INCLUDE_CONVERSION_CGGITOTFHERUSTBOOL_CGGITOTFHERUSTBOOL_H_ | ||
|
||
#include "mlir/include/mlir/Pass/Pass.h" // from @llvm-project | ||
|
||
namespace mlir::heir { | ||
|
||
#define GEN_PASS_DECL | ||
#include "include/Conversion/CGGIToTfheRustBool/CGGIToTfheRustBool.h.inc" | ||
|
||
#define GEN_PASS_REGISTRATION | ||
#include "include/Conversion/CGGIToTfheRustBool/CGGIToTfheRustBool.h.inc" | ||
|
||
} // namespace mlir::heir | ||
|
||
#endif // INCLUDE_CONVERSION_CGGITOTFHERUSTBOOL_CGGITOTFHERUSTBOOL_H_ |
16 changes: 16 additions & 0 deletions
16
include/Conversion/CGGIToTfheRustBool/CGGIToTfheRustBool.td
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#ifndef INCLUDE_CONVERSION_CGGITOTFHERUSTBOOL_CGGITOTFHERUSTBOOL_TD_ | ||
#define INCLUDE_CONVERSION_CGGITOTFHERUSTBOOL_CGGITOTFHERUSTBOOL_TD_ | ||
|
||
include "mlir/Pass/PassBase.td" | ||
|
||
def CGGIToTfheRustBool : Pass<"cggi-to-tfhe-rust-bool"> { | ||
let summary = "Lower `cggi` to `tfhe_rust_bool` dialect."; | ||
let dependentDialects = [ | ||
"mlir::arith::ArithDialect", | ||
"mlir::heir::cggi::CGGIDialect", | ||
"mlir::heir::lwe::LWEDialect", | ||
"mlir::heir::tfhe_rust_bool::TfheRustBoolDialect", | ||
]; | ||
} | ||
|
||
#endif // INCLUDE_CONVERSION_CGGITOTFHERUSTBOOL_CGGITOTFHERUSTBOOL_TD_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package( | ||
default_applicable_licenses = ["@heir//:license"], | ||
default_visibility = ["//visibility:public"], | ||
) | ||
|
||
cc_library( | ||
name = "CGGIToTfheRustBool", | ||
srcs = ["CGGIToTfheRustBool.cpp"], | ||
hdrs = [ | ||
"@heir//include/Conversion/CGGIToTfheRustBool:CGGIToTfheRustBool.h", | ||
], | ||
deps = [ | ||
"@heir//include/Conversion/CGGIToTfheRustBool:pass_inc_gen", | ||
"@heir//lib/Conversion:Utils", | ||
"@heir//lib/Dialect/CGGI/IR:Dialect", | ||
"@heir//lib/Dialect/LWE/IR:Dialect", | ||
"@heir//lib/Dialect/TfheRustBool/IR:Dialect", | ||
"@llvm-project//llvm:Support", | ||
"@llvm-project//mlir:ArithDialect", | ||
"@llvm-project//mlir:FuncDialect", | ||
"@llvm-project//mlir:IR", | ||
"@llvm-project//mlir:MemRefDialect", | ||
"@llvm-project//mlir:Pass", | ||
"@llvm-project//mlir:Support", | ||
"@llvm-project//mlir:TensorDialect", | ||
"@llvm-project//mlir:Transforms", | ||
], | ||
) |
Oops, something went wrong.