Skip to content

Commit

Permalink
Clean up include and build file
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 635488859
  • Loading branch information
tensorflower-gardener committed May 24, 2024
1 parent 3068334 commit a9f6952
Show file tree
Hide file tree
Showing 52 changed files with 4,366 additions and 1,061 deletions.
23 changes: 23 additions & 0 deletions tensorflow/compiler/mlir/lite/schema/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("@flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("//tensorflow:tensorflow.bzl", "tf_cc_test")
load("//tensorflow:tensorflow.default.bzl", "get_compatible_with_portable")

package(
Expand Down Expand Up @@ -69,3 +70,25 @@ cc_library(
"@flatbuffers",
],
)

# Schema test to make sure we don't introduce backward incompatible changes
# to schemas.
tf_cc_test(
name = "flatbuffer_compatibility_test",
size = "small",
srcs = ["flatbuffer_compatibility_test.cc"],
data = [
"schema.fbs",
"schema_v3b.fbs",
],
tags = [
"no_oss",
"tflite_not_portable_android",
"tflite_not_portable_ios",
],
deps = [
"//tensorflow/core/platform",
"@com_google_googletest//:gtest_main",
"@flatbuffers//:flatc_library",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ TEST(SchemaTest, TestCompatibility) {
// Read file contents of schemas into strings
// TODO(aselle): Need a reliable way to load files.
std::string base_contents, current_contents;
const char *base_filename = TFLITE_TF_PREFIX "lite/schema/schema_v3b.fbs";
const char *base_filename = TFLITE_TF_PREFIX
"compiler/mlir/lite/schema/schema_v3b.fbs";
const char *current_filename =
TFLITE_TF_PREFIX "lite/schema/schema.fbs";
TFLITE_TF_PREFIX "compiler/mlir/lite/schema/schema.fbs";

ASSERT_TRUE(LoadFileRaw(base_filename, &base_contents));
ASSERT_TRUE(LoadFileRaw(current_filename, &current_contents));
Expand Down
Loading

0 comments on commit a9f6952

Please sign in to comment.