ModelHints moved to gpu/common.
PiperOrigin-RevId: 342970042 Change-Id: Ib52555b2550a6f9e1695e2ab7a8f0b4a12671f40
This commit is contained in:
parent
0b2a1f79a1
commit
e34e39a1f9
tensorflow/lite/delegates/gpu
@ -401,7 +401,6 @@ cc_library(
|
||||
":cl_operation",
|
||||
":environment",
|
||||
":gpu_object",
|
||||
":model_hints",
|
||||
":opencl_wrapper",
|
||||
":serialization_cc_fbs",
|
||||
":storage_type_util",
|
||||
@ -412,6 +411,7 @@ cc_library(
|
||||
"//tensorflow/lite/delegates/gpu/common:data_type",
|
||||
"//tensorflow/lite/delegates/gpu/common:memory_management",
|
||||
"//tensorflow/lite/delegates/gpu/common:model",
|
||||
"//tensorflow/lite/delegates/gpu/common:model_hints",
|
||||
"//tensorflow/lite/delegates/gpu/common:model_transformer",
|
||||
"//tensorflow/lite/delegates/gpu/common:operations",
|
||||
"//tensorflow/lite/delegates/gpu/common:precision",
|
||||
@ -454,11 +454,6 @@ cc_library(
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "model_hints",
|
||||
hdrs = ["model_hints.h"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "opencl_wrapper",
|
||||
srcs = ["opencl_wrapper.cc"],
|
||||
|
@ -28,7 +28,6 @@ limitations under the License.
|
||||
#include "tensorflow/lite/delegates/gpu/cl/buffer.h"
|
||||
#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/selectors/operation_selector.h"
|
||||
#include "tensorflow/lite/delegates/gpu/cl/selectors/special_selector.h"
|
||||
#include "tensorflow/lite/delegates/gpu/cl/storage_type_util.h"
|
||||
|
@ -28,11 +28,11 @@ limitations under the License.
|
||||
#include "tensorflow/lite/delegates/gpu/cl/cl_operation.h"
|
||||
#include "tensorflow/lite/delegates/gpu/cl/environment.h"
|
||||
#include "tensorflow/lite/delegates/gpu/cl/gpu_object.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/serialization_generated.h"
|
||||
#include "tensorflow/lite/delegates/gpu/cl/tensor.h"
|
||||
#include "tensorflow/lite/delegates/gpu/common/model.h"
|
||||
#include "tensorflow/lite/delegates/gpu/common/model_hints.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"
|
||||
|
@ -8,7 +8,6 @@ cc_library(
|
||||
srcs = ["convolution_selector.cc"],
|
||||
hdrs = ["convolution_selector.h"],
|
||||
deps = [
|
||||
"//tensorflow/lite/delegates/gpu/cl:model_hints",
|
||||
"//tensorflow/lite/delegates/gpu/cl/kernels:conv_buffer_1x1",
|
||||
"//tensorflow/lite/delegates/gpu/cl/kernels:conv_common",
|
||||
"//tensorflow/lite/delegates/gpu/cl/kernels:conv_constants",
|
||||
@ -16,6 +15,7 @@ cc_library(
|
||||
"//tensorflow/lite/delegates/gpu/cl/kernels:conv_weights_converter",
|
||||
"//tensorflow/lite/delegates/gpu/cl/kernels:gpu_operation",
|
||||
"//tensorflow/lite/delegates/gpu/cl/kernels:work_group_picking",
|
||||
"//tensorflow/lite/delegates/gpu/common:model_hints",
|
||||
"//tensorflow/lite/delegates/gpu/common:operations",
|
||||
"//tensorflow/lite/delegates/gpu/common:shape",
|
||||
"//tensorflow/lite/delegates/gpu/common:status",
|
||||
@ -50,10 +50,10 @@ cc_library(
|
||||
deps = [
|
||||
":subgraph",
|
||||
"//tensorflow/lite/delegates/gpu/cl:device_info",
|
||||
"//tensorflow/lite/delegates/gpu/cl:model_hints",
|
||||
"//tensorflow/lite/delegates/gpu/cl/kernels:gpu_operation",
|
||||
"//tensorflow/lite/delegates/gpu/cl/selectors/default:default_selector",
|
||||
"//tensorflow/lite/delegates/gpu/common:model",
|
||||
"//tensorflow/lite/delegates/gpu/common:model_hints",
|
||||
"//tensorflow/lite/delegates/gpu/common:status",
|
||||
"//tensorflow/lite/delegates/gpu/common/task:tensor_desc",
|
||||
],
|
||||
@ -101,7 +101,6 @@ cc_library(
|
||||
":simple_selectors",
|
||||
":subgraph",
|
||||
"//tensorflow/lite/delegates/gpu/cl:cl_device",
|
||||
"//tensorflow/lite/delegates/gpu/cl:model_hints",
|
||||
"//tensorflow/lite/delegates/gpu/cl:storage_type_util",
|
||||
"//tensorflow/lite/delegates/gpu/cl/kernels:conv_common",
|
||||
"//tensorflow/lite/delegates/gpu/cl/kernels:elementwise",
|
||||
@ -112,6 +111,7 @@ cc_library(
|
||||
"//tensorflow/lite/delegates/gpu/cl/selectors:default_selector",
|
||||
"//tensorflow/lite/delegates/gpu/common:data_type",
|
||||
"//tensorflow/lite/delegates/gpu/common:model",
|
||||
"//tensorflow/lite/delegates/gpu/common:model_hints",
|
||||
"//tensorflow/lite/delegates/gpu/common:shape",
|
||||
"//tensorflow/lite/delegates/gpu/common:status",
|
||||
"//tensorflow/lite/delegates/gpu/common:tensor",
|
||||
|
@ -20,7 +20,7 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/lite/delegates/gpu/cl/kernels/conv_common.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/common/model_hints.h"
|
||||
#include "tensorflow/lite/delegates/gpu/common/operations.h"
|
||||
#include "tensorflow/lite/delegates/gpu/common/shape.h"
|
||||
#include "tensorflow/lite/delegates/gpu/common/status.h"
|
||||
|
@ -7,10 +7,10 @@ cc_library(
|
||||
name = "default_selector",
|
||||
srcs = ["default_selector.cc"],
|
||||
deps = [
|
||||
"//tensorflow/lite/delegates/gpu/cl:model_hints",
|
||||
"//tensorflow/lite/delegates/gpu/cl/kernels:gpu_operation",
|
||||
"//tensorflow/lite/delegates/gpu/cl/selectors:subgraph",
|
||||
"//tensorflow/lite/delegates/gpu/common:model",
|
||||
"//tensorflow/lite/delegates/gpu/common:model_hints",
|
||||
"//tensorflow/lite/delegates/gpu/common:operations",
|
||||
"//tensorflow/lite/delegates/gpu/common:status",
|
||||
"@com_google_absl//absl/strings",
|
||||
|
@ -17,9 +17,9 @@ limitations under the License.
|
||||
|
||||
#include "absl/strings/str_cat.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/selectors/subgraph.h"
|
||||
#include "tensorflow/lite/delegates/gpu/common/model.h"
|
||||
#include "tensorflow/lite/delegates/gpu/common/model_hints.h"
|
||||
#include "tensorflow/lite/delegates/gpu/common/operations.h"
|
||||
#include "tensorflow/lite/delegates/gpu/common/status.h"
|
||||
|
||||
|
@ -20,9 +20,9 @@ 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/model_hints.h"
|
||||
#include "tensorflow/lite/delegates/gpu/cl/selectors/subgraph.h"
|
||||
#include "tensorflow/lite/delegates/gpu/common/model.h"
|
||||
#include "tensorflow/lite/delegates/gpu/common/model_hints.h"
|
||||
#include "tensorflow/lite/delegates/gpu/common/status.h"
|
||||
#include "tensorflow/lite/delegates/gpu/common/task/tensor_desc.h"
|
||||
|
||||
|
@ -19,9 +19,9 @@ limitations under the License.
|
||||
#include <memory>
|
||||
|
||||
#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/selectors/subgraph.h"
|
||||
#include "tensorflow/lite/delegates/gpu/common/model.h"
|
||||
#include "tensorflow/lite/delegates/gpu/common/model_hints.h"
|
||||
#include "tensorflow/lite/delegates/gpu/common/status.h"
|
||||
#include "tensorflow/lite/delegates/gpu/common/task/tensor_desc.h"
|
||||
|
||||
|
@ -206,6 +206,11 @@ cc_library(
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "model_hints",
|
||||
hdrs = ["model_hints.h"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "model_transformer",
|
||||
srcs = ["model_transformer.cc"],
|
||||
|
@ -13,14 +13,13 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef TENSORFLOW_LITE_DELEGATES_GPU_CL_MODEL_HINTS_H_
|
||||
#define TENSORFLOW_LITE_DELEGATES_GPU_CL_MODEL_HINTS_H_
|
||||
#ifndef TENSORFLOW_LITE_DELEGATES_GPU_COMMON_MODEL_HINTS_H_
|
||||
#define TENSORFLOW_LITE_DELEGATES_GPU_COMMON_MODEL_HINTS_H_
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace tflite {
|
||||
namespace gpu {
|
||||
namespace cl {
|
||||
|
||||
struct ModelHints {
|
||||
using ModelHint = uint64_t;
|
||||
@ -34,7 +33,7 @@ struct ModelHints {
|
||||
|
||||
// Experimental.
|
||||
// Can improve performance and memory consumption, but slow down
|
||||
// initialization a lot and create more kernels.
|
||||
// initialization a lot and create more unique kernels.
|
||||
static constexpr ModelHint kAllowSpecialKernels = 0x00000004;
|
||||
|
||||
void Add(ModelHint hint) {
|
||||
@ -50,8 +49,7 @@ struct ModelHints {
|
||||
uint64_t hints = kFastestInference;
|
||||
};
|
||||
|
||||
} // namespace cl
|
||||
} // namespace gpu
|
||||
} // namespace tflite
|
||||
|
||||
#endif // TENSORFLOW_LITE_DELEGATES_GPU_CL_MODEL_HINTS_H_
|
||||
#endif // TENSORFLOW_LITE_DELEGATES_GPU_COMMON_MODEL_HINTS_H_
|
Loading…
Reference in New Issue
Block a user