提交 9c04d7c0 编写于 作者: A A. Unique TensorFlower 提交者: TensorFlower Gardener

TFLite GPU Delegate: Extract GpuInfo structure into separate translation module.

PiperOrigin-RevId: 262480689
上级 fcfca656
......@@ -52,6 +52,7 @@ cc_library(
"//tensorflow/lite/delegates/gpu/gl:command_queue",
"//tensorflow/lite/delegates/gpu/gl:compiler",
"//tensorflow/lite/delegates/gpu/gl:egl_environment",
"//tensorflow/lite/delegates/gpu/gl:request_gpu_info",
"//tensorflow/lite/delegates/gpu/gl:gl_call",
"//tensorflow/lite/delegates/gpu/gl/converters:bhwc_to_phwc4",
"//tensorflow/lite/delegates/gpu/gl/converters:phwc4_to_bhwc",
......
......@@ -24,6 +24,15 @@ cc_library(
hdrs = ["access_type.h"],
)
cc_library(
name = "gpu_info",
srcs = ["gpu_info.cc"],
hdrs = ["gpu_info.h"],
deps = [
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "data_type",
srcs = ["data_type.cc"],
......
......@@ -13,19 +13,16 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#include "tensorflow/lite/delegates/gpu/gl/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include <algorithm>
#include <cctype>
#include <string>
#include "absl/strings/ascii.h"
#include "tensorflow/lite/delegates/gpu/gl/gl_errors.h"
#include "tensorflow/lite/delegates/gpu/gl/portable_gl31.h"
namespace tflite {
namespace gpu {
namespace gl {
namespace {
GpuType GetGpuType(const std::string& renderer) {
......@@ -102,54 +99,5 @@ void GetGpuModelAndType(const std::string& renderer, GpuModel* gpu_model,
*gpu_type == GpuType::ADRENO ? GetGpuModel(lowered) : GpuModel::UNKNOWN;
}
Status RequestGpuInfo(GpuInfo* gpu_info) {
GpuInfo info;
const GLubyte* renderer_name = glGetString(GL_RENDERER);
if (renderer_name) {
info.renderer_name = reinterpret_cast<const char*>(renderer_name);
GetGpuModelAndType(info.renderer_name, &info.gpu_model, &info.type);
}
const GLubyte* vendor_name = glGetString(GL_VENDOR);
if (vendor_name) {
info.vendor_name = reinterpret_cast<const char*>(vendor_name);
}
const GLubyte* version_name = glGetString(GL_VERSION);
if (version_name) {
info.version = reinterpret_cast<const char*>(version_name);
}
glGetIntegerv(GL_MAJOR_VERSION, &info.major_version);
glGetIntegerv(GL_MINOR_VERSION, &info.minor_version);
GLint extensions_count;
glGetIntegerv(GL_NUM_EXTENSIONS, &extensions_count);
info.extensions.resize(extensions_count);
for (int i = 0; i < extensions_count; ++i) {
info.extensions[i] = std::string(
reinterpret_cast<const char*>(glGetStringi(GL_EXTENSIONS, i)));
}
glGetIntegerv(GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS, &info.max_ssbo_bindings);
glGetIntegerv(GL_MAX_COMPUTE_IMAGE_UNIFORMS, &info.max_image_bindings);
info.max_work_group_size.resize(3);
glGetIntegeri_v(GL_MAX_COMPUTE_WORK_GROUP_SIZE, 0,
&info.max_work_group_size[0]);
glGetIntegeri_v(GL_MAX_COMPUTE_WORK_GROUP_SIZE, 1,
&info.max_work_group_size[1]);
glGetIntegeri_v(GL_MAX_COMPUTE_WORK_GROUP_SIZE, 2,
&info.max_work_group_size[2]);
glGetIntegerv(GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS,
&info.max_work_group_invocations);
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &info.max_texture_size);
glGetIntegerv(GL_MAX_IMAGE_UNITS, &info.max_image_units);
glGetIntegerv(GL_MAX_ARRAY_TEXTURE_LAYERS, &info.max_array_texture_layers);
RETURN_IF_ERROR(GetOpenGlErrors());
*gpu_info = info;
return OkStatus();
}
} // namespace gl
} // namespace gpu
} // namespace tflite
......@@ -13,17 +13,14 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#ifndef TENSORFLOW_LITE_DELEGATES_GPU_GL_GPU_INFO_H_
#define TENSORFLOW_LITE_DELEGATES_GPU_GL_GPU_INFO_H_
#ifndef TENSORFLOW_LITE_DELEGATES_GPU_COMMON_GPU_INFO_H_
#define TENSORFLOW_LITE_DELEGATES_GPU_COMMON_GPU_INFO_H_
#include <string>
#include <vector>
#include "tensorflow/lite/delegates/gpu/common/status.h"
namespace tflite {
namespace gpu {
namespace gl {
enum class GpuType { UNKNOWN, MALI, ADRENO, POWERVR, INTEL, NVIDIA };
enum class GpuModel {
......@@ -89,12 +86,7 @@ struct GpuInfo {
void GetGpuModelAndType(const std::string& renderer, GpuModel* gpu_model,
GpuType* gpu_type);
// This method performs multiple GL calls, therefore, egl context needs to be
// created upfront.
Status RequestGpuInfo(GpuInfo* gpu_info);
} // namespace gl
} // namespace gpu
} // namespace tflite
#endif // TENSORFLOW_LITE_DELEGATES_GPU_GL_GPU_INFO_H_
#endif // TENSORFLOW_LITE_DELEGATES_GPU_COMMON_GPU_INFO_H_
......@@ -16,7 +16,7 @@ cc_library(
":compiler",
":compiler_options",
":gl_call",
":gpu_info",
":request_gpu_info",
":node_shader",
":object",
":object_manager",
......@@ -48,8 +48,8 @@ cc_library(
":gl_call",
":gl_program",
":gl_sync",
":gpu_info",
":portable",
"//tensorflow/lite/delegates/gpu/common:gpu_info",
"//tensorflow/lite/delegates/gpu/common:status",
"//tensorflow/lite/delegates/gpu/common:types",
"@com_google_absl//absl/memory",
......@@ -80,9 +80,9 @@ cc_library(
deps = [
":compiler_options",
":float16_conversions",
":gpu_info",
":node_shader",
"//tensorflow/lite/delegates/gpu/common:data_type",
"//tensorflow/lite/delegates/gpu/common:gpu_info",
"//tensorflow/lite/delegates/gpu/common:model",
"//tensorflow/lite/delegates/gpu/common:model_transformer",
"//tensorflow/lite/delegates/gpu/common:operations",
......@@ -103,7 +103,6 @@ cc_library(
name = "compiler_options",
hdrs = ["compiler_options.h"],
deps = [
":gpu_info",
":object",
],
)
......@@ -128,8 +127,8 @@ cc_library(
":egl_context",
":egl_surface",
":gl_call",
":gpu_info",
":portable",
":request_gpu_info",
"//tensorflow/lite/delegates/gpu/common:status",
"@com_google_absl//absl/memory",
],
......@@ -272,18 +271,6 @@ cc_library(
],
)
cc_library(
name = "gpu_info",
srcs = ["gpu_info.cc"],
hdrs = ["gpu_info.h"],
deps = [
":gl_errors",
":portable",
"//tensorflow/lite/delegates/gpu/common:status",
"@com_google_absl//absl/strings",
],
)
flatbuffer_cc_library(
name = "metadata_cc_fbs",
srcs = ["metadata.fbs"],
......@@ -298,9 +285,9 @@ cc_library(
hdrs = ["node_shader.h"],
deps = [
":compiler_options",
":gpu_info",
":object",
":variable",
"//tensorflow/lite/delegates/gpu/common:gpu_info",
"//tensorflow/lite/delegates/gpu/common:model",
"//tensorflow/lite/delegates/gpu/common:status",
"//tensorflow/lite/delegates/gpu/common:types",
......@@ -344,6 +331,19 @@ cc_library(
],
)
cc_library(
name = "request_gpu_info",
srcs = ["request_gpu_info.cc"],
hdrs = ["request_gpu_info.h"],
deps = [
":gl_errors",
":portable",
"//tensorflow/lite/delegates/gpu/common:gpu_info",
"//tensorflow/lite/delegates/gpu/common:status",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "runtime",
srcs = ["runtime.cc"],
......@@ -356,7 +356,6 @@ cc_library(
":gl_program",
":gl_shader",
":gl_texture",
":gpu_info",
":object",
":object_manager",
":portable",
......@@ -364,6 +363,7 @@ cc_library(
":stats",
":variable",
"//tensorflow/lite/delegates/gpu/common:data_type",
"//tensorflow/lite/delegates/gpu/common:gpu_info",
"//tensorflow/lite/delegates/gpu/common:status",
"//tensorflow/lite/delegates/gpu/common:types",
"//tensorflow/lite/delegates/gpu/gl/runtime:shared_buffer",
......
......@@ -31,9 +31,9 @@ limitations under the License.
#include "tensorflow/lite/delegates/gpu/common/util.h"
#include "tensorflow/lite/delegates/gpu/gl/compiler.h"
#include "tensorflow/lite/delegates/gpu/gl/gl_call.h"
#include "tensorflow/lite/delegates/gpu/gl/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/gl/object.h"
#include "tensorflow/lite/delegates/gpu/gl/portable_gl31.h"
#include "tensorflow/lite/delegates/gpu/gl/request_gpu_info.h"
#include "tensorflow/lite/delegates/gpu/gl/runtime.h"
#include "tensorflow/lite/delegates/gpu/gl/variable.h"
......
......@@ -16,6 +16,7 @@ limitations under the License.
#include "tensorflow/lite/delegates/gpu/gl/command_queue.h"
#include "absl/memory/memory.h"
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/common/status.h"
#include "tensorflow/lite/delegates/gpu/common/types.h"
#include "tensorflow/lite/delegates/gpu/gl/gl_call.h"
......
......@@ -18,10 +18,10 @@ limitations under the License.
#include <memory>
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/common/status.h"
#include "tensorflow/lite/delegates/gpu/common/types.h"
#include "tensorflow/lite/delegates/gpu/gl/gl_program.h"
#include "tensorflow/lite/delegates/gpu/gl/gpu_info.h"
namespace tflite {
namespace gpu {
......
......@@ -24,6 +24,7 @@ limitations under the License.
#include "absl/memory/memory.h"
#include "absl/types/any.h"
#include "tensorflow/lite/delegates/gpu/common/data_type.h"
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/common/model_transformer.h"
#include "tensorflow/lite/delegates/gpu/common/operations.h"
#include "tensorflow/lite/delegates/gpu/common/status.h"
......
......@@ -20,11 +20,11 @@ limitations under the License.
#include <memory>
#include <unordered_set>
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/common/model.h"
#include "tensorflow/lite/delegates/gpu/common/status.h"
#include "tensorflow/lite/delegates/gpu/gl/compiler/shader_code.h"
#include "tensorflow/lite/delegates/gpu/gl/compiler_options.h"
#include "tensorflow/lite/delegates/gpu/gl/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/gl/node_shader.h"
namespace tflite {
......
......@@ -81,10 +81,10 @@ cc_library(
":preprocessor",
":shader_code",
":variable_accessor",
"//tensorflow/lite/delegates/gpu/common:gpu_info",
"//tensorflow/lite/delegates/gpu/common:model",
"//tensorflow/lite/delegates/gpu/common:status",
"//tensorflow/lite/delegates/gpu/gl:compiler_options",
"//tensorflow/lite/delegates/gpu/gl:gpu_info",
"//tensorflow/lite/delegates/gpu/gl:object",
"//tensorflow/lite/delegates/gpu/gl:variable",
"@com_google_absl//absl/strings",
......
......@@ -18,6 +18,7 @@ limitations under the License.
#include <algorithm>
#include "absl/strings/str_cat.h"
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/common/status.h"
#include "tensorflow/lite/delegates/gpu/gl/compiler/preprocessor.h"
#include "tensorflow/lite/delegates/gpu/gl/compiler/variable_accessor.h"
......
......@@ -19,13 +19,13 @@ limitations under the License.
#include <string>
#include <vector>
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/common/model.h"
#include "tensorflow/lite/delegates/gpu/common/status.h"
#include "tensorflow/lite/delegates/gpu/gl/compiler/compiled_node.h"
#include "tensorflow/lite/delegates/gpu/gl/compiler/object_accessor.h"
#include "tensorflow/lite/delegates/gpu/gl/compiler/shader_code.h"
#include "tensorflow/lite/delegates/gpu/gl/compiler_options.h"
#include "tensorflow/lite/delegates/gpu/gl/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/gl/object.h"
namespace tflite {
......
......@@ -16,7 +16,6 @@ limitations under the License.
#ifndef TENSORFLOW_LITE_DELEGATES_GPU_GL_COMPILER_OPTIONS_H_
#define TENSORFLOW_LITE_DELEGATES_GPU_GL_COMPILER_OPTIONS_H_
#include "tensorflow/lite/delegates/gpu/gl/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/gl/object.h"
namespace tflite {
......
......@@ -18,6 +18,7 @@ limitations under the License.
#include "absl/memory/memory.h"
#include "tensorflow/lite/delegates/gpu/common/status.h"
#include "tensorflow/lite/delegates/gpu/gl/gl_call.h"
#include "tensorflow/lite/delegates/gpu/gl/request_gpu_info.h"
namespace tflite {
namespace gpu {
......
......@@ -21,9 +21,9 @@ limitations under the License.
#include "tensorflow/lite/delegates/gpu/common/status.h"
#include "tensorflow/lite/delegates/gpu/gl/egl_context.h"
#include "tensorflow/lite/delegates/gpu/gl/egl_surface.h"
#include "tensorflow/lite/delegates/gpu/gl/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/gl/portable_egl.h"
#include "tensorflow/lite/delegates/gpu/gl/portable_gl31.h"
#include "tensorflow/lite/delegates/gpu/gl/request_gpu_info.h"
namespace tflite {
namespace gpu {
......
......@@ -582,9 +582,9 @@ cc_library(
"//tensorflow/lite/delegates/gpu/gl:compiler_options",
"//tensorflow/lite/delegates/gpu/gl:egl_environment",
"//tensorflow/lite/delegates/gpu/gl:gl_buffer",
"//tensorflow/lite/delegates/gpu/gl:gpu_info",
"//tensorflow/lite/delegates/gpu/gl:node_shader",
"//tensorflow/lite/delegates/gpu/gl:object_manager",
"//tensorflow/lite/delegates/gpu/gl:request_gpu_info",
"//tensorflow/lite/delegates/gpu/gl:runtime_options",
"//tensorflow/lite/delegates/gpu/gl/workgroups:default_calculator",
"@com_google_googletest//:gtest",
......
......@@ -28,8 +28,8 @@ limitations under the License.
#include "tensorflow/lite/delegates/gpu/gl/api.h"
#include "tensorflow/lite/delegates/gpu/gl/egl_environment.h"
#include "tensorflow/lite/delegates/gpu/gl/gl_buffer.h"
#include "tensorflow/lite/delegates/gpu/gl/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/gl/object_manager.h"
#include "tensorflow/lite/delegates/gpu/gl/request_gpu_info.h"
#include "tensorflow/lite/delegates/gpu/gl/workgroups/default_calculator.h"
namespace tflite {
......
......@@ -21,11 +21,11 @@ limitations under the License.
#include <string>
#include <vector>
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/common/model.h"
#include "tensorflow/lite/delegates/gpu/common/status.h"
#include "tensorflow/lite/delegates/gpu/common/types.h"
#include "tensorflow/lite/delegates/gpu/gl/compiler_options.h"
#include "tensorflow/lite/delegates/gpu/gl/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/gl/object.h"
#include "tensorflow/lite/delegates/gpu/gl/variable.h"
......
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#include "tensorflow/lite/delegates/gpu/gl/request_gpu_info.h"
#include <algorithm>
#include <cctype>
#include <string>
#include "absl/strings/ascii.h"
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/gl/gl_errors.h"
#include "tensorflow/lite/delegates/gpu/gl/portable_gl31.h"
namespace tflite {
namespace gpu {
namespace gl {
Status RequestGpuInfo(GpuInfo* gpu_info) {
GpuInfo info;
const GLubyte* renderer_name = glGetString(GL_RENDERER);
if (renderer_name) {
info.renderer_name = reinterpret_cast<const char*>(renderer_name);
GetGpuModelAndType(info.renderer_name, &info.gpu_model, &info.type);
}
const GLubyte* vendor_name = glGetString(GL_VENDOR);
if (vendor_name) {
info.vendor_name = reinterpret_cast<const char*>(vendor_name);
}
const GLubyte* version_name = glGetString(GL_VERSION);
if (version_name) {
info.version = reinterpret_cast<const char*>(version_name);
}
glGetIntegerv(GL_MAJOR_VERSION, &info.major_version);
glGetIntegerv(GL_MINOR_VERSION, &info.minor_version);
GLint extensions_count;
glGetIntegerv(GL_NUM_EXTENSIONS, &extensions_count);
info.extensions.resize(extensions_count);
for (int i = 0; i < extensions_count; ++i) {
info.extensions[i] = std::string(
reinterpret_cast<const char*>(glGetStringi(GL_EXTENSIONS, i)));
}
glGetIntegerv(GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS, &info.max_ssbo_bindings);
glGetIntegerv(GL_MAX_COMPUTE_IMAGE_UNIFORMS, &info.max_image_bindings);
info.max_work_group_size.resize(3);
glGetIntegeri_v(GL_MAX_COMPUTE_WORK_GROUP_SIZE, 0,
&info.max_work_group_size[0]);
glGetIntegeri_v(GL_MAX_COMPUTE_WORK_GROUP_SIZE, 1,
&info.max_work_group_size[1]);
glGetIntegeri_v(GL_MAX_COMPUTE_WORK_GROUP_SIZE, 2,
&info.max_work_group_size[2]);
glGetIntegerv(GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS,
&info.max_work_group_invocations);
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &info.max_texture_size);
glGetIntegerv(GL_MAX_IMAGE_UNITS, &info.max_image_units);
glGetIntegerv(GL_MAX_ARRAY_TEXTURE_LAYERS, &info.max_array_texture_layers);
RETURN_IF_ERROR(GetOpenGlErrors());
*gpu_info = info;
return OkStatus();
}
} // namespace gl
} // namespace gpu
} // namespace tflite
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#ifndef TENSORFLOW_LITE_DELEGATES_GPU_GL_REQUEST_GPU_INFO_H_
#define TENSORFLOW_LITE_DELEGATES_GPU_GL_REQUEST_GPU_INFO_H_
#include <string>
#include <vector>
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/common/status.h"
namespace tflite {
namespace gpu {
namespace gl {
// This method performs multiple GL calls, therefore, egl context needs to be
// created upfront.
Status RequestGpuInfo(GpuInfo* gpu_info);
} // namespace gl
} // namespace gpu
} // namespace tflite
#endif // TENSORFLOW_LITE_DELEGATES_GPU_GL_REQUEST_GPU_INFO_H_
......@@ -22,6 +22,7 @@ limitations under the License.
#include "absl/strings/str_cat.h"
#include "tensorflow/lite/delegates/gpu/common/data_type.h"
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/common/status.h"
#include "tensorflow/lite/delegates/gpu/common/types.h"
#include "tensorflow/lite/delegates/gpu/gl/gl_call.h"
......
......@@ -18,13 +18,13 @@ limitations under the License.
#include <vector>
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/common/status.h"
#include "tensorflow/lite/delegates/gpu/common/types.h"
#include "tensorflow/lite/delegates/gpu/gl/command_queue.h"
#include "tensorflow/lite/delegates/gpu/gl/gl_buffer.h"
#include "tensorflow/lite/delegates/gpu/gl/gl_program.h"
#include "tensorflow/lite/delegates/gpu/gl/gl_shader.h"
#include "tensorflow/lite/delegates/gpu/gl/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/gl/object.h"
#include "tensorflow/lite/delegates/gpu/gl/object_manager.h"
#include "tensorflow/lite/delegates/gpu/gl/runtime/shared_buffer.h"
......
......@@ -8,8 +8,8 @@ cc_library(
srcs = ["calculator.cc"],
hdrs = ["calculator.h"],
deps = [
"//tensorflow/lite/delegates/gpu/common:gpu_info",
"//tensorflow/lite/delegates/gpu/common:types",
"//tensorflow/lite/delegates/gpu/gl:gpu_info",
"//tensorflow/lite/delegates/gpu/gl/compiler:shader_code",
],
)
......@@ -20,8 +20,8 @@ cc_library(
hdrs = ["default_calculator.h"],
deps = [
":calculator",
"//tensorflow/lite/delegates/gpu/common:gpu_info",
"//tensorflow/lite/delegates/gpu/common:types",
"//tensorflow/lite/delegates/gpu/gl:gpu_info",
],
)
......@@ -35,7 +35,7 @@ cc_library(
":default_calculator",
"//tensorflow/lite/delegates/gpu/gl:common_cc_fbs",
"//tensorflow/lite/delegates/gpu/gl:workgroups_cc_fbs",
"//tensorflow/lite/delegates/gpu/gl:gpu_info",
"//tensorflow/lite/delegates/gpu/common:gpu_info",
"//tensorflow/lite/delegates/gpu/gl:metadata_cc_fbs",
":calculator",
"@com_google_absl//absl/memory",
......@@ -52,7 +52,7 @@ cc_library(
deps = [
":calculator",
":default_calculator",
"//tensorflow/lite/delegates/gpu/gl:gpu_info",
"//tensorflow/lite/delegates/gpu/common:gpu_info",
] + select({
"//tensorflow/lite/delegates/gpu:tflite_gpu_binary_release": [],
"//conditions:default": [
......@@ -67,9 +67,9 @@ cc_library(
hdrs = ["ideal_workgroup_picker.h"],
deps = [
":calculator",
"//tensorflow/lite/delegates/gpu/common:gpu_info",
"//tensorflow/lite/delegates/gpu/common:operations",
"//tensorflow/lite/delegates/gpu/common:shape",
"//tensorflow/lite/delegates/gpu/common:types",
"//tensorflow/lite/delegates/gpu/gl:gpu_info",
],
)
......@@ -15,6 +15,7 @@ limitations under the License.
#include "tensorflow/lite/delegates/gpu/gl/workgroups/best_effort_calculator.h"
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/gl/workgroups/calculator.h"
#include "tensorflow/lite/delegates/gpu/gl/workgroups/default_calculator.h"
......
......@@ -16,7 +16,7 @@ limitations under the License.
#ifndef TENSORFLOW_LITE_DELEGATES_GPU_GL_WORKGROUPS_BEST_EFFORT_CALCULATOR_H_
#define TENSORFLOW_LITE_DELEGATES_GPU_GL_WORKGROUPS_BEST_EFFORT_CALCULATOR_H_
#include "tensorflow/lite/delegates/gpu/gl/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/gl/workgroups/calculator.h"
namespace tflite {
......
......@@ -15,9 +15,9 @@ limitations under the License.
#include "tensorflow/lite/delegates/gpu/gl/workgroups/calculator.h"
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/common/types.h"
#include "tensorflow/lite/delegates/gpu/gl/compiler/shader_code.h"
#include "tensorflow/lite/delegates/gpu/gl/gpu_info.h"
namespace tflite {
namespace gpu {
......
......@@ -18,9 +18,9 @@ limitations under the License.
#include <memory>
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/common/types.h"
#include "tensorflow/lite/delegates/gpu/gl/compiler/shader_code.h"
#include "tensorflow/lite/delegates/gpu/gl/gpu_info.h"
namespace tflite {
namespace gpu {
......
......@@ -20,15 +20,15 @@ limitations under the License.
#include <memory>
#include <unordered_map>
#include "absl/memory/memory.h"
#include "flatbuffers/flatbuffers.h" // TF:flatbuffers
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/common/types.h"
#include "tensorflow/lite/delegates/gpu/gl/metadata_generated.h"
#include "tensorflow/lite/delegates/gpu/gl/workgroups/calculator.h"
#include "tensorflow/lite/delegates/gpu/gl/workgroups/default_calculator.h"
#include "tensorflow/lite/delegates/gpu/gl/workgroups_generated.h"
#include "absl/memory/memory.h"
#include "flatbuffers/flatbuffers.h" // TF:flatbuffers
#include "tensorflow/lite/delegates/gpu/common/types.h"
#endif // TFLITE_GPU_BINARY_RELEASE
namespace tflite {
......
......@@ -16,7 +16,7 @@ limitations under the License.
#ifndef TENSORFLOW_LITE_DELEGATES_GPU_GL_WORKGROUPS_CALCULATOR_FROM_METADATA_H_
#define TENSORFLOW_LITE_DELEGATES_GPU_GL_WORKGROUPS_CALCULATOR_FROM_METADATA_H_
#include "tensorflow/lite/delegates/gpu/gl/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/gl/workgroups/calculator.h"
namespace tflite {
......
......@@ -15,6 +15,7 @@ limitations under the License.
#include "tensorflow/lite/delegates/gpu/gl/workgroups/default_calculator.h"
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/common/types.h"
#include "tensorflow/lite/delegates/gpu/gl/workgroups/calculator.h"
......
......@@ -16,7 +16,7 @@ limitations under the License.
#ifndef TENSORFLOW_LITE_DELEGATES_GPU_GL_WORKGROUPS_DEFAULT_CALCULATOR_H_
#define TENSORFLOW_LITE_DELEGATES_GPU_GL_WORKGROUPS_DEFAULT_CALCULATOR_H_
#include "tensorflow/lite/delegates/gpu/gl/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/gl/workgroups/calculator.h"
namespace tflite {
......
......@@ -18,10 +18,10 @@ limitations under the License.
#include <map>
#include <vector>
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/common/operations.h"
#include "tensorflow/lite/delegates/gpu/common/shape.h"
#include "tensorflow/lite/delegates/gpu/common/types.h"
#include "tensorflow/lite/delegates/gpu/gl/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/gl/workgroups/calculator.h"
namespace tflite {
......
......@@ -16,10 +16,10 @@ limitations under the License.
#ifndef TENSORFLOW_LITE_DELEGATES_GPU_GL_WORKGROUPS_IDEAL_WORKGROUP_PICKER_H_
#define TENSORFLOW_LITE_DELEGATES_GPU_GL_WORKGROUPS_IDEAL_WORKGROUP_PICKER_H_
#include "tensorflow/lite/delegates/gpu/common/gpu_info.h"
#include "tensorflow/lite/delegates/gpu/common/operations.h"
#include "tensorflow/lite/delegates/gpu/common/shape.h"
#include "tensorflow/lite/delegates/gpu/common/types.h"
#include "tensorflow/lite/delegates/gpu/gl/gpu_info.h"
namespace tflite {
namespace gpu {
......
......@@ -43,6 +43,7 @@ limitations under the License.
#include "tensorflow/lite/delegates/gpu/gl/egl_environment.h"
#include "tensorflow/lite/delegates/gpu/gl/gl_call.h"
#include "tensorflow/lite/delegates/gpu/gl/kernels/registry.h"
#include "tensorflow/lite/delegates/gpu/gl/request_gpu_info.h"
#include "tensorflow/lite/delegates/gpu/gl/workgroups/best_effort_calculator.h"
#include "tensorflow/lite/minimal_logging.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册