Commit Graph

13558 Commits

Author SHA1 Message Date
Anna R
6150611ae2 Internal change.
PiperOrigin-RevId: 163765028
2017-07-31 16:27:04 -07:00
A. Unique TensorFlower
9e7875437f Add the option of including Shape, ShapeN, Size and Rank in the standard TensorFlow constant propagation pass, when the inputs to those Ops have sufficiently known static shape.
PiperOrigin-RevId: 163762750
2017-07-31 16:09:47 -07:00
Yuefeng Zhou
8b1365bb40 Infer output shape for restore op.
PiperOrigin-RevId: 163762216
2017-07-31 16:06:15 -07:00
A. Unique TensorFlower
2e2a8536d7 Update WorkerCacheLogger::RecordDataTransfer to not modify the details if provided.
PiperOrigin-RevId: 163761089
2017-07-31 15:58:43 -07:00
Yangzihao Wang
d03ba54f72 Use BlasGemv() when autotune is not set.
PiperOrigin-RevId: 163754092
2017-07-31 15:10:26 -07:00
Justin Lebar
724884f1ca Show layouts in HLO graph dump.
Layouts are displayed as e.g. "f32[100,200]{0,1}".  But constants used
to be displayed as e.g. "f32[]{42}".  To avoid ambiguity, constants are
now displayed as e.g. "42 (f32[])".

Also gets rid of the xla_hlo_graph_layout flag, which is no longer
necessary since we're now showing layouts unconditionally.

PiperOrigin-RevId: 163753637
2017-07-31 15:06:45 -07:00
A. Unique TensorFlower
84c2757a66 Move Grappler test GraphDefs to separate files
PiperOrigin-RevId: 163751948
2017-07-31 14:59:07 -07:00
Asim Shankar
0b3a25d684 Make TF_RESOURCE memory handling consistent with other types.
TF_Tensor's are backed by a contiguous memory region for all
but TF_RESOURCE tensors. The memory management of TF_RESOURCE
tensors required keeping a backing tensorflow::ResourceHandle*
object alive for the lifetime of the TF_Tensor object.

This change removes that discrepancy, making the memory backing
TF_RESOURCE tensors self-contained. This simplifies use of TF_RESOURCE
tensors in the C API (as users of the C API do not need to worry about
a tensorflow::ResourceHandle object and its lifetime). In doing so, this
moves a string memory copy from the TF_Tensor <-> Numpy conversion
to the C API from the Python session helper.

Unfortunately, I couldn't figure out how to add a simple unittest in
c_api_test.cc. The more comprehensive tensorflow/python/kernel_tests/session_ops_test.py
does cover the changed lines though.

Additionally, avoid an unnecessary copy when creating TF_STRING or TF_RESOURCE
tensors (as eigen alignment is not a requirement for them).

PiperOrigin-RevId: 163751880
2017-07-31 14:55:09 -07:00
A. Unique TensorFlower
1333e77450 Allow one tensor to be the input to the estimator.
PiperOrigin-RevId: 163747076
2017-07-31 14:25:31 -07:00
A. Unique TensorFlower
104f349e9e Update Conv2DShape function to handle filters that have data NCHW_VECT_C layout.
PiperOrigin-RevId: 163746769
2017-07-31 14:21:33 -07:00
A. Unique TensorFlower
efb7fb8e58 Use XLA_VLOG_LINES() in literal_test_util to avoid truncation of large tensors.
PiperOrigin-RevId: 163745522
2017-07-31 14:12:13 -07:00
Suharsh Sivakumar
043505a094 MasterSession should throw error if use_per_session_threads or session_inter_op_thread_pool is set.
PiperOrigin-RevId: 163743936
2017-07-31 14:02:22 -07:00
Artem Belevich
6ba02f0e92 [XLA] Added HasAllocationAt() helper function.
PiperOrigin-RevId: 163742985
2017-07-31 13:56:42 -07:00
Justine Tunney
18304683ec Pin tensorflow to tensorflow-tensorboard 0.1.x
This change will be cherry-picked into the 1.3.0 release.

PiperOrigin-RevId: 163742463
2017-07-31 13:52:20 -07:00
Justine Tunney
3445dd0edf Make 'import tensorflow' go faster
It now takes about 400ms rather than 800ms, if the file system cache is warm.

