From 3a3cc5e07610054d404ade35782f00f252895873 Mon Sep 17 00:00:00 2001 From: Raman Sarokin Date: Fri, 6 Nov 2020 09:54:30 -0800 Subject: [PATCH] CalculationsPrecision moved gpu/cl -> gpu/common. PiperOrigin-RevId: 341067497 Change-Id: I772ddc01d334c424f239f7df2d85c84b3653c289 --- tensorflow/lite/delegates/gpu/cl/BUILD | 15 +-- tensorflow/lite/delegates/gpu/cl/api.cc | 2 +- .../lite/delegates/gpu/cl/environment.h | 2 +- .../delegates/gpu/cl/inference_context.cc | 2 +- .../lite/delegates/gpu/cl/inference_context.h | 2 +- .../lite/delegates/gpu/cl/kernels/BUILD | 94 ++++++++----------- .../gpu/cl/kernels/conv_buffer_1x1.cc | 1 - .../gpu/cl/kernels/conv_buffer_1x1.h | 1 - .../gpu/cl/kernels/conv_constants.cc | 1 - .../delegates/gpu/cl/kernels/conv_powervr.cc | 1 - .../gpu/cl/kernels/conv_powervr_test.cc | 1 - .../delegates/gpu/cl/kernels/converter.cc | 2 +- .../gpu/cl/kernels/convolution_transposed.cc | 1 - .../cl/kernels/convolution_transposed_3x3.cc | 1 - .../cl/kernels/convolution_transposed_4x4.cc | 1 - .../cl/kernels/convolution_transposed_thin.cc | 1 - .../gpu/cl/kernels/depthwise_conv_3x3.cc | 1 - .../gpu/cl/kernels/fully_connected.cc | 1 - .../gpu/cl/kernels/fully_connected.h | 1 - .../gpu/cl/kernels/fully_connected_test.cc | 1 - .../delegates/gpu/cl/kernels/gpu_operation.h | 2 +- .../lite/delegates/gpu/cl/kernels/lstm.cc | 1 - .../lite/delegates/gpu/cl/kernels/mean.h | 1 - .../cl/kernels/mean_stddev_normalization.cc | 1 - .../lite/delegates/gpu/cl/kernels/reduce.cc | 1 - .../lite/delegates/gpu/cl/kernels/relu.cc | 1 - .../lite/delegates/gpu/cl/kernels/softmax.h | 1 - .../delegates/gpu/cl/kernels/softmax1x1.h | 1 - .../delegates/gpu/cl/kernels/special/BUILD | 1 - .../gpu/cl/kernels/special/fc_fc_add.cc | 1 - .../gpu/cl/kernels/special/fc_fc_add.h | 1 - .../lite/delegates/gpu/cl/kernels/util.cc | 2 +- .../lite/delegates/gpu/cl/kernels/util.h | 2 +- .../lite/delegates/gpu/cl/kernels/winograd.cc | 1 - .../lite/delegates/gpu/cl/kernels/winograd.h | 1 - .../delegates/gpu/cl/kernels/winograd_test.cc | 1 - .../lite/delegates/gpu/cl/selectors/BUILD | 1 - .../cl/selectors/dw_convolution_selector.cc | 1 - .../lite/delegates/gpu/cl/serialization.cc | 2 +- tensorflow/lite/delegates/gpu/common/BUILD | 9 ++ .../delegates/gpu/{cl => common}/precision.cc | 4 +- .../delegates/gpu/{cl => common}/precision.h | 8 +- 42 files changed, 62 insertions(+), 114 deletions(-) rename tensorflow/lite/delegates/gpu/{cl => common}/precision.cc (93%) rename tensorflow/lite/delegates/gpu/{cl => common}/precision.h (87%) diff --git a/tensorflow/lite/delegates/gpu/cl/BUILD b/tensorflow/lite/delegates/gpu/cl/BUILD index 57bcc8adb49..4c402ca8ddf 100644 --- a/tensorflow/lite/delegates/gpu/cl/BUILD +++ b/tensorflow/lite/delegates/gpu/cl/BUILD @@ -31,7 +31,6 @@ cc_library( ":environment", ":inference_context", ":opencl_wrapper", - ":precision", ":tensor", ":tensor_type_util", "@com_google_absl//absl/memory", @@ -40,6 +39,7 @@ cc_library( "//tensorflow/lite/delegates/gpu/cl/kernels:converter", "//tensorflow/lite/delegates/gpu/common:data_type", "//tensorflow/lite/delegates/gpu/common:model", + "//tensorflow/lite/delegates/gpu/common:precision", "//tensorflow/lite/delegates/gpu/common:shape", "//tensorflow/lite/delegates/gpu/common:status", "//tensorflow/lite/delegates/gpu/common:tensor", @@ -289,11 +289,11 @@ cc_library( ":cl_context", ":cl_device", ":device_info", - ":precision", ":program_cache", ":tensor", ":util", "//tensorflow/lite/delegates/gpu/common:data_type", + "//tensorflow/lite/delegates/gpu/common:precision", "//tensorflow/lite/delegates/gpu/common:shape", "//tensorflow/lite/delegates/gpu/common:status", "//tensorflow/lite/delegates/gpu/common:tensor", @@ -384,7 +384,6 @@ cc_library( ":gpu_object", ":model_hints", ":opencl_wrapper", - ":precision", ":serialization_cc_fbs", ":storage_type_util", "//tensorflow/lite/delegates/gpu/cl/kernels:gpu_operation", @@ -395,6 +394,7 @@ cc_library( "//tensorflow/lite/delegates/gpu/common:model", "//tensorflow/lite/delegates/gpu/common:model_transformer", "//tensorflow/lite/delegates/gpu/common:operations", + "//tensorflow/lite/delegates/gpu/common:precision", "//tensorflow/lite/delegates/gpu/common:shape", "//tensorflow/lite/delegates/gpu/common:status", "//tensorflow/lite/delegates/gpu/common:tensor", @@ -456,15 +456,6 @@ cc_library( ], ) -cc_library( - name = "precision", - srcs = ["precision.cc"], - hdrs = ["precision.h"], - deps = [ - "//tensorflow/lite/delegates/gpu/common:data_type", - ], -) - cc_library( name = "program_cache", srcs = ["program_cache.cc"], diff --git a/tensorflow/lite/delegates/gpu/cl/api.cc b/tensorflow/lite/delegates/gpu/cl/api.cc index 024324ae48a..31a8fe00485 100644 --- a/tensorflow/lite/delegates/gpu/cl/api.cc +++ b/tensorflow/lite/delegates/gpu/cl/api.cc @@ -31,10 +31,10 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/inference_context.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/converter.h" #include "tensorflow/lite/delegates/gpu/cl/opencl_wrapper.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/cl/tensor.h" #include "tensorflow/lite/delegates/gpu/cl/tensor_type_util.h" #include "tensorflow/lite/delegates/gpu/common/data_type.h" +#include "tensorflow/lite/delegates/gpu/common/precision.h" #include "tensorflow/lite/delegates/gpu/common/shape.h" #include "tensorflow/lite/delegates/gpu/common/task/tensor_desc.h" #include "tensorflow/lite/delegates/gpu/common/tensor.h" diff --git a/tensorflow/lite/delegates/gpu/cl/environment.h b/tensorflow/lite/delegates/gpu/cl/environment.h index 9861c6eaef9..86884e0ad05 100644 --- a/tensorflow/lite/delegates/gpu/cl/environment.h +++ b/tensorflow/lite/delegates/gpu/cl/environment.h @@ -20,9 +20,9 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/cl_context.h" #include "tensorflow/lite/delegates/gpu/cl/cl_device.h" #include "tensorflow/lite/delegates/gpu/cl/device_info.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/cl/program_cache.h" #include "tensorflow/lite/delegates/gpu/common/data_type.h" +#include "tensorflow/lite/delegates/gpu/common/precision.h" #include "tensorflow/lite/delegates/gpu/common/status.h" #include "tensorflow/lite/delegates/gpu/common/task/tensor_desc.h" #include "tensorflow/lite/delegates/gpu/common/tensor.h" diff --git a/tensorflow/lite/delegates/gpu/cl/inference_context.cc b/tensorflow/lite/delegates/gpu/cl/inference_context.cc index ae62b728839..a98a7ad4fc0 100644 --- a/tensorflow/lite/delegates/gpu/cl/inference_context.cc +++ b/tensorflow/lite/delegates/gpu/cl/inference_context.cc @@ -29,7 +29,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/cl_device.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/gpu_operation.h" #include "tensorflow/lite/delegates/gpu/cl/model_hints.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/cl/selectors/operation_selector.h" #include "tensorflow/lite/delegates/gpu/cl/selectors/special_selector.h" #include "tensorflow/lite/delegates/gpu/cl/storage_type_util.h" @@ -38,6 +37,7 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/common/model.h" #include "tensorflow/lite/delegates/gpu/common/model_transformer.h" #include "tensorflow/lite/delegates/gpu/common/operations.h" +#include "tensorflow/lite/delegates/gpu/common/precision.h" #include "tensorflow/lite/delegates/gpu/common/shape.h" #include "tensorflow/lite/delegates/gpu/common/task/tensor_desc.h" #include "tensorflow/lite/delegates/gpu/common/transformations/add_bias.h" diff --git a/tensorflow/lite/delegates/gpu/cl/inference_context.h b/tensorflow/lite/delegates/gpu/cl/inference_context.h index 9f2212dbcf9..8223568f43a 100644 --- a/tensorflow/lite/delegates/gpu/cl/inference_context.h +++ b/tensorflow/lite/delegates/gpu/cl/inference_context.h @@ -30,9 +30,9 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/kernels/gpu_operation.h" #include "tensorflow/lite/delegates/gpu/cl/model_hints.h" #include "tensorflow/lite/delegates/gpu/cl/opencl_wrapper.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/cl/serialization_generated.h" #include "tensorflow/lite/delegates/gpu/common/model.h" +#include "tensorflow/lite/delegates/gpu/common/precision.h" #include "tensorflow/lite/delegates/gpu/common/status.h" #include "tensorflow/lite/delegates/gpu/common/task/tensor_desc.h" #include "tensorflow/lite/delegates/gpu/common/tensor.h" diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/BUILD b/tensorflow/lite/delegates/gpu/cl/kernels/BUILD index 8f9ec373223..dc02045195a 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/BUILD +++ b/tensorflow/lite/delegates/gpu/cl/kernels/BUILD @@ -117,7 +117,6 @@ cc_library( "//tensorflow/lite/delegates/gpu/cl:cl_device", "//tensorflow/lite/delegates/gpu/cl:cl_kernel", "//tensorflow/lite/delegates/gpu/cl:linear_storage", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/cl:tensor", "//tensorflow/lite/delegates/gpu/cl:util", "//tensorflow/lite/delegates/gpu/common:data_type", @@ -162,7 +161,6 @@ cc_library( ":work_group_picking", "//tensorflow/lite/delegates/gpu/cl:buffer", "//tensorflow/lite/delegates/gpu/cl:linear_storage", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/cl:tensor", "//tensorflow/lite/delegates/gpu/cl:util", "//tensorflow/lite/delegates/gpu/common:data_type", @@ -203,7 +201,6 @@ cc_library( "//tensorflow/lite/delegates/gpu/cl:buffer", "//tensorflow/lite/delegates/gpu/cl:cl_device", "//tensorflow/lite/delegates/gpu/cl:linear_storage", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/cl:tensor", "//tensorflow/lite/delegates/gpu/cl:texture2d", "//tensorflow/lite/delegates/gpu/cl:util", @@ -229,7 +226,6 @@ cc_test( deps = [ ":cl_test", ":conv_powervr", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/common:operations", "//tensorflow/lite/delegates/gpu/common:status", "@com_google_googletest//:gtest_main", @@ -263,9 +259,9 @@ cc_library( "//tensorflow/lite/delegates/gpu/cl:cl_command_queue", "//tensorflow/lite/delegates/gpu/cl:cl_errors", "//tensorflow/lite/delegates/gpu/cl:environment", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/cl:tensor", "//tensorflow/lite/delegates/gpu/cl:tensor_type_util", + "//tensorflow/lite/delegates/gpu/common:precision", "//tensorflow/lite/delegates/gpu/common:util", "//tensorflow/lite/delegates/gpu/common/task:arguments", "//tensorflow/lite/delegates/gpu/common/task:tensor_desc", @@ -282,7 +278,6 @@ cc_library( ":work_group_picking", "//tensorflow/lite/delegates/gpu/cl:buffer", "//tensorflow/lite/delegates/gpu/cl:linear_storage", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/cl:tensor", "//tensorflow/lite/delegates/gpu/cl:texture2d", "//tensorflow/lite/delegates/gpu/cl:util", @@ -323,7 +318,6 @@ cc_library( ":work_group_picking", "//tensorflow/lite/delegates/gpu/cl:buffer", "//tensorflow/lite/delegates/gpu/cl:linear_storage", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/cl:tensor", "//tensorflow/lite/delegates/gpu/cl:util", "//tensorflow/lite/delegates/gpu/common:data_type", @@ -401,7 +395,6 @@ cc_library( ":work_group_picking", "//tensorflow/lite/delegates/gpu/cl:buffer", "//tensorflow/lite/delegates/gpu/cl:linear_storage", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/cl:tensor", "//tensorflow/lite/delegates/gpu/cl:util", "//tensorflow/lite/delegates/gpu/common:data_type", @@ -440,7 +433,6 @@ cc_library( ":util", ":work_group_picking", "//tensorflow/lite/delegates/gpu/cl:buffer", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/cl:tensor", "//tensorflow/lite/delegates/gpu/cl:texture2d", "//tensorflow/lite/delegates/gpu/cl:util", @@ -519,7 +511,6 @@ cc_library( ":util", ":work_group_picking", "//tensorflow/lite/delegates/gpu/cl:buffer", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/cl:tensor", "//tensorflow/lite/delegates/gpu/cl:texture2d", "//tensorflow/lite/delegates/gpu/cl:util", @@ -592,7 +583,6 @@ cc_library( "//tensorflow/lite/delegates/gpu/cl:cl_kernel", "//tensorflow/lite/delegates/gpu/cl:device_info", "//tensorflow/lite/delegates/gpu/cl:linear_storage", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/cl:tensor", "//tensorflow/lite/delegates/gpu/cl:texture2d", "//tensorflow/lite/delegates/gpu/common:data_type", @@ -618,7 +608,6 @@ cc_test( ":fully_connected", ":gpu_operation", "//tensorflow/lite/delegates/gpu/cl:environment", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/common:data_type", "//tensorflow/lite/delegates/gpu/common:operations", "//tensorflow/lite/delegates/gpu/common:shape", @@ -643,12 +632,12 @@ cc_library( "//tensorflow/lite/delegates/gpu/cl:cl_kernel", "//tensorflow/lite/delegates/gpu/cl:cl_program", "//tensorflow/lite/delegates/gpu/cl:device_info", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/cl:program_cache", "//tensorflow/lite/delegates/gpu/cl:serialization_cc_fbs", "//tensorflow/lite/delegates/gpu/cl:tensor", "//tensorflow/lite/delegates/gpu/common:access_type", "//tensorflow/lite/delegates/gpu/common:data_type", + "//tensorflow/lite/delegates/gpu/common:precision", "//tensorflow/lite/delegates/gpu/common:status", "//tensorflow/lite/delegates/gpu/common:types", "//tensorflow/lite/delegates/gpu/common/task:arguments", @@ -665,7 +654,6 @@ cc_library( ":gpu_operation", ":util", ":work_group_picking", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/common:operations", "//tensorflow/lite/delegates/gpu/common:status", "//tensorflow/lite/delegates/gpu/common:types", @@ -708,41 +696,6 @@ cc_test( ], ) -cc_library( - name = "mean_stddev_normalization", - srcs = ["mean_stddev_normalization.cc"], - hdrs = ["mean_stddev_normalization.h"], - deps = [ - ":gpu_operation", - ":util", - ":work_group_picking", - "//tensorflow/lite/delegates/gpu/cl:cl_program", - "//tensorflow/lite/delegates/gpu/cl:device_info", - "//tensorflow/lite/delegates/gpu/cl:precision", - "//tensorflow/lite/delegates/gpu/common:operations", - "//tensorflow/lite/delegates/gpu/common:status", - "//tensorflow/lite/delegates/gpu/common:types", - ], -) - -cc_test( - name = "mean_stddev_normalization_test", - srcs = ["mean_stddev_normalization_test.cc"], - linkstatic = True, - tags = tf_gpu_tests_tags() + [ - "linux", - "local", - ], - deps = [ - ":cl_test", - ":mean_stddev_normalization", - "//tensorflow/lite/delegates/gpu/cl:tensor", - "//tensorflow/lite/delegates/gpu/common:operations", - "//tensorflow/lite/delegates/gpu/common:status", - "@com_google_googletest//:gtest_main", - ], -) - cc_library( name = "max_unpooling", srcs = ["max_unpooling.cc"], @@ -783,7 +736,6 @@ cc_library( ":util", ":work_group_picking", "//tensorflow/lite/delegates/gpu/cl:cl_kernel", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/cl:tensor", "//tensorflow/lite/delegates/gpu/common:status", "//tensorflow/lite/delegates/gpu/common:types", @@ -808,6 +760,40 @@ cc_test( ], ) +cc_library( + name = "mean_stddev_normalization", + srcs = ["mean_stddev_normalization.cc"], + hdrs = ["mean_stddev_normalization.h"], + deps = [ + ":gpu_operation", + ":util", + ":work_group_picking", + "//tensorflow/lite/delegates/gpu/cl:cl_program", + "//tensorflow/lite/delegates/gpu/cl:device_info", + "//tensorflow/lite/delegates/gpu/common:operations", + "//tensorflow/lite/delegates/gpu/common:status", + "//tensorflow/lite/delegates/gpu/common:types", + ], +) + +cc_test( + name = "mean_stddev_normalization_test", + srcs = ["mean_stddev_normalization_test.cc"], + linkstatic = True, + tags = tf_gpu_tests_tags() + [ + "linux", + "local", + ], + deps = [ + ":cl_test", + ":mean_stddev_normalization", + "//tensorflow/lite/delegates/gpu/cl:tensor", + "//tensorflow/lite/delegates/gpu/common:operations", + "//tensorflow/lite/delegates/gpu/common:status", + "@com_google_googletest//:gtest_main", + ], +) + cc_library( name = "padding", srcs = ["padding.cc"], @@ -953,7 +939,6 @@ cc_library( deps = [ ":gpu_operation", ":util", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/common:operations", "//tensorflow/lite/delegates/gpu/common:status", "//tensorflow/lite/delegates/gpu/common:types", @@ -983,7 +968,6 @@ cc_library( hdrs = ["relu.h"], deps = [ ":gpu_operation", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/common:operations", "@com_google_absl//absl/strings", ], @@ -1078,7 +1062,6 @@ cc_library( ":util", ":work_group_picking", "//tensorflow/lite/delegates/gpu/cl:cl_kernel", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/cl:tensor", "//tensorflow/lite/delegates/gpu/common:status", "//tensorflow/lite/delegates/gpu/common:types", @@ -1110,7 +1093,6 @@ cc_library( ":gpu_operation", ":util", "//tensorflow/lite/delegates/gpu/cl:cl_kernel", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/cl:tensor", "//tensorflow/lite/delegates/gpu/common:status", ], @@ -1272,8 +1254,8 @@ cc_library( hdrs = ["util.h"], deps = [ "//tensorflow/lite/delegates/gpu/cl:device_info", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/common:data_type", + "//tensorflow/lite/delegates/gpu/common:precision", "//tensorflow/lite/delegates/gpu/common:shape", "//tensorflow/lite/delegates/gpu/common:tensor", "//tensorflow/lite/delegates/gpu/common:types", @@ -1294,7 +1276,6 @@ cc_library( "//tensorflow/lite/delegates/gpu/cl:cl_device", "//tensorflow/lite/delegates/gpu/cl:cl_kernel", "//tensorflow/lite/delegates/gpu/cl:linear_storage", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/cl:tensor", "//tensorflow/lite/delegates/gpu/common:data_type", "//tensorflow/lite/delegates/gpu/common:operations", @@ -1317,7 +1298,6 @@ cc_test( ":cl_test", ":util", ":winograd", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/common:operations", "//tensorflow/lite/delegates/gpu/common:status", "//tensorflow/lite/delegates/gpu/common:winograd_util", diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/conv_buffer_1x1.cc b/tensorflow/lite/delegates/gpu/cl/kernels/conv_buffer_1x1.cc index 0983cb1f4da..51836eeafeb 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/conv_buffer_1x1.cc +++ b/tensorflow/lite/delegates/gpu/cl/kernels/conv_buffer_1x1.cc @@ -22,7 +22,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/cl_device.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/util.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/work_group_picking.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/common/status.h" namespace tflite { diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/conv_buffer_1x1.h b/tensorflow/lite/delegates/gpu/cl/kernels/conv_buffer_1x1.h index f0c75e16e94..9f9369df254 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/conv_buffer_1x1.h +++ b/tensorflow/lite/delegates/gpu/cl/kernels/conv_buffer_1x1.h @@ -22,7 +22,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/kernels/gpu_operation.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/util.h" #include "tensorflow/lite/delegates/gpu/cl/linear_storage.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/cl/tensor.h" #include "tensorflow/lite/delegates/gpu/cl/util.h" #include "tensorflow/lite/delegates/gpu/common/data_type.h" diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/conv_constants.cc b/tensorflow/lite/delegates/gpu/cl/kernels/conv_constants.cc index 648318a6854..d29597a301c 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/conv_constants.cc +++ b/tensorflow/lite/delegates/gpu/cl/kernels/conv_constants.cc @@ -20,7 +20,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/kernels/util.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/work_group_picking.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" namespace tflite { namespace gpu { diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/conv_powervr.cc b/tensorflow/lite/delegates/gpu/cl/kernels/conv_powervr.cc index ce9f0b2d07a..b1561ea014f 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/conv_powervr.cc +++ b/tensorflow/lite/delegates/gpu/cl/kernels/conv_powervr.cc @@ -22,7 +22,6 @@ limitations under the License. #include "absl/strings/substitute.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/util.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/work_group_picking.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/common/data_type.h" #include "tensorflow/lite/delegates/gpu/common/shape.h" #include "tensorflow/lite/delegates/gpu/common/status.h" diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/conv_powervr_test.cc b/tensorflow/lite/delegates/gpu/cl/kernels/conv_powervr_test.cc index 2cf40c51b40..4fc5f57578f 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/conv_powervr_test.cc +++ b/tensorflow/lite/delegates/gpu/cl/kernels/conv_powervr_test.cc @@ -20,7 +20,6 @@ limitations under the License. #include #include #include "tensorflow/lite/delegates/gpu/cl/kernels/cl_test.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/common/operations.h" #include "tensorflow/lite/delegates/gpu/common/status.h" diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/converter.cc b/tensorflow/lite/delegates/gpu/cl/kernels/converter.cc index 15da58f027e..75a2f461a39 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/converter.cc +++ b/tensorflow/lite/delegates/gpu/cl/kernels/converter.cc @@ -23,9 +23,9 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/cl_command_queue.h" #include "tensorflow/lite/delegates/gpu/cl/cl_errors.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/util.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/cl/tensor.h" #include "tensorflow/lite/delegates/gpu/cl/tensor_type_util.h" +#include "tensorflow/lite/delegates/gpu/common/precision.h" #include "tensorflow/lite/delegates/gpu/common/task/arguments.h" #include "tensorflow/lite/delegates/gpu/common/task/tensor_desc.h" #include "tensorflow/lite/delegates/gpu/common/util.h" diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/convolution_transposed.cc b/tensorflow/lite/delegates/gpu/cl/kernels/convolution_transposed.cc index 7cb78a1faba..ef32abb7c87 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/convolution_transposed.cc +++ b/tensorflow/lite/delegates/gpu/cl/kernels/convolution_transposed.cc @@ -22,7 +22,6 @@ limitations under the License. #include "absl/strings/substitute.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/util.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/work_group_picking.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/common/shape.h" #include "tensorflow/lite/delegates/gpu/common/status.h" diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/convolution_transposed_3x3.cc b/tensorflow/lite/delegates/gpu/cl/kernels/convolution_transposed_3x3.cc index 08e7d34f4d3..edd3d1e0de2 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/convolution_transposed_3x3.cc +++ b/tensorflow/lite/delegates/gpu/cl/kernels/convolution_transposed_3x3.cc @@ -21,7 +21,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/kernels/util.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/work_group_picking.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" namespace tflite { namespace gpu { diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/convolution_transposed_4x4.cc b/tensorflow/lite/delegates/gpu/cl/kernels/convolution_transposed_4x4.cc index a14b0a61c5b..2f186eadf9f 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/convolution_transposed_4x4.cc +++ b/tensorflow/lite/delegates/gpu/cl/kernels/convolution_transposed_4x4.cc @@ -21,7 +21,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/kernels/util.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/work_group_picking.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" namespace tflite { namespace gpu { diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/convolution_transposed_thin.cc b/tensorflow/lite/delegates/gpu/cl/kernels/convolution_transposed_thin.cc index 8781eadd867..e33a5040126 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/convolution_transposed_thin.cc +++ b/tensorflow/lite/delegates/gpu/cl/kernels/convolution_transposed_thin.cc @@ -21,7 +21,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/kernels/util.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/work_group_picking.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" namespace tflite { namespace gpu { diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/depthwise_conv_3x3.cc b/tensorflow/lite/delegates/gpu/cl/kernels/depthwise_conv_3x3.cc index e07a5a4df10..520c8405bb4 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/depthwise_conv_3x3.cc +++ b/tensorflow/lite/delegates/gpu/cl/kernels/depthwise_conv_3x3.cc @@ -20,7 +20,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/kernels/util.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/work_group_picking.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/common/status.h" namespace tflite { diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/fully_connected.cc b/tensorflow/lite/delegates/gpu/cl/kernels/fully_connected.cc index 56bb1f422df..5f601ee28dd 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/fully_connected.cc +++ b/tensorflow/lite/delegates/gpu/cl/kernels/fully_connected.cc @@ -24,7 +24,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/kernels/gpu_operation.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/util.h" #include "tensorflow/lite/delegates/gpu/cl/linear_storage.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/cl/tensor.h" #include "tensorflow/lite/delegates/gpu/common/operations.h" #include "tensorflow/lite/delegates/gpu/common/types.h" diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/fully_connected.h b/tensorflow/lite/delegates/gpu/cl/kernels/fully_connected.h index 569b700dda8..b2d1552bf63 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/fully_connected.h +++ b/tensorflow/lite/delegates/gpu/cl/kernels/fully_connected.h @@ -28,7 +28,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/device_info.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/gpu_operation.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/tuning_parameters.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/cl/texture2d.h" #include "tensorflow/lite/delegates/gpu/common/data_type.h" #include "tensorflow/lite/delegates/gpu/common/operations.h" diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/fully_connected_test.cc b/tensorflow/lite/delegates/gpu/cl/kernels/fully_connected_test.cc index 72937ced84a..23e69a4631c 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/fully_connected_test.cc +++ b/tensorflow/lite/delegates/gpu/cl/kernels/fully_connected_test.cc @@ -22,7 +22,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/environment.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/cl_test.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/gpu_operation.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/common/data_type.h" #include "tensorflow/lite/delegates/gpu/common/operations.h" #include "tensorflow/lite/delegates/gpu/common/shape.h" diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/gpu_operation.h b/tensorflow/lite/delegates/gpu/cl/kernels/gpu_operation.h index 621d3388946..b3f3da01598 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/gpu_operation.h +++ b/tensorflow/lite/delegates/gpu/cl/kernels/gpu_operation.h @@ -28,11 +28,11 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/cl_program.h" #include "tensorflow/lite/delegates/gpu/cl/device_info.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/tuning_parameters.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/cl/program_cache.h" #include "tensorflow/lite/delegates/gpu/cl/serialization_generated.h" #include "tensorflow/lite/delegates/gpu/cl/tensor.h" #include "tensorflow/lite/delegates/gpu/common/data_type.h" +#include "tensorflow/lite/delegates/gpu/common/precision.h" #include "tensorflow/lite/delegates/gpu/common/status.h" #include "tensorflow/lite/delegates/gpu/common/task/arguments.h" #include "tensorflow/lite/delegates/gpu/common/task/tensor_desc.h" diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/lstm.cc b/tensorflow/lite/delegates/gpu/cl/kernels/lstm.cc index c98ac36cd3a..edae706c63f 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/lstm.cc +++ b/tensorflow/lite/delegates/gpu/cl/kernels/lstm.cc @@ -19,7 +19,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/kernels/util.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/work_group_picking.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" namespace tflite { namespace gpu { diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/mean.h b/tensorflow/lite/delegates/gpu/cl/kernels/mean.h index 3bf2061d329..0d233302e12 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/mean.h +++ b/tensorflow/lite/delegates/gpu/cl/kernels/mean.h @@ -18,7 +18,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/cl_kernel.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/gpu_operation.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/cl/tensor.h" #include "tensorflow/lite/delegates/gpu/common/types.h" diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/mean_stddev_normalization.cc b/tensorflow/lite/delegates/gpu/cl/kernels/mean_stddev_normalization.cc index dabf71066f6..48985391a03 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/mean_stddev_normalization.cc +++ b/tensorflow/lite/delegates/gpu/cl/kernels/mean_stddev_normalization.cc @@ -21,7 +21,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/device_info.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/util.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/work_group_picking.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" namespace tflite { namespace gpu { diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/reduce.cc b/tensorflow/lite/delegates/gpu/cl/kernels/reduce.cc index b24d54abbfc..f2a928b23a4 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/reduce.cc +++ b/tensorflow/lite/delegates/gpu/cl/kernels/reduce.cc @@ -18,7 +18,6 @@ limitations under the License. #include #include "tensorflow/lite/delegates/gpu/cl/kernels/util.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/common/operations.h" #include "tensorflow/lite/delegates/gpu/common/status.h" diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/relu.cc b/tensorflow/lite/delegates/gpu/cl/kernels/relu.cc index 5ed06173a89..6131d4d2495 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/relu.cc +++ b/tensorflow/lite/delegates/gpu/cl/kernels/relu.cc @@ -16,7 +16,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/kernels/relu.h" #include "absl/strings/str_cat.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" namespace tflite { namespace gpu { diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/softmax.h b/tensorflow/lite/delegates/gpu/cl/kernels/softmax.h index 17a264766d4..4a9b5fd7c18 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/softmax.h +++ b/tensorflow/lite/delegates/gpu/cl/kernels/softmax.h @@ -18,7 +18,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/cl_kernel.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/gpu_operation.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/cl/tensor.h" #include "tensorflow/lite/delegates/gpu/common/types.h" diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/softmax1x1.h b/tensorflow/lite/delegates/gpu/cl/kernels/softmax1x1.h index 202f46d2a51..030e53728f3 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/softmax1x1.h +++ b/tensorflow/lite/delegates/gpu/cl/kernels/softmax1x1.h @@ -18,7 +18,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/cl_kernel.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/gpu_operation.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/cl/tensor.h" namespace tflite { diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/special/BUILD b/tensorflow/lite/delegates/gpu/cl/kernels/special/BUILD index 66a2123340d..71d5f9811b3 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/special/BUILD +++ b/tensorflow/lite/delegates/gpu/cl/kernels/special/BUILD @@ -33,7 +33,6 @@ cc_library( "//tensorflow/lite/delegates/gpu/cl:cl_kernel", "//tensorflow/lite/delegates/gpu/cl:device_info", "//tensorflow/lite/delegates/gpu/cl:linear_storage", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/cl:tensor", "//tensorflow/lite/delegates/gpu/cl:texture2d", "//tensorflow/lite/delegates/gpu/cl/kernels:gpu_operation", diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/special/fc_fc_add.cc b/tensorflow/lite/delegates/gpu/cl/kernels/special/fc_fc_add.cc index 0414e60caee..ca5fa1918f7 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/special/fc_fc_add.cc +++ b/tensorflow/lite/delegates/gpu/cl/kernels/special/fc_fc_add.cc @@ -24,7 +24,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/kernels/gpu_operation.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/util.h" #include "tensorflow/lite/delegates/gpu/cl/linear_storage.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/cl/tensor.h" #include "tensorflow/lite/delegates/gpu/common/operations.h" #include "tensorflow/lite/delegates/gpu/common/types.h" diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/special/fc_fc_add.h b/tensorflow/lite/delegates/gpu/cl/kernels/special/fc_fc_add.h index 70d057374c4..7efa6d79735 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/special/fc_fc_add.h +++ b/tensorflow/lite/delegates/gpu/cl/kernels/special/fc_fc_add.h @@ -28,7 +28,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/device_info.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/gpu_operation.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/tuning_parameters.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/cl/texture2d.h" #include "tensorflow/lite/delegates/gpu/common/data_type.h" #include "tensorflow/lite/delegates/gpu/common/operations.h" diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/util.cc b/tensorflow/lite/delegates/gpu/cl/kernels/util.cc index 25fa60c776a..aca06f60ae0 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/util.cc +++ b/tensorflow/lite/delegates/gpu/cl/kernels/util.cc @@ -22,8 +22,8 @@ limitations under the License. #include "absl/strings/str_cat.h" #include "absl/strings/substitute.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/common/data_type.h" +#include "tensorflow/lite/delegates/gpu/common/precision.h" namespace tflite { namespace gpu { diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/util.h b/tensorflow/lite/delegates/gpu/cl/kernels/util.h index 69f6808146c..8656da1b687 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/util.h +++ b/tensorflow/lite/delegates/gpu/cl/kernels/util.h @@ -21,8 +21,8 @@ limitations under the License. #include "absl/types/span.h" #include "tensorflow/lite/delegates/gpu/cl/device_info.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/common/data_type.h" +#include "tensorflow/lite/delegates/gpu/common/precision.h" #include "tensorflow/lite/delegates/gpu/common/shape.h" #include "tensorflow/lite/delegates/gpu/common/tensor.h" #include "tensorflow/lite/delegates/gpu/common/types.h" diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/winograd.cc b/tensorflow/lite/delegates/gpu/cl/kernels/winograd.cc index 1244f769b48..71bbb93fa91 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/winograd.cc +++ b/tensorflow/lite/delegates/gpu/cl/kernels/winograd.cc @@ -22,7 +22,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/cl_device.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/util.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/work_group_picking.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/common/data_type.h" #include "tensorflow/lite/delegates/gpu/common/shape.h" #include "tensorflow/lite/delegates/gpu/common/status.h" diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/winograd.h b/tensorflow/lite/delegates/gpu/cl/kernels/winograd.h index 609e38a4c9a..56134d20bd9 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/winograd.h +++ b/tensorflow/lite/delegates/gpu/cl/kernels/winograd.h @@ -19,7 +19,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/cl_kernel.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/gpu_operation.h" #include "tensorflow/lite/delegates/gpu/cl/linear_storage.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/cl/tensor.h" #include "tensorflow/lite/delegates/gpu/common/data_type.h" #include "tensorflow/lite/delegates/gpu/common/operations.h" diff --git a/tensorflow/lite/delegates/gpu/cl/kernels/winograd_test.cc b/tensorflow/lite/delegates/gpu/cl/kernels/winograd_test.cc index 556d800e985..bbc89ffdc6b 100644 --- a/tensorflow/lite/delegates/gpu/cl/kernels/winograd_test.cc +++ b/tensorflow/lite/delegates/gpu/cl/kernels/winograd_test.cc @@ -23,7 +23,6 @@ limitations under the License. #include #include "tensorflow/lite/delegates/gpu/cl/kernels/cl_test.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/util.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/common/operations.h" #include "tensorflow/lite/delegates/gpu/common/status.h" #include "tensorflow/lite/delegates/gpu/common/winograd_util.h" diff --git a/tensorflow/lite/delegates/gpu/cl/selectors/BUILD b/tensorflow/lite/delegates/gpu/cl/selectors/BUILD index f256facd7f1..ca99831b0c7 100644 --- a/tensorflow/lite/delegates/gpu/cl/selectors/BUILD +++ b/tensorflow/lite/delegates/gpu/cl/selectors/BUILD @@ -64,7 +64,6 @@ cc_library( hdrs = ["dw_convolution_selector.h"], deps = [ "//tensorflow/lite/delegates/gpu/cl:cl_device", - "//tensorflow/lite/delegates/gpu/cl:precision", "//tensorflow/lite/delegates/gpu/cl/kernels:depthwise_conv", "//tensorflow/lite/delegates/gpu/cl/kernels:depthwise_conv_3x3", "//tensorflow/lite/delegates/gpu/cl/kernels:gpu_operation", diff --git a/tensorflow/lite/delegates/gpu/cl/selectors/dw_convolution_selector.cc b/tensorflow/lite/delegates/gpu/cl/selectors/dw_convolution_selector.cc index b04335a4d7d..1d4676ae2c7 100644 --- a/tensorflow/lite/delegates/gpu/cl/selectors/dw_convolution_selector.cc +++ b/tensorflow/lite/delegates/gpu/cl/selectors/dw_convolution_selector.cc @@ -19,7 +19,6 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/cl_device.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/depthwise_conv.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/depthwise_conv_3x3.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" namespace tflite { namespace gpu { diff --git a/tensorflow/lite/delegates/gpu/cl/serialization.cc b/tensorflow/lite/delegates/gpu/cl/serialization.cc index 0547c32e32b..f63790dc3c1 100644 --- a/tensorflow/lite/delegates/gpu/cl/serialization.cc +++ b/tensorflow/lite/delegates/gpu/cl/serialization.cc @@ -20,9 +20,9 @@ limitations under the License. #include "tensorflow/lite/delegates/gpu/cl/gpu_object.h" #include "tensorflow/lite/delegates/gpu/cl/inference_context.h" #include "tensorflow/lite/delegates/gpu/cl/kernels/gpu_operation.h" -#include "tensorflow/lite/delegates/gpu/cl/precision.h" #include "tensorflow/lite/delegates/gpu/cl/serialization_generated.h" #include "tensorflow/lite/delegates/gpu/common/model.h" +#include "tensorflow/lite/delegates/gpu/common/precision.h" #include "tensorflow/lite/delegates/gpu/common/task/arguments.h" #include "tensorflow/lite/delegates/gpu/common/task/buffer_desc.h" #include "tensorflow/lite/delegates/gpu/common/task/gpu_object_desc.h" diff --git a/tensorflow/lite/delegates/gpu/common/BUILD b/tensorflow/lite/delegates/gpu/common/BUILD index 99d915f0ed2..084a7814846 100644 --- a/tensorflow/lite/delegates/gpu/common/BUILD +++ b/tensorflow/lite/delegates/gpu/common/BUILD @@ -245,6 +245,15 @@ cc_library( ], ) +cc_library( + name = "precision", + srcs = ["precision.cc"], + hdrs = ["precision.h"], + deps = [ + "//tensorflow/lite/delegates/gpu/common:data_type", + ], +) + cc_library( name = "quantization_util", srcs = ["quantization_util.cc"], diff --git a/tensorflow/lite/delegates/gpu/cl/precision.cc b/tensorflow/lite/delegates/gpu/common/precision.cc similarity index 93% rename from tensorflow/lite/delegates/gpu/cl/precision.cc rename to tensorflow/lite/delegates/gpu/common/precision.cc index c4d48668bff..7dc619eb112 100644 --- a/tensorflow/lite/delegates/gpu/cl/precision.cc +++ b/tensorflow/lite/delegates/gpu/common/precision.cc @@ -13,11 +13,10 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tensorflow/lite/delegates/gpu/cl/precision.h" +#include "tensorflow/lite/delegates/gpu/common/precision.h" namespace tflite { namespace gpu { -namespace cl { std::string ToString(CalculationsPrecision precision) { switch (precision) { @@ -38,6 +37,5 @@ DataType DeduceDataTypeFromPrecision(CalculationsPrecision precision) { } } -} // namespace cl } // namespace gpu } // namespace tflite diff --git a/tensorflow/lite/delegates/gpu/cl/precision.h b/tensorflow/lite/delegates/gpu/common/precision.h similarity index 87% rename from tensorflow/lite/delegates/gpu/cl/precision.h rename to tensorflow/lite/delegates/gpu/common/precision.h index 10afcd661c1..81bb6f0a081 100644 --- a/tensorflow/lite/delegates/gpu/cl/precision.h +++ b/tensorflow/lite/delegates/gpu/common/precision.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_LITE_DELEGATES_GPU_CL_PRECISION_H_ -#define TENSORFLOW_LITE_DELEGATES_GPU_CL_PRECISION_H_ +#ifndef TENSORFLOW_LITE_DELEGATES_GPU_COMMON_TASK_PRECISION_H_ +#define TENSORFLOW_LITE_DELEGATES_GPU_COMMON_TASK_PRECISION_H_ #include @@ -22,7 +22,6 @@ limitations under the License. namespace tflite { namespace gpu { -namespace cl { enum class CalculationsPrecision { F32, F32_F16, F16 }; // F32 - all data and all math ops in F32 @@ -36,8 +35,7 @@ DataType DeduceDataTypeFromPrecision(CalculationsPrecision precision); std::string ToString(CalculationsPrecision precision); -} // namespace cl } // namespace gpu } // namespace tflite -#endif // TENSORFLOW_LITE_DELEGATES_GPU_CL_PRECISION_H_ +#endif // TENSORFLOW_LITE_DELEGATES_GPU_COMMON_TASK_PRECISION_H_