Move AccessType to its own header to be shared by multiple gpu delegates.

PiperOrigin-RevId: 249063825
This commit is contained in:
A. Unique TensorFlower 2019-05-20 09:26:13 -07:00 committed by TensorFlower Gardener
parent 935ac2b733
commit 89855a887d
4 changed files with 38 additions and 6 deletions

View File

@ -18,6 +18,11 @@ cc_library(
],
)
cc_library(
name = "access_type",
hdrs = ["access_type.h"],
)
cc_library(
name = "data_type",
srcs = ["data_type.cc"],

View File

@ -0,0 +1,31 @@
/* 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_COMMON_ACCESS_TYPE_H_
#define TENSORFLOW_LITE_DELEGATES_GPU_COMMON_ACCESS_TYPE_H_
namespace tflite {
namespace gpu {
enum class AccessType {
READ,
WRITE,
READ_WRITE,
};
} // namespace gpu
} // namespace tflite
#endif // TENSORFLOW_LITE_DELEGATES_GPU_COMMON_ACCESS_TYPE_H_

View File

@ -306,6 +306,7 @@ cc_library(
name = "object",
hdrs = ["object.h"],
deps = [
"//tensorflow/lite/delegates/gpu/common:access_type",
"//tensorflow/lite/delegates/gpu/common:data_type",
"//tensorflow/lite/delegates/gpu/common:shape",
"//tensorflow/lite/delegates/gpu/common:types",

View File

@ -23,6 +23,7 @@ limitations under the License.
#include <vector>
#include "absl/types/variant.h"
#include "tensorflow/lite/delegates/gpu/common/access_type.h"
#include "tensorflow/lite/delegates/gpu/common/data_type.h"
#include "tensorflow/lite/delegates/gpu/common/shape.h"
#include "tensorflow/lite/delegates/gpu/common/types.h"
@ -32,12 +33,6 @@ namespace tflite {
namespace gpu {
namespace gl {
enum class AccessType {
READ,
WRITE,
READ_WRITE,
};
using ObjectData = std::vector<uint8_t>;
// Generic identifier to be used to lookup an object.