Most of the latency was due to parsing text_format OpList protocol buffers in
our generated sources. We now use a binary representation, while preserving the
text proto as a comment for readability.

Note: This change does not improve the latency of dereferencing tf.contrib,
which takes about 340ms.
PiperOrigin-RevId: 163739355
2017-07-31 13:32:22 -07:00
Neal Wu
c215c55d54 Add missing py_binary for mnist_deep.py
PiperOrigin-RevId: 163737503
2017-07-31 13:20:09 -07:00
A. Unique TensorFlower
b663c98991 Make non-iterable input to stratified_sample produce better error message.
PiperOrigin-RevId: 163735979
2017-07-31 13:09:13 -07:00
Peter Hawkins
122750a879 [SE] Make ExecutorCache thread-safe, change ExecutorCache::Insert to ExecutorCache::GetOrCreate. Add support for creating Executors for different device ordinals in parallel.
[XLA] Create Executors in parallel.

PiperOrigin-RevId: 163734988
2017-07-31 13:02:31 -07:00
Frank Chen
7ebed6678c Add __init__.py to the contrib/cluster_resolver directory so that the Cluster Resolver classes within this are visible to open source TensorFlow users.
PiperOrigin-RevId: 163733781
2017-07-31 12:53:06 -07:00
Shanqing Cai
21faf19d03 Upgrade pip version to 9.0.1; Prettier format of log text
* Upgrade pip version used in virtualenv created by the test-on-install to latest (9.0.1).
* Highlight step titles of pip builds with bold font.

PiperOrigin-RevId: 163732825
2017-07-31 12:46:05 -07:00
Kay Zhu
5887cc10e7 [XLA] In LiteralUtil::StridedConfig: choose the larger dimension between the
source and destination shapes' minor-most dimension index.

PiperOrigin-RevId: 163732014
2017-07-31 12:40:18 -07:00
Peter Hawkins
f9c644693e [TF:XLA] Disable sanitizers for depthwise conv test to fix test flakiness.
PiperOrigin-RevId: 163727765
2017-07-31 12:08:34 -07:00
Allen Lavoie
6263539a15 Grappler memory optimization: allow inputs to gradients with non-standard names to be recomputed
Includes Python tests for name-scoped gradients.

