-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtf-v2.2.0-nostatus.patch
118 lines (105 loc) · 4.43 KB
/
tf-v2.2.0-nostatus.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
diff --git a/tensorflow/lite/delegates/gpu/cl/api.cc b/tensorflow/lite/delegates/gpu/cl/api.cc
index 0158672f..81133ebc 100644
--- a/tensorflow/lite/delegates/gpu/cl/api.cc
+++ b/tensorflow/lite/delegates/gpu/cl/api.cc
@@ -19,6 +19,7 @@ limitations under the License.
#include <cstring>
#include <EGL/eglext.h>
+#undef Status
#include "absl/memory/memory.h"
#include "absl/types/span.h"
#include "tensorflow/lite/delegates/gpu/cl/cl_command_queue.h"
diff --git a/tensorflow/lite/delegates/gpu/cl/api.h b/tensorflow/lite/delegates/gpu/cl/api.h
index 2ac5ce2e..4773956e 100644
--- a/tensorflow/lite/delegates/gpu/cl/api.h
+++ b/tensorflow/lite/delegates/gpu/cl/api.h
@@ -20,6 +20,7 @@ limitations under the License.
#include <memory>
#include <EGL/egl.h>
+#undef Status
#include "absl/types/span.h"
#include "tensorflow/lite/delegates/gpu/api.h"
#include "tensorflow/lite/delegates/gpu/common/model.h"
diff --git a/tensorflow/lite/delegates/gpu/cl/egl_sync.h b/tensorflow/lite/delegates/gpu/cl/egl_sync.h
index 27a551c5..a36d30c5 100644
--- a/tensorflow/lite/delegates/gpu/cl/egl_sync.h
+++ b/tensorflow/lite/delegates/gpu/cl/egl_sync.h
@@ -18,6 +18,7 @@ limitations under the License.
#include <EGL/egl.h>
#include <EGL/eglext.h>
+#undef Status
#include "tensorflow/lite/delegates/gpu/common/status.h"
namespace tflite {
diff --git a/tensorflow/lite/delegates/gpu/cl/gl_interop.h b/tensorflow/lite/delegates/gpu/cl/gl_interop.h
index 74c95530..b99c063e 100644
--- a/tensorflow/lite/delegates/gpu/cl/gl_interop.h
+++ b/tensorflow/lite/delegates/gpu/cl/gl_interop.h
@@ -20,6 +20,7 @@ limitations under the License.
#include <EGL/egl.h>
#include <EGL/eglext.h>
+#undef Status
#include "tensorflow/lite/delegates/gpu/cl/cl_context.h"
#include "tensorflow/lite/delegates/gpu/cl/cl_device.h"
#include "tensorflow/lite/delegates/gpu/cl/cl_event.h"
diff --git a/tensorflow/lite/delegates/gpu/gl/egl_context.h b/tensorflow/lite/delegates/gpu/gl/egl_context.h
index 72c53d2d..8dc5138b 100644
--- a/tensorflow/lite/delegates/gpu/gl/egl_context.h
+++ b/tensorflow/lite/delegates/gpu/gl/egl_context.h
@@ -84,6 +84,8 @@ class EglContext {
bool has_ownership_;
};
+#undef Status
+
// It uses the EGL_KHR_no_config_context extension to create a no config context
// since most modern hardware supports the extension.
Status CreateConfiglessContext(EGLDisplay display, EGLContext shared_context,
diff --git a/tensorflow/lite/delegates/gpu/gl/gl_errors.cc b/tensorflow/lite/delegates/gpu/gl/gl_errors.cc
index 2c291278..ba6bda3b 100644
--- a/tensorflow/lite/delegates/gpu/gl/gl_errors.cc
+++ b/tensorflow/lite/delegates/gpu/gl/gl_errors.cc
@@ -28,6 +28,7 @@ namespace gpu {
namespace gl {
namespace {
+
const char* ErrorToString(GLenum error) {
switch (error) {
case GL_INVALID_ENUM:
diff --git a/tensorflow/lite/delegates/gpu/gl/portable_egl.h b/tensorflow/lite/delegates/gpu/gl/portable_egl.h
index 7be19851..1c55b843 100644
--- a/tensorflow/lite/delegates/gpu/gl/portable_egl.h
+++ b/tensorflow/lite/delegates/gpu/gl/portable_egl.h
@@ -19,4 +19,5 @@ limitations under the License.
#include <EGL/egl.h>
#include <EGL/eglext.h>
+#undef Status
#endif // TENSORFLOW_LITE_DELEGATES_GPU_GL_PORTABLE_EGL_H_
diff --git a/tensorflow/lite/delegates/gpu/gl/portable_gl31.h b/tensorflow/lite/delegates/gpu/gl/portable_gl31.h
index a3d03bf1..85bf61cd 100644
--- a/tensorflow/lite/delegates/gpu/gl/portable_gl31.h
+++ b/tensorflow/lite/delegates/gpu/gl/portable_gl31.h
@@ -33,4 +33,6 @@ limitations under the License.
#include <GLES3/gl31.h>
+#undef Status
+
#endif // TENSORFLOW_LITE_DELEGATES_GPU_GL_PORTABLE_GL31_H_
diff --git a/tensorflow/lite/delegates/gpu/gl_delegate.cc b/tensorflow/lite/delegates/gpu/gl_delegate.cc
index df22efdf..977592d8 100644
--- a/tensorflow/lite/delegates/gpu/gl_delegate.cc
+++ b/tensorflow/lite/delegates/gpu/gl_delegate.cc
@@ -24,6 +24,7 @@ limitations under the License.
#include <EGL/egl.h>
#include <GLES3/gl31.h>
+#undef Status
#include "absl/types/span.h"
#include "tensorflow/lite/builtin_ops.h"
#include "tensorflow/lite/c/common.h"
diff --git a/tensorflow/lite/delegates/gpu/gl_delegate.h b/tensorflow/lite/delegates/gpu/gl_delegate.h
index bfc15fb1..8699e15d 100644
--- a/tensorflow/lite/delegates/gpu/gl_delegate.h
+++ b/tensorflow/lite/delegates/gpu/gl_delegate.h
@@ -19,6 +19,7 @@ limitations under the License.
#include <stdint.h>
#include <GLES3/gl31.h>
+#undef Status
#include "absl/base/macros.h"
#include "tensorflow/lite/c/common.h"