Restrict visibility for micro libraries.
* testing library visible to all of micro but nothing else. * moved benchmark.h to micro/benchmarks so that it can have private visibility. PiperOrigin-RevId: 315729400 Change-Id: I695b9bb749de8748e9ac929ff612d6a9e7d33b3d
This commit is contained in:
parent
4acad672b7
commit
6e024748f6
@ -1,7 +1,16 @@
|
||||
# Benchmarks for the ambient music detection model.
|
||||
licenses(["notice"]) # Apache 2.0
|
||||
|
||||
package(
|
||||
licenses = ["notice"], # Apache 2.0
|
||||
cc_library(
|
||||
name = "micro_benchmark",
|
||||
hdrs = [
|
||||
"micro_benchmark.h",
|
||||
],
|
||||
deps = [
|
||||
"//tensorflow/lite/micro:micro_error_reporter",
|
||||
"//tensorflow/lite/micro:micro_framework",
|
||||
"//tensorflow/lite/micro:micro_time",
|
||||
"//tensorflow/lite/micro:op_resolvers",
|
||||
],
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
@ -45,12 +54,12 @@ cc_binary(
|
||||
srcs = ["keyword_benchmark.cc"],
|
||||
deps = [
|
||||
":keyword_scrambled_model_data",
|
||||
":micro_benchmark",
|
||||
"//tensorflow/lite/c:common",
|
||||
"//tensorflow/lite/micro:micro_error_reporter",
|
||||
"//tensorflow/lite/micro:micro_framework",
|
||||
"//tensorflow/lite/micro:op_resolvers",
|
||||
"//tensorflow/lite/micro/kernels:micro_ops",
|
||||
"//tensorflow/lite/micro/testing:micro_benchmark",
|
||||
],
|
||||
)
|
||||
|
||||
@ -58,6 +67,7 @@ cc_binary(
|
||||
name = "person_detection_benchmark",
|
||||
srcs = ["person_detection_benchmark.cc"],
|
||||
deps = [
|
||||
":micro_benchmark",
|
||||
"//tensorflow/lite:schema_fbs_version",
|
||||
"//tensorflow/lite/c:common",
|
||||
"//tensorflow/lite/micro:micro_error_reporter",
|
||||
@ -68,7 +78,6 @@ cc_binary(
|
||||
"//tensorflow/lite/micro/examples/person_detection:person_detect_model_data",
|
||||
"//tensorflow/lite/micro/examples/person_detection:simple_images_test_data",
|
||||
"//tensorflow/lite/micro/kernels:micro_ops",
|
||||
"//tensorflow/lite/micro/testing:micro_benchmark",
|
||||
"//tensorflow/lite/schema:schema_fbs",
|
||||
],
|
||||
)
|
||||
|
@ -18,11 +18,11 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/lite/c/common.h"
|
||||
#include "tensorflow/lite/micro/benchmarks/keyword_scrambled_model_data.h"
|
||||
#include "tensorflow/lite/micro/benchmarks/micro_benchmark.h"
|
||||
#include "tensorflow/lite/micro/kernels/micro_ops.h"
|
||||
#include "tensorflow/lite/micro/micro_error_reporter.h"
|
||||
#include "tensorflow/lite/micro/micro_interpreter.h"
|
||||
#include "tensorflow/lite/micro/micro_mutable_op_resolver.h"
|
||||
#include "tensorflow/lite/micro/testing/micro_benchmark.h"
|
||||
|
||||
/*
|
||||
* Keyword Spotting Benchmark for performance optimizations. The model used in
|
||||
|
@ -13,8 +13,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef TENSORFLOW_LITE_MICRO_TESTING_MICRO_BENCHMARK_H_
|
||||
#define TENSORFLOW_LITE_MICRO_TESTING_MICRO_BENCHMARK_H_
|
||||
#ifndef TENSORFLOW_LITE_MICRO_BENCHMARKS_MICRO_BENCHMARK_H_
|
||||
#define TENSORFLOW_LITE_MICRO_BENCHMARKS_MICRO_BENCHMARK_H_
|
||||
|
||||
#include <climits>
|
||||
|
||||
@ -116,4 +116,4 @@ class MicroBenchmarkRunner {
|
||||
tflite::MicroInterpreter interpreter_;
|
||||
};
|
||||
|
||||
#endif // TENSORFLOW_LITE_MICRO_TESTING_MICRO_BENCHMARK_H_
|
||||
#endif // TENSORFLOW_LITE_MICRO_BENCHMARKS_MICRO_BENCHMARK_H_
|
@ -14,6 +14,7 @@ limitations under the License.
|
||||
==============================================================================*/
|
||||
|
||||
#include "tensorflow/lite/c/common.h"
|
||||
#include "tensorflow/lite/micro/benchmarks/micro_benchmark.h"
|
||||
#include "tensorflow/lite/micro/examples/person_detection/model_settings.h"
|
||||
#include "tensorflow/lite/micro/examples/person_detection/no_person_image_data.h"
|
||||
#include "tensorflow/lite/micro/examples/person_detection/person_detect_model_data.h"
|
||||
@ -23,7 +24,6 @@ limitations under the License.
|
||||
#include "tensorflow/lite/micro/micro_interpreter.h"
|
||||
#include "tensorflow/lite/micro/micro_mutable_op_resolver.h"
|
||||
#include "tensorflow/lite/micro/micro_utils.h"
|
||||
#include "tensorflow/lite/micro/testing/micro_benchmark.h"
|
||||
#include "tensorflow/lite/schema/schema_generated.h"
|
||||
#include "tensorflow/lite/version.h"
|
||||
|
||||
|
@ -3,9 +3,16 @@ load(
|
||||
"tflite_micro_cc_test",
|
||||
)
|
||||
|
||||
package(
|
||||
default_visibility = ["//visibility:public"],
|
||||
licenses = ["notice"], # Apache 2.0
|
||||
licenses(["notice"]) # Apache 2.0
|
||||
|
||||
package_group(
|
||||
name = "micro",
|
||||
packages = ["//tensorflow/lite/micro/..."],
|
||||
)
|
||||
|
||||
package_group(
|
||||
name = "microfrontend",
|
||||
packages = ["//tensorflow/lite/experimental/microfrontend/..."],
|
||||
)
|
||||
|
||||
exports_files(["test_linux_binary.sh"])
|
||||
@ -19,6 +26,10 @@ cc_library(
|
||||
"micro_test.h",
|
||||
"test_utils.h",
|
||||
],
|
||||
visibility = [
|
||||
":micro",
|
||||
":microfrontend",
|
||||
],
|
||||
deps = [
|
||||
"//tensorflow/lite/c:common",
|
||||
"//tensorflow/lite/core/api",
|
||||
@ -39,19 +50,6 @@ tflite_micro_cc_test(
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "micro_benchmark",
|
||||
hdrs = [
|
||||
"micro_benchmark.h",
|
||||
],
|
||||
deps = [
|
||||
"//tensorflow/lite/micro:micro_error_reporter",
|
||||
"//tensorflow/lite/micro:micro_framework",
|
||||
"//tensorflow/lite/micro:micro_time",
|
||||
"//tensorflow/lite/micro:op_resolvers",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "test_conv_model",
|
||||
srcs = [
|
||||
@ -60,6 +58,9 @@ cc_library(
|
||||
hdrs = [
|
||||
"test_conv_model.h",
|
||||
],
|
||||
visibility = [
|
||||
":micro",
|
||||
],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
|
Loading…
Reference in New Issue
Block a user