STT-tensorflow/tensorflow/compiler/mlir/lite/tests/flatbuffer2mlir/BUILD
Geoffrey Martin-Noble 1248bc9c61 Use Bazel target names aligned with upstream library names
PiperOrigin-RevId: 315818787
Change-Id: I5388e0e071a943b240ff76b1639bbaab83d606a1
2020-06-10 19:57:02 -07:00

76 lines
2.0 KiB
Python

load("//tensorflow/compiler/mlir:glob_lit_test.bzl", "glob_lit_tests")
load("//tensorflow:tensorflow.bzl", "tf_native_cc_binary")
licenses(["notice"])
glob_lit_tests(
data = [
":extra_files",
":test_utilities",
],
driver = "@llvm-project//mlir:run_lit.sh",
test_file_exts = [
"mlir",
"cc",
"json",
],
)
# Bundle together all of the test utilities that are used by tests.
filegroup(
name = "test_utilities",
testonly = True,
data = [
":importer_test_legacy_reshape",
":importer_test_min_max",
":test_schema.fbs",
"//tensorflow/compiler/mlir/lite:flatbuffer_to_string",
"//tensorflow/compiler/mlir/lite:flatbuffer_translate",
"//tensorflow/compiler/mlir/lite:json_to_flatbuffer",
"@llvm-project//llvm:FileCheck",
],
)
# Bundle together all the files that are used by the non-mlir file-based tests.
filegroup(
name = "extra_files",
srcs = glob(
[
"**/importer_test_min_max.cc.mlir",
"**/reshape.mlir",
],
),
)
# A binary to inject min/max to a tflite model.
# A file check command is used to verify the imported result from this
# binary format.
tf_native_cc_binary(
name = "importer_test_min_max",
srcs = [
"importer_test_min_max.cc",
],
deps = [
"//tensorflow/lite:framework",
"//tensorflow/lite/schema:schema_fbs",
"@com_google_absl//absl/strings",
"@llvm-project//llvm:Support",
],
)
# A binary to produce legacy shape op which doesn't use the second operand.
# A file check command is used to verify the imported result from this
# binary format.
tf_native_cc_binary(
name = "importer_test_legacy_reshape",
srcs = [
"importer_test_legacy_reshape.cc",
],
deps = [
"//tensorflow/lite:framework",
"//tensorflow/lite/schema:schema_fbs",
"@com_google_absl//absl/strings",
"@llvm-project//llvm:Support",
],
)