aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/framework/op_def_util.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <nobody@tensorflow.org>2016-04-19 08:31:43 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-04-19 09:42:58 -0700
commit50d0241b62b2dc924856248dedf00deb65728c3e (patch)
treeb7fdb7b2c492e94edaa9ce2b46dbdd5b71a5c98b /tensorflow/core/framework/op_def_util.cc
parent1779a7aca340268c6643c1a24906e32ab247dc4d (diff)
Change tensorflow code to use proto_text for DebugString and ShortDebugString
calls, for call sites that are needed on android. Also changed protobuf.h to use MessageLite. Change: 120236583
Diffstat (limited to 'tensorflow/core/framework/op_def_util.cc')
-rw-r--r--tensorflow/core/framework/op_def_util.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/tensorflow/core/framework/op_def_util.cc b/tensorflow/core/framework/op_def_util.cc
index f7e4f1f05a..7f559ce525 100644
--- a/tensorflow/core/framework/op_def_util.cc
+++ b/tensorflow/core/framework/op_def_util.cc
@@ -18,6 +18,7 @@ limitations under the License.
#include <set>
#include <unordered_map>
#include "tensorflow/core/framework/attr_value_util.h"
+#include "tensorflow/core/framework/op_def.pb_text.h"
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/core/stringpiece.h"
@@ -155,12 +156,12 @@ OpDef::AttrDef* FindAttrMutable(StringPiece name, OpDef* op_def) {
return nullptr;
}
-#define VALIDATE(EXPR, ...) \
- do { \
- if (!(EXPR)) { \
- return errors::InvalidArgument(__VA_ARGS__, "; in OpDef: ", \
- op_def.ShortDebugString()); \
- } \
+#define VALIDATE(EXPR, ...) \
+ do { \
+ if (!(EXPR)) { \
+ return errors::InvalidArgument(__VA_ARGS__, "; in OpDef: ", \
+ ProtoShortDebugString(op_def)); \
+ } \
} while (false)
static Status ValidateArg(const OpDef::ArgDef& arg, const OpDef& op_def,