diff options
author | Mingsheng Hong <hongm@google.com> | 2018-10-05 10:31:23 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-10-05 10:35:34 -0700 |
commit | d493a7f2fdbbc29a292741135f4c1598352e876b (patch) | |
tree | ad894183d0c747c76b4dd53d7a96180515ea6b14 /tensorflow/c | |
parent | 8b7c789e7401fe56b4f648a04f675a3cb69119e5 (diff) |
When running a native/builtin op via eager C API, automatically fill in default
attr values that are not overridden e.g. transpose_a in the matmul op).
This is required for backward compatibility (a binary built via an older version
of TF should still run on a newer version of TF, where some ops may have added
attrs).
For non-eager graph building, the default attr values of graph ops are added by
tensorflow::AddDefaultsToNodeDef().
We ran into this issue when running the same S4TF test cases via eager APIs --
some tests failed due to "missing attrs", but are fixed by this patch.
PiperOrigin-RevId: 215927271
Diffstat (limited to 'tensorflow/c')
-rw-r--r-- | tensorflow/c/eager/c_api_test_util.cc | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/tensorflow/c/eager/c_api_test_util.cc b/tensorflow/c/eager/c_api_test_util.cc index 5607c9dcb0..008f088c2d 100644 --- a/tensorflow/c/eager/c_api_test_util.cc +++ b/tensorflow/c/eager/c_api_test_util.cc @@ -99,8 +99,6 @@ TFE_Op* MatMulOp(TFE_Context* ctx, TFE_TensorHandle* a, TFE_TensorHandle* b) { TFE_OpAddInput(op, b, status); CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); TF_DeleteStatus(status); - TFE_OpSetAttrBool(op, "transpose_a", 0); - TFE_OpSetAttrBool(op, "transpose_b", 0); TFE_OpSetAttrType(op, "T", TFE_TensorHandleDataType(a)); return op; |