Employ tf_platform_alias for TFLite GPU custom_parsers.

PiperOrigin-RevId: 306731712
Change-Id: I58bfc7bd622891ff218ef0e1ac4a78aa06d87725
This commit is contained in:
Juhyun Lee 2020-04-15 15:27:01 -07:00 committed by TensorFlower Gardener
parent 9304bd49ec
commit 98c434cd50
3 changed files with 28 additions and 18 deletions

View File

@ -1,3 +1,5 @@
load("//tensorflow/core/platform:build_config.bzl", "tf_platform_alias")
package( package(
default_visibility = ["//visibility:public"], default_visibility = ["//visibility:public"],
licenses = ["notice"], # Apache 2.0 licenses = ["notice"], # Apache 2.0
@ -19,17 +21,9 @@ cc_library(
], ],
) )
cc_library( exports_files(
name = "custom_parsers", ["custom_parsers.h"],
srcs = ["custom_parsers.cc"], visibility = ["//tensorflow/lite/delegates/gpu/common:__subpackages__"],
hdrs = ["custom_parsers.h"],
deps = [
":shape",
":status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:any",
"@flatbuffers",
],
) )
cc_library( cc_library(
@ -126,7 +120,6 @@ cc_library(
srcs = ["model_builder.cc"], srcs = ["model_builder.cc"],
hdrs = ["model_builder.h"], hdrs = ["model_builder.h"],
deps = [ deps = [
":custom_parsers",
":data_type", ":data_type",
":model", ":model",
":model_builder_helper", ":model_builder_helper",
@ -134,6 +127,10 @@ cc_library(
":shape", ":shape",
":status", ":status",
":tensor", ":tensor",
"@FP16",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
"//tensorflow/lite:context", "//tensorflow/lite:context",
"//tensorflow/lite:kernel_api", "//tensorflow/lite:kernel_api",
"//tensorflow/lite:util", "//tensorflow/lite:util",
@ -143,11 +140,7 @@ cc_library(
"//tensorflow/lite/kernels/internal:reference_base", "//tensorflow/lite/kernels/internal:reference_base",
"//tensorflow/lite/kernels/internal:tensor", "//tensorflow/lite/kernels/internal:tensor",
"//tensorflow/lite/schema:schema_fbs", "//tensorflow/lite/schema:schema_fbs",
"@FP16", ] + tf_platform_alias("custom_parsers", "//tensorflow/lite/delegates/gpu/common/"),
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
],
) )
cc_test( cc_test(

View File

@ -0,0 +1,16 @@
package(
default_visibility = ["//visibility:public"],
licenses = ["notice"], # Apache 2.0
)
cc_library(
name = "custom_parsers",
srcs = ["custom_parsers.cc"],
hdrs = ["//tensorflow/lite/delegates/gpu/common:custom_parsers.h"],
deps = [
"//tensorflow/lite/delegates/gpu/common:shape",
"//tensorflow/lite/delegates/gpu/common:status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:any",
],
)

View File

@ -1,4 +1,4 @@
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. /* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@ -12,6 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==============================================================================*/ ==============================================================================*/
#include "tensorflow/lite/delegates/gpu/common/custom_parsers.h" #include "tensorflow/lite/delegates/gpu/common/custom_parsers.h"
#include <string> #include <string>