aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/framework/op_kernel.h
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-09-11 13:08:03 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-09-11 13:12:11 -0700
commitf0e8c545e0196b8b48ce0ad0f116df97d980d1f1 (patch)
tree6925b09aad59dda4c8ae5a427e0d5c583110407a /tensorflow/core/framework/op_kernel.h
parent2356c0ff4630284f6168c3edbe43ee6a0a77d200 (diff)
Switch resource variables from copy-on-read to copy-on-write.
RELNOTES: Change the signature of (C++) GetInputTensorFromVariable in training_op_helpers to support new copy-on-write semenatics of resource variables. PiperOrigin-RevId: 168273249
Diffstat (limited to 'tensorflow/core/framework/op_kernel.h')
-rw-r--r--tensorflow/core/framework/op_kernel.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/tensorflow/core/framework/op_kernel.h b/tensorflow/core/framework/op_kernel.h
index 25b35a6dd7..7eec84e26c 100644
--- a/tensorflow/core/framework/op_kernel.h
+++ b/tensorflow/core/framework/op_kernel.h
@@ -1494,13 +1494,13 @@ inline void OpOutputList::set_ref(int i, mutex* mu, Tensor* tensor_for_ref) {
return; \
}
-#define OP_REQUIRES_OK(CTX, STATUS) \
- do { \
- ::tensorflow::Status _s(STATUS); \
- if (!TF_PREDICT_TRUE(_s.ok())) { \
- (CTX)->CtxFailureWithWarning(_s); \
- return; \
- } \
+#define OP_REQUIRES_OK(CTX, ...) \
+ do { \
+ ::tensorflow::Status _s(__VA_ARGS__); \
+ if (!TF_PREDICT_TRUE(_s.ok())) { \
+ (CTX)->CtxFailureWithWarning(_s); \
+ return; \
+ } \
} while (0)
#define OP_REQUIRES_ASYNC(CTX, EXP, STATUS, CALLBACK) \