diff options
author | Geoffrey Irving <geoffreyi@google.com> | 2016-04-21 15:40:45 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-04-21 16:52:12 -0700 |
commit | 18429eb67a947f9535e5e9755e8c469511af0d01 (patch) | |
tree | 4703ae5c37e364a924c7c5660dac8d09b1798d0d /tensorflow/cc/ops | |
parent | 2c46a9ed5f6faaf9f3a407582dd657efa91c24ea (diff) |
Check for op deprecation in C++ API and graph validation
The OP_DEPRECATION macro is now entirely gone, replaced with a
CheckOpDeprecation function in op_def_util.
Change: 120498757
Diffstat (limited to 'tensorflow/cc/ops')
-rw-r--r-- | tensorflow/cc/ops/cc_op_gen.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/cc/ops/cc_op_gen.cc b/tensorflow/cc/ops/cc_op_gen.cc index 3f0d034ff2..b29f7360c6 100644 --- a/tensorflow/cc/ops/cc_op_gen.cc +++ b/tensorflow/cc/ops/cc_op_gen.cc @@ -94,6 +94,11 @@ void WriteCCOp(const OpDef& op_def, WritableFile* h, WritableFile* cc) { comment = "TODO: add doc.\n"; } else { comment = strings::StrCat(op_def.summary(), "\n"); + if (op_def.has_deprecation()) { + strings::StrAppend(&comment, "\nDEPRECATED at GraphDef version ", + op_def.deprecation().version(), ":\n", + op_def.deprecation().explanation(), ".\n"); + } if (!op_def.description().empty()) { strings::StrAppend(&comment, "\n", op_def.description(), "\n"); } |