Skip to content

Commit a259a61

Browse files
Merge pull request #2 from tensorflow/master
Update
2 parents c472c49 + e2b36c5 commit a259a61

File tree

351 files changed

+7399
-5754
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

351 files changed

+7399
-5754
lines changed

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ def check_bazel_version(min_version, max_version):
491491
sys.exit(0)
492492
if curr_version_int > max_version_int:
493493
print('Please downgrade your bazel installation to version %s or lower to '
494-
'build TensorFlow!' % min_version)
494+
'build TensorFlow!' % max_version)
495495
sys.exit(0)
496496
return curr_version
497497

tensorflow/c/python_api.cc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,4 +160,17 @@ void SetHandleShapeAndType(TF_Graph* graph, TF_Output output, const void* proto,
160160
ic->set_output_handle_shapes_and_types(output.index, shapes_and_types);
161161
}
162162

163+
void AddWhileInputHack(TF_Graph* graph, TF_Output new_src, TF_Operation* dst,
164+
TF_Status* status) {
165+
mutex_lock l(graph->mu);
166+
status->status = graph->graph.AddWhileInputHack(&new_src.oper->node,
167+
new_src.index, &dst->node);
168+
if (status->status.ok()) {
169+
// This modification only updates the destination node for
170+
// the purposes of running this graph in a session. Thus, we don't
171+
// record the source node as being modified.
172+
RecordMutation(graph, *dst, "adding input tensor");
173+
}
174+
}
175+
163176
} // namespace tensorflow

tensorflow/c/python_api.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ void SetAttr(TF_Graph* graph, TF_Operation* op, const char* attr_name,
3434

3535
void SetRequestedDevice(TF_Graph* graph, TF_Operation* op, const char* device);
3636

37+
// Updates 'dst' to consume 'new_src'.
3738
void UpdateEdge(TF_Graph* graph, TF_Output new_src, TF_Input dst,
3839
TF_Status* status);
3940

@@ -65,6 +66,13 @@ std::string GetHandleShapeAndType(TF_Graph* graph, TF_Output output);
6566
// because I couldn't get SWIG to work otherwise.
6667
void SetHandleShapeAndType(TF_Graph* graph, TF_Output output, const void* proto,
6768
size_t proto_len, TF_Status* status);
69+
70+
// This method is used to add a new input edge to 'dst', which must be a While
71+
// op. The While op's "T" attribute must have already been updated to include
72+
// the new edge. This is used to construct tf.while_loop gradients.
73+
void AddWhileInputHack(TF_Graph* graph, TF_Output new_src, TF_Operation* dst,
74+
TF_Status* status);
75+
6876
} // namespace tensorflow
6977

7078
#endif // TENSORFLOW_C_PYTHON_API_H_

