Add image decoding ops to flex delegate
These include: - DecodeBmp - DecodeGif - DecodeJpeg - DecodePng PiperOrigin-RevId: 329224370 Change-Id: I696bd5bea4ab2cc570408b202d66058c7ca35a83
This commit is contained in:
parent
6fb5546522
commit
c0757ec6ed
@ -2012,11 +2012,6 @@ alias(
|
||||
actual = "//tensorflow/core/lib/png:png_io",
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "portable_png_internal",
|
||||
actual = "//tensorflow/core/lib/png:png_io",
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "android_png_internal",
|
||||
actual = "//tensorflow/core/lib/png:png_io",
|
||||
@ -2045,8 +2040,8 @@ cc_library(
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "portable_jpeg_internal",
|
||||
srcs = if_mobile([
|
||||
name = "android_jpeg_internal",
|
||||
srcs = if_android([
|
||||
"lib/jpeg/jpeg_handle.cc",
|
||||
"lib/jpeg/jpeg_mem.cc",
|
||||
"//tensorflow/core/platform:jpeg_hdrs",
|
||||
@ -2060,7 +2055,7 @@ cc_library(
|
||||
"//tensorflow/core/platform/default:logging.h",
|
||||
],
|
||||
copts = tf_copts(),
|
||||
linkopts = if_android(["-ldl"]),
|
||||
linkopts = ["-ldl"],
|
||||
deps = [
|
||||
":core_stringpiece",
|
||||
"//tensorflow/core/platform:dynamic_annotations",
|
||||
@ -2073,8 +2068,8 @@ cc_library(
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "portable_gif_internal",
|
||||
srcs = if_mobile([
|
||||
name = "android_gif_internal",
|
||||
srcs = if_android([
|
||||
"lib/gif/gif_io.cc",
|
||||
"//tensorflow/core/platform:gif_hdrs",
|
||||
]),
|
||||
@ -2087,7 +2082,7 @@ cc_library(
|
||||
"//tensorflow/core/platform/default:logging.h",
|
||||
],
|
||||
copts = tf_copts(),
|
||||
linkopts = if_android(["-ldl"]),
|
||||
linkopts = ["-ldl"],
|
||||
deps = [
|
||||
"//tensorflow/core/platform:dynamic_annotations",
|
||||
"//tensorflow/core/platform:gif",
|
||||
@ -2098,16 +2093,6 @@ cc_library(
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "android_jpeg_internal",
|
||||
actual = ":portable_jpeg_internal",
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "android_gif_internal",
|
||||
actual = ":portable_gif_internal",
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "error_codes_proto_impl",
|
||||
actual = "//tensorflow/core/protobuf:error_codes_proto_impl",
|
||||
|
@ -6117,9 +6117,6 @@ filegroup(
|
||||
"//tensorflow/core/kernels/linalg:einsum_op_impl_complex128.cc",
|
||||
"//tensorflow/core/kernels/linalg:einsum_op_impl.h",
|
||||
"//tensorflow/core/kernels/linalg:einsum_op.h",
|
||||
"//tensorflow/core/kernels/image:decode_image_op.cc",
|
||||
"//tensorflow/core/kernels/image:encode_jpeg_op.cc",
|
||||
"//tensorflow/core/kernels/image:encode_png_op.cc",
|
||||
] + select({
|
||||
":xsmm_convolutions": [
|
||||
"xsmm_conv2d.h",
|
||||
@ -6439,9 +6436,6 @@ cc_library(
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//tensorflow/core:portable_gif_internal",
|
||||
"//tensorflow/core:portable_jpeg_internal",
|
||||
"//tensorflow/core:portable_png_internal",
|
||||
"//tensorflow/core:portable_tensorflow_lib_lite",
|
||||
"//tensorflow/core:protos_all_cc_impl",
|
||||
"//tensorflow/core/platform:strong_hash",
|
||||
|
@ -61,9 +61,6 @@ exports_files([
|
||||
"resize_nearest_neighbor_op.cc",
|
||||
"resize_nearest_neighbor_op.h",
|
||||
"sample_distorted_bounding_box_op.cc",
|
||||
"decode_image_op.cc",
|
||||
"encode_jpeg_op.cc",
|
||||
"encode_png_op.cc",
|
||||
])
|
||||
|
||||
# Private support libraries ---------------------------------------------------
|
||||
|
@ -276,15 +276,3 @@ tf_cc_test(
|
||||
],
|
||||
}),
|
||||
)
|
||||
|
||||
# Alias to support selective build of image ops.
|
||||
# TODO(b/163285312): Remove after tensorflow/core refactoring completed.
|
||||
cc_library(
|
||||
name = "portable_images_lib",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//tensorflow/core:portable_gif_internal",
|
||||
"//tensorflow/core:portable_jpeg_internal",
|
||||
"//tensorflow/core:portable_png_internal",
|
||||
],
|
||||
)
|
||||
|
@ -112,13 +112,7 @@ const std::set<std::string>& GetFlexAllowlist() {
|
||||
"DataFormatVecPermute",
|
||||
"DebugGradientIdentity",
|
||||
"DebugGradientRefIdentity",
|
||||
"DecodeAndCropJpeg",
|
||||
"DecodeBase64",
|
||||
"DecodeBmp",
|
||||
"DecodeGif",
|
||||
"DecodeImage",
|
||||
"DecodeJpeg",
|
||||
"DecodePng",
|
||||
"DecodeRaw",
|
||||
"DecodeWav",
|
||||
"DeepCopy",
|
||||
@ -139,9 +133,6 @@ const std::set<std::string>& GetFlexAllowlist() {
|
||||
"EluGrad",
|
||||
"Empty",
|
||||
"EncodeBase64",
|
||||
"EncodeJpeg",
|
||||
"EncodeJpegVariableQuality",
|
||||
"EncodePng",
|
||||
"EncodeWav",
|
||||
"EnsureShape",
|
||||
"Enter",
|
||||
|
@ -139,7 +139,6 @@ def tflite_flex_cc_library(
|
||||
"@icu//:common",
|
||||
"//tensorflow/core:portable_tensorflow_lib_lite",
|
||||
"//tensorflow/core/platform:strong_hash",
|
||||
"//tensorflow/lite/delegates/flex:portable_images_lib",
|
||||
],
|
||||
alwayslink = 1,
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user