-
Notifications
You must be signed in to change notification settings - Fork 65
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 #422 from j2kun:openfhe-e2e-test-harness
PiperOrigin-RevId: 604368990
- Loading branch information
Showing
6 changed files
with
209 additions
and
0 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,7 @@ | ||
# This build file is necessary to mark this directory as a subpackage for bazel | ||
# to have access to the files. | ||
|
||
package( | ||
default_applicable_licenses = ["@heir//:license"], | ||
default_visibility = ["//visibility:public"], | ||
) |
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,13 @@ | ||
--- src/core/include/config_core.h | ||
+++ src/core/include/config_core.h | ||
@@ -0,0 +1,10 @@ | ||
+// This file is normally generated by CMake; we check it in for bazel builds. | ||
+ | ||
+#define WITH_BE2 | ||
+#define WITH_BE4 | ||
+/* #undef WITH_NTL */ | ||
+/* #undef WITH_TCM */ | ||
+ | ||
+#define HAVE_INT64 TRUE | ||
+#define NATIVEINT 64 | ||
+#define CKKS_M_FACTOR 1 |
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,19 @@ | ||
package( | ||
default_visibility = ["//visibility:public"], | ||
features = ["-use_header_modules"], # Incompatible with -fexceptions. | ||
) | ||
|
||
licenses(["notice"]) | ||
|
||
cc_library( | ||
name = "cereal", | ||
copts = ["-fexceptions"], | ||
includes = ["include"], | ||
textual_hdrs = glob([ | ||
"include/**/*.hpp", | ||
"include/**/*.h", | ||
]), | ||
deps = [ | ||
"@rapidjson", | ||
], | ||
) |
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,96 @@ | ||
# BUILD file for a bazel-native OpenFHE build | ||
|
||
package( | ||
default_visibility = ["//visibility:public"], | ||
features = [ | ||
"-layering_check", # Incompatible with `#include "gtest/gtest.h"` | ||
"-use_header_modules", # Incompatible with -fexceptions. | ||
], | ||
) | ||
|
||
licenses(["notice"]) | ||
|
||
OPENFHE_VERSION_MAJOR = 1 | ||
|
||
OPENFHE_VERSION_MINOR = 11 | ||
|
||
OPENFHE_VERSION_PATCH = 3 | ||
|
||
OPENFHE_VERSION = "{}.{}.{}".format(OPENFHE_VERSION_MAJOR, OPENFHE_VERSION_MINOR, OPENFHE_VERSION_PATCH) | ||
|
||
OPENFHE_COPTS = [ | ||
"-Wno-non-virtual-dtor", | ||
"-Wno-shift-op-parentheses", | ||
"-Wno-unused-private-field", | ||
"-fexceptions", | ||
] | ||
|
||
OPENFHE_DEFINES = [ | ||
"MATHBACKEND=2", | ||
"OMP_NUM_THREADS=1", | ||
"OPENFHE_VERSION=" + OPENFHE_VERSION, | ||
] | ||
|
||
cc_library( | ||
name = "core", | ||
srcs = glob([ | ||
"src/core/lib/**/*.c", | ||
"src/core/lib/**/*.cpp", | ||
]), | ||
copts = OPENFHE_COPTS + [ | ||
# /utils/blockAllocator/blockAllocator.cpp has misaligned-pointer-use | ||
"-fno-sanitize=alignment", | ||
], | ||
defines = OPENFHE_DEFINES, | ||
includes = [ | ||
"src/core/include", | ||
"src/core/lib", | ||
], | ||
textual_hdrs = glob([ | ||
"src/core/include/**/*.h", | ||
"src/core/lib/**/*.cpp", | ||
]), | ||
deps = ["@cereal"], | ||
) | ||
|
||
cc_library( | ||
name = "binfhe", | ||
srcs = glob([ | ||
"src/binfhe/lib/**/*.c", | ||
"src/binfhe/lib/**/*.cpp", | ||
]), | ||
copts = OPENFHE_COPTS, | ||
defines = OPENFHE_DEFINES, | ||
includes = [ | ||
"src/binfhe/include", | ||
"src/binfhe/lib", | ||
], | ||
textual_hdrs = glob(["src/binfhe/include/**/*.h"]), | ||
deps = [ | ||
"@openfhe//:core", | ||
], | ||
) | ||
|
||
cc_library( | ||
name = "pke", | ||
srcs = glob([ | ||
"src/pke/lib/**/*.cpp", | ||
]), | ||
copts = OPENFHE_COPTS + [ | ||
"-Wno-vla-extension", | ||
], | ||
defines = OPENFHE_DEFINES, | ||
includes = [ | ||
"src/pke/include", | ||
"src/pke/lib", | ||
], | ||
textual_hdrs = glob([ | ||
"src/pke/include/**/*.h", | ||
"src/pke/lib/**/*.cpp", | ||
]), | ||
deps = [ | ||
"@cereal", | ||
"@openfhe//:binfhe", | ||
"@openfhe//:core", | ||
], | ||
) |
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,48 @@ | ||
package( | ||
default_visibility = ["//visibility:public"], | ||
features = ["-use_header_modules"], # Incompatible with -fexceptions. | ||
) | ||
|
||
licenses(["notice"]) | ||
|
||
cc_library( | ||
name = "rapidjson", | ||
srcs = [ | ||
"include/rapidjson/internal/biginteger.h", | ||
"include/rapidjson/internal/diyfp.h", | ||
"include/rapidjson/internal/dtoa.h", | ||
"include/rapidjson/internal/ieee754.h", | ||
"include/rapidjson/internal/itoa.h", | ||
"include/rapidjson/internal/meta.h", | ||
"include/rapidjson/internal/pow10.h", | ||
"include/rapidjson/internal/regex.h", | ||
"include/rapidjson/internal/stack.h", | ||
"include/rapidjson/internal/strfunc.h", | ||
"include/rapidjson/internal/strtod.h", | ||
"include/rapidjson/internal/swap.h", | ||
], | ||
hdrs = [ | ||
"include/rapidjson/allocators.h", | ||
"include/rapidjson/document.h", | ||
"include/rapidjson/encodedstream.h", | ||
"include/rapidjson/encodings.h", | ||
"include/rapidjson/error/en.h", | ||
"include/rapidjson/error/error.h", | ||
"include/rapidjson/filereadstream.h", | ||
"include/rapidjson/filewritestream.h", | ||
"include/rapidjson/fwd.h", | ||
"include/rapidjson/istreamwrapper.h", | ||
"include/rapidjson/memorybuffer.h", | ||
"include/rapidjson/memorystream.h", | ||
"include/rapidjson/ostreamwrapper.h", | ||
"include/rapidjson/pointer.h", | ||
"include/rapidjson/prettywriter.h", | ||
"include/rapidjson/rapidjson.h", | ||
"include/rapidjson/reader.h", | ||
"include/rapidjson/schema.h", | ||
"include/rapidjson/stream.h", | ||
"include/rapidjson/stringbuffer.h", | ||
"include/rapidjson/writer.h", | ||
], | ||
includes = ["include"], | ||
) |