PiperOrigin-RevId: 163720208
2017-07-31 11:21:22 -07:00
Alexandre Passos
b876065afe graph_to_function_def gets its own file
PiperOrigin-RevId: 163709410
2017-07-31 10:16:47 -07:00
A. Unique TensorFlower
29550762bd Fixes unit tests for inverse hyperbolic functions that were failing because numeric gradients were computed too close to a branch cut (for complex arguments) or singularity (for real arguments) where the function is not differentiable (See, e.g., http://mathworld.wolfram.com/BranchCut.html). This change moves the test points away from the branch cut/singularity.
Improves precision of double precision numerical gradients by using a smaller step size delta (the optimal for symmetric difference approximation with functions computed with O(epsilon) error is epsilon^(1/3), so for double64 it is ~1e-5).

PiperOrigin-RevId: 163706297
2017-07-31 09:56:52 -07:00
Peter Hawkins
99b190a1f1 [TF:XLA] Add implementation of depthwise convolution.
This implementation expands the depthwise convolution kernels into a regular convolution kernel, which may not scale to large feature depths.

PiperOrigin-RevId: 163705408
2017-07-31 09:52:30 -07:00
A. Unique TensorFlower
f6f07b0275 Allow kernel unit tests to run on GPU
PiperOrigin-RevId: 163705027
2017-07-31 09:48:48 -07:00
A. Unique TensorFlower
4ec29c5d95 Avoid direct access to Node::def() where some other method works.
PiperOrigin-RevId: 163704839
2017-07-31 09:45:10 -07:00
A. Unique TensorFlower
1560c55d2d Add regression variance over individual trees to TensorForest inference.
PiperOrigin-RevId: 163695881
2017-07-31 08:22:26 -07:00
A. Unique TensorFlower
15e928d51e Minor cleanup
PiperOrigin-RevId: 163685423
2017-07-31 06:23:46 -07:00
A. Unique TensorFlower
f9c758719e New "SavedModel: Practical Uses" and "SavedModel: Architecture" documents.
PiperOrigin-RevId: 163669809
2017-07-31 02:41:04 -07:00
A. Unique TensorFlower
f19bb3bebf Prevent ctc_loss op from segfaulting when given empty batch.
PiperOrigin-RevId: 163663460
2017-07-31 01:10:50 -07:00
Frank Chen
e17650b698 This adds the cluster_resolver module to contrib/__init__.py so that it is actually visible to open source TensorFlow users.
PiperOrigin-RevId: 163636676
2017-07-30 15:43:18 -07:00
Yao Zhang
00d3126a39 Change const nodes to variables in the test, so that they are not optimized
away by the grappler constant folding pass.

PiperOrigin-RevId: 163602405
2017-07-29 23:47:52 -07:00
A. Unique TensorFlower
adf5d1bc06 Automated g4 rollback of changelist 163510186
PiperOrigin-RevId: 163547070
2017-07-28 19:40:39 -07:00
RJ Ryan
f8b575dc55 Add a tf.contrib.signal API guide.
PiperOrigin-RevId: 163545844
2017-07-28 19:07:23 -07:00
RJ Ryan
25ed0f242f Remove "small" test size for window_ops_test.
PiperOrigin-RevId: 163542849
2017-07-28 18:12:35 -07:00
A. Unique TensorFlower
c44c8d002b Remove unused BUILD dependencies
PiperOrigin-RevId: 163542023
2017-07-28 18:00:40 -07:00
Yao Zhang
5270d48c7f Replace constants with variables in memory optimizer test, so that they are not removed by the constant folding pass.
PiperOrigin-RevId: 163541636
2017-07-28 17:56:00 -07:00
A. Unique TensorFlower
c3664d1d0b Fix the constructor parameter in InstructionList to be pass-by-reference.
PiperOrigin-RevId: 163535344
2017-07-28 16:46:12 -07:00
A. Unique TensorFlower
e5c52bfecc Remove a dead return statement in AlgebraicSimplifier.
PiperOrigin-RevId: 163534909
2017-07-28 16:43:12 -07:00
Vahid Kazemi
39cd350ab7 Make assert_rank_in visible.
PiperOrigin-RevId: 163525442
2017-07-28 15:21:26 -07:00
Yao Zhang
d49af9a23e Disable constant folding for session debug tests.
PiperOrigin-RevId: 163524827
2017-07-28 15:16:10 -07:00
A. Unique TensorFlower
1773d564c2 In ShapeRefiner constant folding, when extracting subgraph, make sure to
recurse if at least one output of the current node is needed.

PiperOrigin-RevId: 163523963
2017-07-28 15:09:54 -07:00
Shanqing Cai
a78545d560 tfdbg: clean up SessionRunHook code
Remove the multiple inheritance in LocalCLIDebugHook and DumpingDebugHook

PiperOrigin-RevId: 163516434
2017-07-28 14:13:03 -07:00
A. Unique TensorFlower
92620dfc79 Minor comment improvement.
PiperOrigin-RevId: 163514331
2017-07-28 14:00:13 -07:00
Allen Lavoie
022413e56f TFTS: nomsan on estimators_test to avoid timeouts
PiperOrigin-RevId: 163511983
2017-07-28 13:43:57 -07:00
Gunhan Gulsoy
e5d8470b8a Create VariantTensorData to use instead of VariantTensorDataProto.
PiperOrigin-RevId: 163510186
2017-07-28 13:31:22 -07:00
Justin Lebar
e9c5f33450 Remove XLA Client::ExecuteAsync API.
This is a simplification, but also: The ExecuteAsync makes it easy to do
the wrong thing.

ExecuteAsync lets you easily start a computation and then infeed/outfeed
to it, all without starting any threads yourself.

But in practice, if you're using infeed or outfeed, you're probably
using both.  For good performance, you should overlap infeeds and
outfeeds, which means you need to run them on separate threads.  But
then you might as well use a thread for Execute, as well.

PiperOrigin-RevId: 163509892
2017-07-28 13:28:22 -07:00
A. Unique TensorFlower
036bba5212 [XLA:CPU] Emit DynamicUpdateSlice in place (when feasible).
Benchmark      Time(ns)        CPU(ns)     Iterations
-----------------------------------------------------
BM_WhileLoop  673633948      673699016  // In-place.
BM_WhileLoop  995564977      995373576

PiperOrigin-RevId: 163500657
2017-07-28 12:11:02 -07:00