diff options
author | Asim Shankar <ashankar@google.com> | 2018-08-16 11:26:26 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-08-16 12:03:20 -0700 |
commit | 72c5efff887256ab50bc5f9e586cea17c71a50b2 (patch) | |
tree | f1c39345473b7642030fdc5f9405c266c42e03bc /tensorflow/docs_src | |
parent | e77dbdb2050de8cd0504b8484904858dfcd64c75 (diff) |
[C API/Eager]: Fix bug in TFE_OpSetAttrString.
TFE_OpSetAttrString was holding on to the 'value' pointer
after it returned. This bug was introduced in commit
2b0805301e4531dd7c2ed677d932f6408675460e
which caused TFE_OpSetAttrString to invoke
AttrBuilder& AttrBuilder::Set(StringPiece attr_name, StringPiece&& value);
instead of:
AttrBuilder& AttrBuilder::Set(StringPiece attr_name, T&& value)
(where the latter copies 'value' when T is a StringPiece or const char*
and the former aliases the memory pointed to by StringPiece).
In this process, I realized that
AttrBuilder::Set(StringPiece attr_name, StringPiece&& value)
was never being invoked (other than in this buggy situation),
so I removed it altogether.
Without the changes to attr_builder.{h,cc}, the newly added test
fails - complaining that "NHWC" is not a valid value for the "padding"
attribute.
PiperOrigin-RevId: 209017110
Diffstat (limited to 'tensorflow/docs_src')
0 files changed, 0 insertions, 0 deletions