tensorflow/compiler/tf2xla/kernels/BUILD

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ tf_kernel_library(
144144
"//tensorflow/compiler/xla/client/lib:arithmetic",
145145
"//tensorflow/compiler/xla/client/lib:constants",
146146
"//tensorflow/compiler/xla/client/lib:math",
147-
"//tensorflow/compiler/xla/client/lib:numeric",
147+
"//tensorflow/compiler/xla/client/lib:matrix",
148148
"//tensorflow/compiler/xla/client/lib:pooling",
149149
"//tensorflow/compiler/xla/client/lib:prng",
150150
"//tensorflow/compiler/xla/client/lib:sorting",
@@ -196,7 +196,6 @@ cc_library(
196196
"//tensorflow/compiler/xla/client:xla_builder",
197197
"//tensorflow/compiler/xla/client/lib:arithmetic",
198198
"//tensorflow/compiler/xla/client/lib:constants",
199-
"//tensorflow/compiler/xla/client/lib:numeric",
200199
"//tensorflow/core:framework",
201200
"//tensorflow/core:lib",
202201
"//tensorflow/core:protos_all_cc",
@@ -216,7 +215,6 @@ cc_library(
216215
"//tensorflow/compiler/xla/client:xla_builder",
217216
"//tensorflow/compiler/xla/client/lib:arithmetic",
218217
"//tensorflow/compiler/xla/client/lib:constants",
219-
"//tensorflow/compiler/xla/client/lib:numeric",
220218
"//tensorflow/core:framework",
221219
"//tensorflow/core/kernels:bounds_check",
222220
"//tensorflow/core/kernels:conv_ops",

tensorflow/compiler/tf2xla/kernels/conv_ops.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ limitations under the License.
2222
#include "tensorflow/compiler/tf2xla/xla_op_kernel.h"
2323
#include "tensorflow/compiler/tf2xla/xla_op_registry.h"
2424
#include "tensorflow/compiler/xla/client/lib/constants.h"
25-
#include "tensorflow/compiler/xla/client/lib/numeric.h"
25+
#include "tensorflow/compiler/xla/client/lib/matrix.h"
2626
#include "tensorflow/compiler/xla/client/xla_builder.h"
2727
#include "tensorflow/compiler/xla/literal_util.h"
2828
#include "tensorflow/core/framework/node_def_util.h"

tensorflow/compiler/tf2xla/kernels/diag_op.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ limitations under the License.
1919
#include "tensorflow/compiler/tf2xla/xla_op_kernel.h"
2020
#include "tensorflow/compiler/tf2xla/xla_op_registry.h"
2121
#include "tensorflow/compiler/xla/client/lib/constants.h"
22-
#include "tensorflow/compiler/xla/client/lib/numeric.h"
22+
#include "tensorflow/compiler/xla/client/lib/matrix.h"
2323
#include "tensorflow/compiler/xla/client/xla_builder.h"
2424
#include "tensorflow/compiler/xla/util.h"
2525
#include "tensorflow/core/framework/op_kernel.h"

tensorflow/compiler/tf2xla/kernels/image_resize_ops.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ limitations under the License.
1919
#include "tensorflow/compiler/tf2xla/xla_op_registry.h"
2020
#include "tensorflow/compiler/xla/array4d.h"
2121
#include "tensorflow/compiler/xla/client/lib/constants.h"
22-
#include "tensorflow/compiler/xla/client/lib/numeric.h"
2322
#include "tensorflow/compiler/xla/client/xla_builder.h"
2423
#include "tensorflow/core/framework/kernel_def_builder.h"
2524
#include "tensorflow/core/framework/register_types.h"

tensorflow/compiler/tf2xla/kernels/resampler_ops.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ limitations under the License.
2424
#include "tensorflow/compiler/xla/array4d.h"
2525
#include "tensorflow/compiler/xla/client/lib/arithmetic.h"
2626
#include "tensorflow/compiler/xla/client/lib/constants.h"
27-
#include "tensorflow/compiler/xla/client/lib/numeric.h"
2827
#include "tensorflow/compiler/xla/client/xla_builder.h"
2928
#include "tensorflow/compiler/xla/literal.h"
3029
#include "tensorflow/compiler/xla/shape_util.h"

tensorflow/compiler/tf2xla/kernels/stateless_random_ops.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ limitations under the License.
2323
#include "tensorflow/compiler/tf2xla/xla_op_registry.h"
2424
#include "tensorflow/compiler/xla/client/lib/constants.h"
2525
#include "tensorflow/compiler/xla/client/lib/math.h"
26-
#include "tensorflow/compiler/xla/client/lib/numeric.h"
2726
#include "tensorflow/compiler/xla/client/lib/prng.h"
2827
#include "tensorflow/compiler/xla/client/xla_builder.h"
2928
#include "tensorflow/core/framework/op_kernel.h"

tensorflow/compiler/tf2xla/kernels/topk_op.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ limitations under the License.
1515

1616
#include "tensorflow/compiler/tf2xla/xla_op_kernel.h"
1717
#include "tensorflow/compiler/tf2xla/xla_op_registry.h"
18-
#include "tensorflow/compiler/xla/client/lib/numeric.h"
1918
#include "tensorflow/compiler/xla/client/lib/sorting.h"
2019
#include "tensorflow/compiler/xla/client/xla_builder.h"
2120
#include "tensorflow/compiler/xla/literal.h"

0 commit comments

Comments
 (0)