2017-07-25 13:30:03 -07:00
|
|
|
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
|
|
|
|
|
#
|
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
|
#
|
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
#
|
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
|
# limitations under the License.
|
|
|
|
|
# ==============================================================================
|
|
|
|
|
"""configure script to get build parameters from user."""
|
|
|
|
|
|
|
|
|
|
from __future__ import absolute_import
|
|
|
|
|
from __future__ import division
|
|
|
|
|
from __future__ import print_function
|
|
|
|
|
|
2018-03-12 19:33:52 -07:00
|
|
|
import argparse
|
2017-07-25 13:30:03 -07:00
|
|
|
import errno
|
|
|
|
|
import os
|
|
|
|
|
import platform
|
|
|
|
|
import re
|
|
|
|
|
import subprocess
|
|
|
|
|
import sys
|
|
|
|
|
|
2017-11-06 09:37:03 -08:00
|
|
|
# pylint: disable=g-import-not-at-top
|
2017-08-25 14:01:05 -07:00
|
|
|
try:
|
|
|
|
|
from shutil import which
|
|
|
|
|
except ImportError:
|
|
|
|
|
from distutils.spawn import find_executable as which
|
2017-11-06 09:37:03 -08:00
|
|
|
# pylint: enable=g-import-not-at-top
|
2017-08-25 14:01:05 -07:00
|
|
|
|
2017-12-15 18:15:07 -08:00
|
|
|
_DEFAULT_CUDA_VERSION = '9.0'
|
|
|
|
|
_DEFAULT_CUDNN_VERSION = '7'
|
2018-07-13 12:46:24 -07:00
|
|
|
_DEFAULT_NCCL_VERSION = '2.2'
|
2018-07-14 13:16:58 -07:00
|
|
|
_DEFAULT_CUDA_COMPUTE_CAPABILITIES = '3.5,7.0'
|
2017-07-25 13:30:03 -07:00
|
|
|
_DEFAULT_CUDA_PATH = '/usr/local/cuda'
|
|
|
|
|
_DEFAULT_CUDA_PATH_LINUX = '/opt/cuda'
|
|
|
|
|
_DEFAULT_CUDA_PATH_WIN = ('C:/Program Files/NVIDIA GPU Computing '
|
|
|
|
|
'Toolkit/CUDA/v%s' % _DEFAULT_CUDA_VERSION)
|
2018-03-22 18:54:27 -07:00
|
|
|
_DEFAULT_TENSORRT_PATH_LINUX = '/usr/lib/%s-linux-gnu' % platform.machine()
|
2017-07-25 13:30:03 -07:00
|
|
|
_TF_OPENCL_VERSION = '1.2'
|
|
|
|
|
_DEFAULT_COMPUTECPP_TOOLKIT_PATH = '/usr/local/computecpp'
|
2017-11-22 13:42:21 -08:00
|
|
|
_DEFAULT_TRISYCL_INCLUDE_DIR = '/usr/local/triSYCL/include'
|
2018-08-30 14:00:41 -07:00
|
|
|
_SUPPORTED_ANDROID_NDK_VERSIONS = [10, 11, 12, 13, 14, 15, 16]
|
2017-12-05 11:59:17 -08:00
|
|
|
|
|
|
|
|
_DEFAULT_PROMPT_ASK_ATTEMPTS = 10
|
|
|
|
|
|
2018-03-12 19:33:52 -07:00
|
|
|
_TF_WORKSPACE_ROOT = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
|
_TF_BAZELRC_FILENAME = '.tf_configure.bazelrc'
|
|
|
|
|
_TF_BAZELRC = os.path.join(_TF_WORKSPACE_ROOT, _TF_BAZELRC_FILENAME)
|
|
|
|
|
_TF_WORKSPACE = os.path.join(_TF_WORKSPACE_ROOT, 'WORKSPACE')
|
|
|
|
|
|
2017-12-05 11:59:17 -08:00
|
|
|
|
|
|
|
|
class UserInputError(Exception):
|
|
|
|
|
pass
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def is_windows():
|
|
|
|
|
return platform.system() == 'Windows'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def is_linux():
|
|
|
|
|
return platform.system() == 'Linux'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def is_macos():
|
|
|
|
|
return platform.system() == 'Darwin'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def is_ppc64le():
|
|
|
|
|
return platform.machine() == 'ppc64le'
|
|
|
|
|
|
|
|
|
|
|
2017-08-25 14:01:05 -07:00
|
|
|
def is_cygwin():
|
|
|
|
|
return platform.system().startswith('CYGWIN_NT')
|
|
|
|
|
|
|
|
|
|
|
2017-07-25 13:30:03 -07:00
|
|
|
def get_input(question):
|
|
|
|
|
try:
|
|
|
|
|
try:
|
|
|
|
|
answer = raw_input(question)
|
|
|
|
|
except NameError:
|
|
|
|
|
answer = input(question) # pylint: disable=bad-builtin
|
|
|
|
|
except EOFError:
|
|
|
|
|
answer = ''
|
|
|
|
|
return answer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def symlink_force(target, link_name):
|
|
|
|
|
"""Force symlink, equivalent of 'ln -sf'.
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
target: items to link to.
|
|
|
|
|
link_name: name of the link.
|
|
|
|
|
"""
|
|
|
|
|
try:
|
|
|
|
|
os.symlink(target, link_name)
|
|
|
|
|
except OSError as e:
|
|
|
|
|
if e.errno == errno.EEXIST:
|
|
|
|
|
os.remove(link_name)
|
|
|
|
|
os.symlink(target, link_name)
|
|
|
|
|
else:
|
|
|
|
|
raise e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def sed_in_place(filename, old, new):
|
|
|
|
|
"""Replace old string with new string in file.
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
filename: string for filename.
|
|
|
|
|
old: string to replace.
|
|
|
|
|
new: new string to replace to.
|
|
|
|
|
"""
|
|
|
|
|
with open(filename, 'r') as f:
|
|
|
|
|
filedata = f.read()
|
|
|
|
|
newdata = filedata.replace(old, new)
|
|
|
|
|
with open(filename, 'w') as f:
|
|
|
|
|
f.write(newdata)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def write_to_bazelrc(line):
|
|
|
|
|
with open(_TF_BAZELRC, 'a') as f:
|
|
|
|
|
f.write(line + '\n')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def write_action_env_to_bazelrc(var_name, var):
|
|
|
|
|
write_to_bazelrc('build --action_env %s="%s"' % (var_name, str(var)))
|
|
|
|
|
|
|
|
|
|
|
2017-08-25 14:01:05 -07:00
|
|
|
def run_shell(cmd, allow_non_zero=False):
|
|
|
|
|
if allow_non_zero:
|
|
|
|
|
try:
|
|
|
|
|
output = subprocess.check_output(cmd)
|
|
|
|
|
except subprocess.CalledProcessError as e:
|
|
|
|
|
output = e.output
|
|
|
|
|
else:
|
|
|
|
|
output = subprocess.check_output(cmd)
|
|
|
|
|
return output.decode('UTF-8').strip()
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def cygpath(path):
|
|
|
|
|
"""Convert path from posix to windows."""
|
2017-09-02 19:21:45 -07:00
|
|
|
return os.path.abspath(path).replace('\\', '/')
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
|
Merge changes from github.
END_PUBLIC
---
Commit 575bd01d4 authored by Vijay Vasudevan<vrv@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove /replica:0 declaration in device functions and allow them
to be freely bound based on cluster names present.
When more than one value matches, it will choose the first
lexicographically available device that matches the specification,
which in practice will do pretty much the same thing as hardcoding
/replica:0.
PiperOrigin-RevId: 165766815
---
Commit d685bbc54 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Benchmarks with backprop enabled (and removes overhead).
Before:
np.array([[3]]) took 1.50us (30000 iterations)
Tensor([[3]]) took 16.30us (30000 iterations)
MatMul [2, 2]: np.dot took 0.61us (30000 iterations)
MatMul [2, 2]: tf.matmul took 60.53us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 25.72us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.82us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 45.70us (30000 iterations)
MatMul [100, 784]: np.dot took 383.32us (1000 iterations)
MatMul [100, 784]: tf.matmul took 350.35us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 315.97us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 249.42us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 280.95us (1000 iterations)
If backprop is enabled:
np.array([[3]]) took 0.83us (30000 iterations)
Tensor([[3]]) took 15.21us (30000 iterations)
MatMul [2, 2]: np.dot took 0.63us (30000 iterations)
MatMul [2, 2]: tf.matmul took 76.31us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 38.66us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.31us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 51.96us (30000 iterations)
MatMul [100, 784]: np.dot took 378.34us (1000 iterations)
MatMul [100, 784]: tf.matmul took 352.09us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 364.28us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 350.68us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 377.19us (1000 iterations)
After:
np.array([[3]]) took 0.86us (30000 iterations)
Tensor([[3]]) took 15.19us (30000 iterations)
MatMul [2, 2]: np.dot took 0.60us (30000 iterations)
MatMul [2, 2]: tf.matmul took 64.51us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 28.34us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.38us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 48.50us (30000 iterations)
MatMul [100, 784]: np.dot took 475.27us (1000 iterations)
MatMul [100, 784]: tf.matmul took 399.50us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 307.80us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 272.83us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 350.06us (1000 iterations)
PiperOrigin-RevId: 165765641
---
Commit d902babbd authored by David Majnemer<majnemer@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Algebraic simplifier incorrectly transformed convolutions into bitcasts
PiperOrigin-RevId: 165765575
---
Commit 8e78e10ef authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
disable test temporarily
PiperOrigin-RevId: 165763204
---
Commit a271c37db authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Small improvements to the arithmetic optimizer
PiperOrigin-RevId: 165760972
---
Commit b6409594d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Convert some tests to cover both eager and graph.
PiperOrigin-RevId: 165760364
---
Commit 5ead76420 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Reduce XLA compile time by ~7% for a convolutional image model:
* Added CompactPointerSet<T>, which is optimized for set size <= 1.
* Changed expensive CHECKs to DCHECKS in buffer_assignment.cc
* Reserve space in DFS state array before starting DFS.
* Use unsigned arithmetic in DFS state maintenance.
* HloInstruction:
- Moved frequently used fields to start for better cache locality.
- Use InlinedVector instead of vector for operand array.
- Use InlinedVector instead of vector for DFS stack.
* Pre-compute "is array" and "is tuple" for LogicalBuffer.
* PointsToSet:
- Combine two ShapeTrees into one.
- Use CompactPointerSet instead of std::set to hold sources.
- Use CompactPointerSet instead of std::set to hold flattened buffers.
* ShapeTree: use unique_ptr instead of optional for shape storage
(reduces size and destruction overhead).
* Add proper const qualifiers to some FlatSet iterator methods.
Co-author=jeff
PiperOrigin-RevId: 165759117
---
Commit a0544b0b8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make TPU symbols more easily accessible from contrib.
PiperOrigin-RevId: 165753322
---
Commit cdc08afbb authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Slightly relax numeric tolerance for sinlge precision tests of matrix_solve_ls (and tighten it for double precision).
PiperOrigin-RevId: 165750936
---
Commit eebcc861a authored by Jianwei Xie<xiejw@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed the race condition between multi eval step increments.
PiperOrigin-RevId: 165750595
---
Commit bbc0b8471 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 165748384
---
Commit 65f87c967 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Change device string in RecvNodeDescriptor in VirtualScheduler from const
reference to const as the RecvNodeDescriptor (and cached_recv_nodes map)
outlives device string from the NodeDef.
PiperOrigin-RevId: 165748244
---
Commit 57b0276cf authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165747467
---
Commit 64e54423b authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix nested dictionary handling in dataset elements.
Backports recent changes to the core version of the nest.py library.
Fixes #12372.
PiperOrigin-RevId: 165746517
---
Commit 378463ae8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make tf.eye accept Python integer shapes and avoid generating unnecessary shape handling ops.
Clean up test and add tests with placeholders.
PiperOrigin-RevId: 165746090
---
Commit 109ecf823 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add support for complex in matrix_solve_ls_op.
Split into separate files for each data type to speed up build.
PiperOrigin-RevId: 165744539
---
Commit 51441302d authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change.
PiperOrigin-RevId: 165737455
---
Commit d0cb32c2a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Docstring for ResourceVariable.
PiperOrigin-RevId: 165735441
---
Commit 32f4c5b6e authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Add IsFinite op in tf2xla.
PiperOrigin-RevId: 165734702
---
Commit 5f5c3eb0a authored by Mark Daoust<markdaoust@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Move "supervisor.md" from programmer's guide to api_guides.
PiperOrigin-RevId: 165732026
---
Commit d001b58de authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix handling of multi-output tf.py_func() in Dataset.map().
If the `map_func` returns a list of tensors, the current code will
attempt to stack it into a single tensor and raise an unintuitive
error. Some multi-output ops (such as `tf.py_func()`) return lists of
typically-not-stackable tensors. This change treats lists returned
from `map_func` as tuples; users who were relying on this
auto-stacking behavior should manually call `tf.stack()` (or
`tf.convert_to_tensor()`) on the list being returned.
Fixes #12396.
PiperOrigin-RevId: 165731970
---
Commit e6c60fb36 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix flakyness, sometimes the op takes ms to run.
PiperOrigin-RevId: 165728705
---
Commit 360bff8ae authored by Ali Yahya<alive@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Makes tape.watch() work with ResourceVariables.
To this end, also adds a property, `device`, to TensorNode.
PiperOrigin-RevId: 165726368
---
Commit 80bd004cd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implements SVDF model for keyword spotting tutorial.
PiperOrigin-RevId: 165725938
---
Commit aaabf6b90 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix bug: Using a ComputationDataHandle from the wrong ComputationBuilder.
PiperOrigin-RevId: 165724017
---
Commit 107d165d9 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Use 2-arg TraceMe constructor to prevent unnecessary StrCat computation when
tracing is disabled.
PiperOrigin-RevId: 165722280
---
Commit 7d01f89cc authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Android demo app for speech recognition
PiperOrigin-RevId: 165714459
---
Commit a6729325a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Deletes convert_n_to_eager_tensor. Moves convert_to_eager_tensor to constant_op.
PiperOrigin-RevId: 165704074
---
Commit 573b303ac authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BUILD cleanup in tensorflow/core/kernels
PiperOrigin-RevId: 165688864
---
Commit 711be6adc authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
`Dataset.from_generator()` constructs a dataset from a Python generator.
With this change, it becomes possible to use a Python generator as the source
dataset for a `tf.contrib.data` input pipeline. This enables easier integration
with non-TensorFlow data sources. The generator can yield a nested structure of
NumPy arrays, or values convertible to NumPy arrays.
This addresses a concern raised in issue #7951.
PiperOrigin-RevId: 165663857
---
Commit 00594ecdd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
New landing page and leftnav for Programmer's Guide.
PiperOrigin-RevId: 165660897
---
Commit 7359fec79 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implement Batchnorm Inference by expanding them into smaller ops.
1. Add batch norm inference support in batchnorm_rewriter
2. Connect xla's batchnorm inference to tf's FusedBatchNorm
RELNOTES: n/a
PiperOrigin-RevId: 165655351
---
Commit f0da8bf56 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[Rematerialization] Reconsider to remat operations with control dependencies
We added a conservartive logic to not rematerialize operations with control dependencies since the rematerialized operations could result in undesired ordering. However, we now realize that when we remat an operation, we also copy the dependencies of them, which guarantees the rematerialized operation has the same constraint as the original operation.
PiperOrigin-RevId: 165654629
---
Commit a1225879c authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Propagate error code in computation replay tool.
PiperOrigin-RevId: 165654497
---
Commit 513def0bb authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed BuildOpInfoWithoutDevice
PiperOrigin-RevId: 165653933
---
Commit d7e425f0b authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix linear algebra benchmarks.
PiperOrigin-RevId: 165653891
---
Commit 465c40819 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix the shape information propagation for Enter op.
PiperOrigin-RevId: 165653579
---
Commit c0198fd8d authored by Derek Murray<derek.murray@gmail.com>
Committed by gunan<gunan@google.com>:
[CMake] Add missing dependencies on boosted_trees protos and other fixes (#12315)
* [CMake] Add missing dependencies
* Avoid rebuilding boosted_trees protos for Python.
* Add GPU implementation ZeroInitializerOp to the CMake build.
---
Commit 641943fd7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165652758
---
Commit e31346452 authored by Jonathan Hseu<jhseu@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
TPUEstimator: Fix the outfeed thread join.
PiperOrigin-RevId: 165651781
---
Commit 565a9d350 authored by Vijay Vasudevan<vrv@google.com>
Committed by Andrew Harp<andrewharp@users.noreply.github.com>:
Add missing 'type' keyword to ArgumentParser add_argument (#12275)
Fixes #12210
---
Commit 19a55725a authored by Rohan Jain<rohanj@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Allowing functions to run across devices. This change expands the ProcessFunctionLibraryRuntime library to Instantiate and Run functions on different devices. When a FunctionLibraryRuntime encounters a function with a target that is another device, it delegates Instantiate() and Run() calls to the ProcessFunctionLibraryRuntime.
This change also moves the table_ containing all function instantiations to the PFLR instead of the FunctionLibraryRuntime.
PiperOrigin-RevId: 165651194
---
Commit 8c0853db7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a test for negative and zero pow() input.
PiperOrigin-RevId: 165650096
---
Commit a3c4e980e authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed input shape for freezing audio graphs
PiperOrigin-RevId: 165649546
---
Commit 9b9e5989d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a call_logit_fn utility for logit_fn's, similar to Estimator's _call_model_fn.
PiperOrigin-RevId: 165649388
---
Commit 4ff1f4442 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove the script as well if building tf_nightly.
---
Commit 373d78987 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Adding the break.
---
Commit 0139ac983 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove tensorboard as a required package if we are building tf_nightly.
---
Commit a92bd5d5c authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BEGIN_PUBLIC
Automated g4 rollback of changelist 165630063
PiperOrigin-RevId: 165957821
2017-08-21 12:10:44 -07:00
|
|
|
def get_python_path(environ_cp, python_bin_path):
|
2017-07-25 13:30:03 -07:00
|
|
|
"""Get the python site package paths."""
|
|
|
|
|
python_paths = []
|
|
|
|
|
if environ_cp.get('PYTHONPATH'):
|
|
|
|
|
python_paths = environ_cp.get('PYTHONPATH').split(':')
|
|
|
|
|
try:
|
2017-08-25 14:01:05 -07:00
|
|
|
library_paths = run_shell(
|
|
|
|
|
[python_bin_path, '-c',
|
2017-12-05 11:59:17 -08:00
|
|
|
'import site; print("\\n".join(site.getsitepackages()))']).split('\n')
|
Merge changes from github.
END_PUBLIC
---
Commit 575bd01d4 authored by Vijay Vasudevan<vrv@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove /replica:0 declaration in device functions and allow them
to be freely bound based on cluster names present.
When more than one value matches, it will choose the first
lexicographically available device that matches the specification,
which in practice will do pretty much the same thing as hardcoding
/replica:0.
PiperOrigin-RevId: 165766815
---
Commit d685bbc54 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Benchmarks with backprop enabled (and removes overhead).
Before:
np.array([[3]]) took 1.50us (30000 iterations)
Tensor([[3]]) took 16.30us (30000 iterations)
MatMul [2, 2]: np.dot took 0.61us (30000 iterations)
MatMul [2, 2]: tf.matmul took 60.53us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 25.72us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.82us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 45.70us (30000 iterations)
MatMul [100, 784]: np.dot took 383.32us (1000 iterations)
MatMul [100, 784]: tf.matmul took 350.35us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 315.97us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 249.42us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 280.95us (1000 iterations)
If backprop is enabled:
np.array([[3]]) took 0.83us (30000 iterations)
Tensor([[3]]) took 15.21us (30000 iterations)
MatMul [2, 2]: np.dot took 0.63us (30000 iterations)
MatMul [2, 2]: tf.matmul took 76.31us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 38.66us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.31us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 51.96us (30000 iterations)
MatMul [100, 784]: np.dot took 378.34us (1000 iterations)
MatMul [100, 784]: tf.matmul took 352.09us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 364.28us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 350.68us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 377.19us (1000 iterations)
After:
np.array([[3]]) took 0.86us (30000 iterations)
Tensor([[3]]) took 15.19us (30000 iterations)
MatMul [2, 2]: np.dot took 0.60us (30000 iterations)
MatMul [2, 2]: tf.matmul took 64.51us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 28.34us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.38us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 48.50us (30000 iterations)
MatMul [100, 784]: np.dot took 475.27us (1000 iterations)
MatMul [100, 784]: tf.matmul took 399.50us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 307.80us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 272.83us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 350.06us (1000 iterations)
PiperOrigin-RevId: 165765641
---
Commit d902babbd authored by David Majnemer<majnemer@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Algebraic simplifier incorrectly transformed convolutions into bitcasts
PiperOrigin-RevId: 165765575
---
Commit 8e78e10ef authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
disable test temporarily
PiperOrigin-RevId: 165763204
---
Commit a271c37db authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Small improvements to the arithmetic optimizer
PiperOrigin-RevId: 165760972
---
Commit b6409594d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Convert some tests to cover both eager and graph.
PiperOrigin-RevId: 165760364
---
Commit 5ead76420 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Reduce XLA compile time by ~7% for a convolutional image model:
* Added CompactPointerSet<T>, which is optimized for set size <= 1.
* Changed expensive CHECKs to DCHECKS in buffer_assignment.cc
* Reserve space in DFS state array before starting DFS.
* Use unsigned arithmetic in DFS state maintenance.
* HloInstruction:
- Moved frequently used fields to start for better cache locality.
- Use InlinedVector instead of vector for operand array.
- Use InlinedVector instead of vector for DFS stack.
* Pre-compute "is array" and "is tuple" for LogicalBuffer.
* PointsToSet:
- Combine two ShapeTrees into one.
- Use CompactPointerSet instead of std::set to hold sources.
- Use CompactPointerSet instead of std::set to hold flattened buffers.
* ShapeTree: use unique_ptr instead of optional for shape storage
(reduces size and destruction overhead).
* Add proper const qualifiers to some FlatSet iterator methods.
Co-author=jeff
PiperOrigin-RevId: 165759117
---
Commit a0544b0b8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make TPU symbols more easily accessible from contrib.
PiperOrigin-RevId: 165753322
---
Commit cdc08afbb authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Slightly relax numeric tolerance for sinlge precision tests of matrix_solve_ls (and tighten it for double precision).
PiperOrigin-RevId: 165750936
---
Commit eebcc861a authored by Jianwei Xie<xiejw@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed the race condition between multi eval step increments.
PiperOrigin-RevId: 165750595
---
Commit bbc0b8471 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 165748384
---
Commit 65f87c967 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Change device string in RecvNodeDescriptor in VirtualScheduler from const
reference to const as the RecvNodeDescriptor (and cached_recv_nodes map)
outlives device string from the NodeDef.
PiperOrigin-RevId: 165748244
---
Commit 57b0276cf authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165747467
---
Commit 64e54423b authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix nested dictionary handling in dataset elements.
Backports recent changes to the core version of the nest.py library.
Fixes #12372.
PiperOrigin-RevId: 165746517
---
Commit 378463ae8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make tf.eye accept Python integer shapes and avoid generating unnecessary shape handling ops.
Clean up test and add tests with placeholders.
PiperOrigin-RevId: 165746090
---
Commit 109ecf823 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add support for complex in matrix_solve_ls_op.
Split into separate files for each data type to speed up build.
PiperOrigin-RevId: 165744539
---
Commit 51441302d authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change.
PiperOrigin-RevId: 165737455
---
Commit d0cb32c2a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Docstring for ResourceVariable.
PiperOrigin-RevId: 165735441
---
Commit 32f4c5b6e authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Add IsFinite op in tf2xla.
PiperOrigin-RevId: 165734702
---
Commit 5f5c3eb0a authored by Mark Daoust<markdaoust@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Move "supervisor.md" from programmer's guide to api_guides.
PiperOrigin-RevId: 165732026
---
Commit d001b58de authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix handling of multi-output tf.py_func() in Dataset.map().
If the `map_func` returns a list of tensors, the current code will
attempt to stack it into a single tensor and raise an unintuitive
error. Some multi-output ops (such as `tf.py_func()`) return lists of
typically-not-stackable tensors. This change treats lists returned
from `map_func` as tuples; users who were relying on this
auto-stacking behavior should manually call `tf.stack()` (or
`tf.convert_to_tensor()`) on the list being returned.
Fixes #12396.
PiperOrigin-RevId: 165731970
---
Commit e6c60fb36 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix flakyness, sometimes the op takes ms to run.
PiperOrigin-RevId: 165728705
---
Commit 360bff8ae authored by Ali Yahya<alive@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Makes tape.watch() work with ResourceVariables.
To this end, also adds a property, `device`, to TensorNode.
PiperOrigin-RevId: 165726368
---
Commit 80bd004cd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implements SVDF model for keyword spotting tutorial.
PiperOrigin-RevId: 165725938
---
Commit aaabf6b90 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix bug: Using a ComputationDataHandle from the wrong ComputationBuilder.
PiperOrigin-RevId: 165724017
---
Commit 107d165d9 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Use 2-arg TraceMe constructor to prevent unnecessary StrCat computation when
tracing is disabled.
PiperOrigin-RevId: 165722280
---
Commit 7d01f89cc authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Android demo app for speech recognition
PiperOrigin-RevId: 165714459
---
Commit a6729325a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Deletes convert_n_to_eager_tensor. Moves convert_to_eager_tensor to constant_op.
PiperOrigin-RevId: 165704074
---
Commit 573b303ac authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BUILD cleanup in tensorflow/core/kernels
PiperOrigin-RevId: 165688864
---
Commit 711be6adc authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
`Dataset.from_generator()` constructs a dataset from a Python generator.
With this change, it becomes possible to use a Python generator as the source
dataset for a `tf.contrib.data` input pipeline. This enables easier integration
with non-TensorFlow data sources. The generator can yield a nested structure of
NumPy arrays, or values convertible to NumPy arrays.
This addresses a concern raised in issue #7951.
PiperOrigin-RevId: 165663857
---
Commit 00594ecdd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
New landing page and leftnav for Programmer's Guide.
PiperOrigin-RevId: 165660897
---
Commit 7359fec79 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implement Batchnorm Inference by expanding them into smaller ops.
1. Add batch norm inference support in batchnorm_rewriter
2. Connect xla's batchnorm inference to tf's FusedBatchNorm
RELNOTES: n/a
PiperOrigin-RevId: 165655351
---
Commit f0da8bf56 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[Rematerialization] Reconsider to remat operations with control dependencies
We added a conservartive logic to not rematerialize operations with control dependencies since the rematerialized operations could result in undesired ordering. However, we now realize that when we remat an operation, we also copy the dependencies of them, which guarantees the rematerialized operation has the same constraint as the original operation.
PiperOrigin-RevId: 165654629
---
Commit a1225879c authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Propagate error code in computation replay tool.
PiperOrigin-RevId: 165654497
---
Commit 513def0bb authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed BuildOpInfoWithoutDevice
PiperOrigin-RevId: 165653933
---
Commit d7e425f0b authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix linear algebra benchmarks.
PiperOrigin-RevId: 165653891
---
Commit 465c40819 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix the shape information propagation for Enter op.
PiperOrigin-RevId: 165653579
---
Commit c0198fd8d authored by Derek Murray<derek.murray@gmail.com>
Committed by gunan<gunan@google.com>:
[CMake] Add missing dependencies on boosted_trees protos and other fixes (#12315)
* [CMake] Add missing dependencies
* Avoid rebuilding boosted_trees protos for Python.
* Add GPU implementation ZeroInitializerOp to the CMake build.
---
Commit 641943fd7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165652758
---
Commit e31346452 authored by Jonathan Hseu<jhseu@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
TPUEstimator: Fix the outfeed thread join.
PiperOrigin-RevId: 165651781
---
Commit 565a9d350 authored by Vijay Vasudevan<vrv@google.com>
Committed by Andrew Harp<andrewharp@users.noreply.github.com>:
Add missing 'type' keyword to ArgumentParser add_argument (#12275)
Fixes #12210
---
Commit 19a55725a authored by Rohan Jain<rohanj@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Allowing functions to run across devices. This change expands the ProcessFunctionLibraryRuntime library to Instantiate and Run functions on different devices. When a FunctionLibraryRuntime encounters a function with a target that is another device, it delegates Instantiate() and Run() calls to the ProcessFunctionLibraryRuntime.
This change also moves the table_ containing all function instantiations to the PFLR instead of the FunctionLibraryRuntime.
PiperOrigin-RevId: 165651194
---
Commit 8c0853db7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a test for negative and zero pow() input.
PiperOrigin-RevId: 165650096
---
Commit a3c4e980e authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed input shape for freezing audio graphs
PiperOrigin-RevId: 165649546
---
Commit 9b9e5989d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a call_logit_fn utility for logit_fn's, similar to Estimator's _call_model_fn.
PiperOrigin-RevId: 165649388
---
Commit 4ff1f4442 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove the script as well if building tf_nightly.
---
Commit 373d78987 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Adding the break.
---
Commit 0139ac983 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove tensorboard as a required package if we are building tf_nightly.
---
Commit a92bd5d5c authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BEGIN_PUBLIC
Automated g4 rollback of changelist 165630063
PiperOrigin-RevId: 165957821
2017-08-21 12:10:44 -07:00
|
|
|
except subprocess.CalledProcessError:
|
2017-08-25 14:01:05 -07:00
|
|
|
library_paths = [run_shell(
|
|
|
|
|
[python_bin_path, '-c',
|
|
|
|
|
'from distutils.sysconfig import get_python_lib;'
|
|
|
|
|
'print(get_python_lib())'])]
|
Merge changes from github.
END_PUBLIC
---
Commit 575bd01d4 authored by Vijay Vasudevan<vrv@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove /replica:0 declaration in device functions and allow them
to be freely bound based on cluster names present.
When more than one value matches, it will choose the first
lexicographically available device that matches the specification,
which in practice will do pretty much the same thing as hardcoding
/replica:0.
PiperOrigin-RevId: 165766815
---
Commit d685bbc54 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Benchmarks with backprop enabled (and removes overhead).
Before:
np.array([[3]]) took 1.50us (30000 iterations)
Tensor([[3]]) took 16.30us (30000 iterations)
MatMul [2, 2]: np.dot took 0.61us (30000 iterations)
MatMul [2, 2]: tf.matmul took 60.53us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 25.72us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.82us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 45.70us (30000 iterations)
MatMul [100, 784]: np.dot took 383.32us (1000 iterations)
MatMul [100, 784]: tf.matmul took 350.35us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 315.97us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 249.42us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 280.95us (1000 iterations)
If backprop is enabled:
np.array([[3]]) took 0.83us (30000 iterations)
Tensor([[3]]) took 15.21us (30000 iterations)
MatMul [2, 2]: np.dot took 0.63us (30000 iterations)
MatMul [2, 2]: tf.matmul took 76.31us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 38.66us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.31us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 51.96us (30000 iterations)
MatMul [100, 784]: np.dot took 378.34us (1000 iterations)
MatMul [100, 784]: tf.matmul took 352.09us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 364.28us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 350.68us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 377.19us (1000 iterations)
After:
np.array([[3]]) took 0.86us (30000 iterations)
Tensor([[3]]) took 15.19us (30000 iterations)
MatMul [2, 2]: np.dot took 0.60us (30000 iterations)
MatMul [2, 2]: tf.matmul took 64.51us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 28.34us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.38us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 48.50us (30000 iterations)
MatMul [100, 784]: np.dot took 475.27us (1000 iterations)
MatMul [100, 784]: tf.matmul took 399.50us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 307.80us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 272.83us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 350.06us (1000 iterations)
PiperOrigin-RevId: 165765641
---
Commit d902babbd authored by David Majnemer<majnemer@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Algebraic simplifier incorrectly transformed convolutions into bitcasts
PiperOrigin-RevId: 165765575
---
Commit 8e78e10ef authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
disable test temporarily
PiperOrigin-RevId: 165763204
---
Commit a271c37db authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Small improvements to the arithmetic optimizer
PiperOrigin-RevId: 165760972
---
Commit b6409594d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Convert some tests to cover both eager and graph.
PiperOrigin-RevId: 165760364
---
Commit 5ead76420 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Reduce XLA compile time by ~7% for a convolutional image model:
* Added CompactPointerSet<T>, which is optimized for set size <= 1.
* Changed expensive CHECKs to DCHECKS in buffer_assignment.cc
* Reserve space in DFS state array before starting DFS.
* Use unsigned arithmetic in DFS state maintenance.
* HloInstruction:
- Moved frequently used fields to start for better cache locality.
- Use InlinedVector instead of vector for operand array.
- Use InlinedVector instead of vector for DFS stack.
* Pre-compute "is array" and "is tuple" for LogicalBuffer.
* PointsToSet:
- Combine two ShapeTrees into one.
- Use CompactPointerSet instead of std::set to hold sources.
- Use CompactPointerSet instead of std::set to hold flattened buffers.
* ShapeTree: use unique_ptr instead of optional for shape storage
(reduces size and destruction overhead).
* Add proper const qualifiers to some FlatSet iterator methods.
Co-author=jeff
PiperOrigin-RevId: 165759117
---
Commit a0544b0b8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make TPU symbols more easily accessible from contrib.
PiperOrigin-RevId: 165753322
---
Commit cdc08afbb authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Slightly relax numeric tolerance for sinlge precision tests of matrix_solve_ls (and tighten it for double precision).
PiperOrigin-RevId: 165750936
---
Commit eebcc861a authored by Jianwei Xie<xiejw@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed the race condition between multi eval step increments.
PiperOrigin-RevId: 165750595
---
Commit bbc0b8471 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 165748384
---
Commit 65f87c967 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Change device string in RecvNodeDescriptor in VirtualScheduler from const
reference to const as the RecvNodeDescriptor (and cached_recv_nodes map)
outlives device string from the NodeDef.
PiperOrigin-RevId: 165748244
---
Commit 57b0276cf authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165747467
---
Commit 64e54423b authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix nested dictionary handling in dataset elements.
Backports recent changes to the core version of the nest.py library.
Fixes #12372.
PiperOrigin-RevId: 165746517
---
Commit 378463ae8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make tf.eye accept Python integer shapes and avoid generating unnecessary shape handling ops.
Clean up test and add tests with placeholders.
PiperOrigin-RevId: 165746090
---
Commit 109ecf823 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add support for complex in matrix_solve_ls_op.
Split into separate files for each data type to speed up build.
PiperOrigin-RevId: 165744539
---
Commit 51441302d authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change.
PiperOrigin-RevId: 165737455
---
Commit d0cb32c2a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Docstring for ResourceVariable.
PiperOrigin-RevId: 165735441
---
Commit 32f4c5b6e authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Add IsFinite op in tf2xla.
PiperOrigin-RevId: 165734702
---
Commit 5f5c3eb0a authored by Mark Daoust<markdaoust@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Move "supervisor.md" from programmer's guide to api_guides.
PiperOrigin-RevId: 165732026
---
Commit d001b58de authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix handling of multi-output tf.py_func() in Dataset.map().
If the `map_func` returns a list of tensors, the current code will
attempt to stack it into a single tensor and raise an unintuitive
error. Some multi-output ops (such as `tf.py_func()`) return lists of
typically-not-stackable tensors. This change treats lists returned
from `map_func` as tuples; users who were relying on this
auto-stacking behavior should manually call `tf.stack()` (or
`tf.convert_to_tensor()`) on the list being returned.
Fixes #12396.
PiperOrigin-RevId: 165731970
---
Commit e6c60fb36 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix flakyness, sometimes the op takes ms to run.
PiperOrigin-RevId: 165728705
---
Commit 360bff8ae authored by Ali Yahya<alive@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Makes tape.watch() work with ResourceVariables.
To this end, also adds a property, `device`, to TensorNode.
PiperOrigin-RevId: 165726368
---
Commit 80bd004cd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implements SVDF model for keyword spotting tutorial.
PiperOrigin-RevId: 165725938
---
Commit aaabf6b90 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix bug: Using a ComputationDataHandle from the wrong ComputationBuilder.
PiperOrigin-RevId: 165724017
---
Commit 107d165d9 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Use 2-arg TraceMe constructor to prevent unnecessary StrCat computation when
tracing is disabled.
PiperOrigin-RevId: 165722280
---
Commit 7d01f89cc authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Android demo app for speech recognition
PiperOrigin-RevId: 165714459
---
Commit a6729325a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Deletes convert_n_to_eager_tensor. Moves convert_to_eager_tensor to constant_op.
PiperOrigin-RevId: 165704074
---
Commit 573b303ac authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BUILD cleanup in tensorflow/core/kernels
PiperOrigin-RevId: 165688864
---
Commit 711be6adc authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
`Dataset.from_generator()` constructs a dataset from a Python generator.
With this change, it becomes possible to use a Python generator as the source
dataset for a `tf.contrib.data` input pipeline. This enables easier integration
with non-TensorFlow data sources. The generator can yield a nested structure of
NumPy arrays, or values convertible to NumPy arrays.
This addresses a concern raised in issue #7951.
PiperOrigin-RevId: 165663857
---
Commit 00594ecdd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
New landing page and leftnav for Programmer's Guide.
PiperOrigin-RevId: 165660897
---
Commit 7359fec79 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implement Batchnorm Inference by expanding them into smaller ops.
1. Add batch norm inference support in batchnorm_rewriter
2. Connect xla's batchnorm inference to tf's FusedBatchNorm
RELNOTES: n/a
PiperOrigin-RevId: 165655351
---
Commit f0da8bf56 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[Rematerialization] Reconsider to remat operations with control dependencies
We added a conservartive logic to not rematerialize operations with control dependencies since the rematerialized operations could result in undesired ordering. However, we now realize that when we remat an operation, we also copy the dependencies of them, which guarantees the rematerialized operation has the same constraint as the original operation.
PiperOrigin-RevId: 165654629
---
Commit a1225879c authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Propagate error code in computation replay tool.
PiperOrigin-RevId: 165654497
---
Commit 513def0bb authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed BuildOpInfoWithoutDevice
PiperOrigin-RevId: 165653933
---
Commit d7e425f0b authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix linear algebra benchmarks.
PiperOrigin-RevId: 165653891
---
Commit 465c40819 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix the shape information propagation for Enter op.
PiperOrigin-RevId: 165653579
---
Commit c0198fd8d authored by Derek Murray<derek.murray@gmail.com>
Committed by gunan<gunan@google.com>:
[CMake] Add missing dependencies on boosted_trees protos and other fixes (#12315)
* [CMake] Add missing dependencies
* Avoid rebuilding boosted_trees protos for Python.
* Add GPU implementation ZeroInitializerOp to the CMake build.
---
Commit 641943fd7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165652758
---
Commit e31346452 authored by Jonathan Hseu<jhseu@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
TPUEstimator: Fix the outfeed thread join.
PiperOrigin-RevId: 165651781
---
Commit 565a9d350 authored by Vijay Vasudevan<vrv@google.com>
Committed by Andrew Harp<andrewharp@users.noreply.github.com>:
Add missing 'type' keyword to ArgumentParser add_argument (#12275)
Fixes #12210
---
Commit 19a55725a authored by Rohan Jain<rohanj@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Allowing functions to run across devices. This change expands the ProcessFunctionLibraryRuntime library to Instantiate and Run functions on different devices. When a FunctionLibraryRuntime encounters a function with a target that is another device, it delegates Instantiate() and Run() calls to the ProcessFunctionLibraryRuntime.
This change also moves the table_ containing all function instantiations to the PFLR instead of the FunctionLibraryRuntime.
PiperOrigin-RevId: 165651194
---
Commit 8c0853db7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a test for negative and zero pow() input.
PiperOrigin-RevId: 165650096
---
Commit a3c4e980e authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed input shape for freezing audio graphs
PiperOrigin-RevId: 165649546
---
Commit 9b9e5989d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a call_logit_fn utility for logit_fn's, similar to Estimator's _call_model_fn.
PiperOrigin-RevId: 165649388
---
Commit 4ff1f4442 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove the script as well if building tf_nightly.
---
Commit 373d78987 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Adding the break.
---
Commit 0139ac983 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove tensorboard as a required package if we are building tf_nightly.
---
Commit a92bd5d5c authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BEGIN_PUBLIC
Automated g4 rollback of changelist 165630063
PiperOrigin-RevId: 165957821
2017-08-21 12:10:44 -07:00
|
|
|
|
2017-07-25 13:30:03 -07:00
|
|
|
all_paths = set(python_paths + library_paths)
|
|
|
|
|
|
|
|
|
|
paths = []
|
|
|
|
|
for path in all_paths:
|
|
|
|
|
if os.path.isdir(path):
|
|
|
|
|
paths.append(path)
|
|
|
|
|
return paths
|
|
|
|
|
|
|
|
|
|
|
Merge changes from github.
END_PUBLIC
---
Commit 575bd01d4 authored by Vijay Vasudevan<vrv@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove /replica:0 declaration in device functions and allow them
to be freely bound based on cluster names present.
When more than one value matches, it will choose the first
lexicographically available device that matches the specification,
which in practice will do pretty much the same thing as hardcoding
/replica:0.
PiperOrigin-RevId: 165766815
---
Commit d685bbc54 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Benchmarks with backprop enabled (and removes overhead).
Before:
np.array([[3]]) took 1.50us (30000 iterations)
Tensor([[3]]) took 16.30us (30000 iterations)
MatMul [2, 2]: np.dot took 0.61us (30000 iterations)
MatMul [2, 2]: tf.matmul took 60.53us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 25.72us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.82us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 45.70us (30000 iterations)
MatMul [100, 784]: np.dot took 383.32us (1000 iterations)
MatMul [100, 784]: tf.matmul took 350.35us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 315.97us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 249.42us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 280.95us (1000 iterations)
If backprop is enabled:
np.array([[3]]) took 0.83us (30000 iterations)
Tensor([[3]]) took 15.21us (30000 iterations)
MatMul [2, 2]: np.dot took 0.63us (30000 iterations)
MatMul [2, 2]: tf.matmul took 76.31us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 38.66us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.31us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 51.96us (30000 iterations)
MatMul [100, 784]: np.dot took 378.34us (1000 iterations)
MatMul [100, 784]: tf.matmul took 352.09us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 364.28us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 350.68us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 377.19us (1000 iterations)
After:
np.array([[3]]) took 0.86us (30000 iterations)
Tensor([[3]]) took 15.19us (30000 iterations)
MatMul [2, 2]: np.dot took 0.60us (30000 iterations)
MatMul [2, 2]: tf.matmul took 64.51us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 28.34us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.38us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 48.50us (30000 iterations)
MatMul [100, 784]: np.dot took 475.27us (1000 iterations)
MatMul [100, 784]: tf.matmul took 399.50us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 307.80us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 272.83us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 350.06us (1000 iterations)
PiperOrigin-RevId: 165765641
---
Commit d902babbd authored by David Majnemer<majnemer@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Algebraic simplifier incorrectly transformed convolutions into bitcasts
PiperOrigin-RevId: 165765575
---
Commit 8e78e10ef authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
disable test temporarily
PiperOrigin-RevId: 165763204
---
Commit a271c37db authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Small improvements to the arithmetic optimizer
PiperOrigin-RevId: 165760972
---
Commit b6409594d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Convert some tests to cover both eager and graph.
PiperOrigin-RevId: 165760364
---
Commit 5ead76420 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Reduce XLA compile time by ~7% for a convolutional image model:
* Added CompactPointerSet<T>, which is optimized for set size <= 1.
* Changed expensive CHECKs to DCHECKS in buffer_assignment.cc
* Reserve space in DFS state array before starting DFS.
* Use unsigned arithmetic in DFS state maintenance.
* HloInstruction:
- Moved frequently used fields to start for better cache locality.
- Use InlinedVector instead of vector for operand array.
- Use InlinedVector instead of vector for DFS stack.
* Pre-compute "is array" and "is tuple" for LogicalBuffer.
* PointsToSet:
- Combine two ShapeTrees into one.
- Use CompactPointerSet instead of std::set to hold sources.
- Use CompactPointerSet instead of std::set to hold flattened buffers.
* ShapeTree: use unique_ptr instead of optional for shape storage
(reduces size and destruction overhead).
* Add proper const qualifiers to some FlatSet iterator methods.
Co-author=jeff
PiperOrigin-RevId: 165759117
---
Commit a0544b0b8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make TPU symbols more easily accessible from contrib.
PiperOrigin-RevId: 165753322
---
Commit cdc08afbb authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Slightly relax numeric tolerance for sinlge precision tests of matrix_solve_ls (and tighten it for double precision).
PiperOrigin-RevId: 165750936
---
Commit eebcc861a authored by Jianwei Xie<xiejw@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed the race condition between multi eval step increments.
PiperOrigin-RevId: 165750595
---
Commit bbc0b8471 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 165748384
---
Commit 65f87c967 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Change device string in RecvNodeDescriptor in VirtualScheduler from const
reference to const as the RecvNodeDescriptor (and cached_recv_nodes map)
outlives device string from the NodeDef.
PiperOrigin-RevId: 165748244
---
Commit 57b0276cf authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165747467
---
Commit 64e54423b authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix nested dictionary handling in dataset elements.
Backports recent changes to the core version of the nest.py library.
Fixes #12372.
PiperOrigin-RevId: 165746517
---
Commit 378463ae8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make tf.eye accept Python integer shapes and avoid generating unnecessary shape handling ops.
Clean up test and add tests with placeholders.
PiperOrigin-RevId: 165746090
---
Commit 109ecf823 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add support for complex in matrix_solve_ls_op.
Split into separate files for each data type to speed up build.
PiperOrigin-RevId: 165744539
---
Commit 51441302d authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change.
PiperOrigin-RevId: 165737455
---
Commit d0cb32c2a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Docstring for ResourceVariable.
PiperOrigin-RevId: 165735441
---
Commit 32f4c5b6e authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Add IsFinite op in tf2xla.
PiperOrigin-RevId: 165734702
---
Commit 5f5c3eb0a authored by Mark Daoust<markdaoust@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Move "supervisor.md" from programmer's guide to api_guides.
PiperOrigin-RevId: 165732026
---
Commit d001b58de authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix handling of multi-output tf.py_func() in Dataset.map().
If the `map_func` returns a list of tensors, the current code will
attempt to stack it into a single tensor and raise an unintuitive
error. Some multi-output ops (such as `tf.py_func()`) return lists of
typically-not-stackable tensors. This change treats lists returned
from `map_func` as tuples; users who were relying on this
auto-stacking behavior should manually call `tf.stack()` (or
`tf.convert_to_tensor()`) on the list being returned.
Fixes #12396.
PiperOrigin-RevId: 165731970
---
Commit e6c60fb36 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix flakyness, sometimes the op takes ms to run.
PiperOrigin-RevId: 165728705
---
Commit 360bff8ae authored by Ali Yahya<alive@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Makes tape.watch() work with ResourceVariables.
To this end, also adds a property, `device`, to TensorNode.
PiperOrigin-RevId: 165726368
---
Commit 80bd004cd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implements SVDF model for keyword spotting tutorial.
PiperOrigin-RevId: 165725938
---
Commit aaabf6b90 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix bug: Using a ComputationDataHandle from the wrong ComputationBuilder.
PiperOrigin-RevId: 165724017
---
Commit 107d165d9 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Use 2-arg TraceMe constructor to prevent unnecessary StrCat computation when
tracing is disabled.
PiperOrigin-RevId: 165722280
---
Commit 7d01f89cc authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Android demo app for speech recognition
PiperOrigin-RevId: 165714459
---
Commit a6729325a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Deletes convert_n_to_eager_tensor. Moves convert_to_eager_tensor to constant_op.
PiperOrigin-RevId: 165704074
---
Commit 573b303ac authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BUILD cleanup in tensorflow/core/kernels
PiperOrigin-RevId: 165688864
---
Commit 711be6adc authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
`Dataset.from_generator()` constructs a dataset from a Python generator.
With this change, it becomes possible to use a Python generator as the source
dataset for a `tf.contrib.data` input pipeline. This enables easier integration
with non-TensorFlow data sources. The generator can yield a nested structure of
NumPy arrays, or values convertible to NumPy arrays.
This addresses a concern raised in issue #7951.
PiperOrigin-RevId: 165663857
---
Commit 00594ecdd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
New landing page and leftnav for Programmer's Guide.
PiperOrigin-RevId: 165660897
---
Commit 7359fec79 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implement Batchnorm Inference by expanding them into smaller ops.
1. Add batch norm inference support in batchnorm_rewriter
2. Connect xla's batchnorm inference to tf's FusedBatchNorm
RELNOTES: n/a
PiperOrigin-RevId: 165655351
---
Commit f0da8bf56 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[Rematerialization] Reconsider to remat operations with control dependencies
We added a conservartive logic to not rematerialize operations with control dependencies since the rematerialized operations could result in undesired ordering. However, we now realize that when we remat an operation, we also copy the dependencies of them, which guarantees the rematerialized operation has the same constraint as the original operation.
PiperOrigin-RevId: 165654629
---
Commit a1225879c authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Propagate error code in computation replay tool.
PiperOrigin-RevId: 165654497
---
Commit 513def0bb authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed BuildOpInfoWithoutDevice
PiperOrigin-RevId: 165653933
---
Commit d7e425f0b authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix linear algebra benchmarks.
PiperOrigin-RevId: 165653891
---
Commit 465c40819 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix the shape information propagation for Enter op.
PiperOrigin-RevId: 165653579
---
Commit c0198fd8d authored by Derek Murray<derek.murray@gmail.com>
Committed by gunan<gunan@google.com>:
[CMake] Add missing dependencies on boosted_trees protos and other fixes (#12315)
* [CMake] Add missing dependencies
* Avoid rebuilding boosted_trees protos for Python.
* Add GPU implementation ZeroInitializerOp to the CMake build.
---
Commit 641943fd7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165652758
---
Commit e31346452 authored by Jonathan Hseu<jhseu@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
TPUEstimator: Fix the outfeed thread join.
PiperOrigin-RevId: 165651781
---
Commit 565a9d350 authored by Vijay Vasudevan<vrv@google.com>
Committed by Andrew Harp<andrewharp@users.noreply.github.com>:
Add missing 'type' keyword to ArgumentParser add_argument (#12275)
Fixes #12210
---
Commit 19a55725a authored by Rohan Jain<rohanj@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Allowing functions to run across devices. This change expands the ProcessFunctionLibraryRuntime library to Instantiate and Run functions on different devices. When a FunctionLibraryRuntime encounters a function with a target that is another device, it delegates Instantiate() and Run() calls to the ProcessFunctionLibraryRuntime.
This change also moves the table_ containing all function instantiations to the PFLR instead of the FunctionLibraryRuntime.
PiperOrigin-RevId: 165651194
---
Commit 8c0853db7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a test for negative and zero pow() input.
PiperOrigin-RevId: 165650096
---
Commit a3c4e980e authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed input shape for freezing audio graphs
PiperOrigin-RevId: 165649546
---
Commit 9b9e5989d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a call_logit_fn utility for logit_fn's, similar to Estimator's _call_model_fn.
PiperOrigin-RevId: 165649388
---
Commit 4ff1f4442 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove the script as well if building tf_nightly.
---
Commit 373d78987 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Adding the break.
---
Commit 0139ac983 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove tensorboard as a required package if we are building tf_nightly.
---
Commit a92bd5d5c authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BEGIN_PUBLIC
Automated g4 rollback of changelist 165630063
PiperOrigin-RevId: 165957821
2017-08-21 12:10:44 -07:00
|
|
|
def get_python_major_version(python_bin_path):
|
|
|
|
|
"""Get the python major version."""
|
2017-08-25 14:01:05 -07:00
|
|
|
return run_shell([python_bin_path, '-c', 'import sys; print(sys.version[0])'])
|
Merge changes from github.
END_PUBLIC
---
Commit 575bd01d4 authored by Vijay Vasudevan<vrv@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove /replica:0 declaration in device functions and allow them
to be freely bound based on cluster names present.
When more than one value matches, it will choose the first
lexicographically available device that matches the specification,
which in practice will do pretty much the same thing as hardcoding
/replica:0.
PiperOrigin-RevId: 165766815
---
Commit d685bbc54 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Benchmarks with backprop enabled (and removes overhead).
Before:
np.array([[3]]) took 1.50us (30000 iterations)
Tensor([[3]]) took 16.30us (30000 iterations)
MatMul [2, 2]: np.dot took 0.61us (30000 iterations)
MatMul [2, 2]: tf.matmul took 60.53us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 25.72us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.82us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 45.70us (30000 iterations)
MatMul [100, 784]: np.dot took 383.32us (1000 iterations)
MatMul [100, 784]: tf.matmul took 350.35us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 315.97us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 249.42us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 280.95us (1000 iterations)
If backprop is enabled:
np.array([[3]]) took 0.83us (30000 iterations)
Tensor([[3]]) took 15.21us (30000 iterations)
MatMul [2, 2]: np.dot took 0.63us (30000 iterations)
MatMul [2, 2]: tf.matmul took 76.31us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 38.66us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.31us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 51.96us (30000 iterations)
MatMul [100, 784]: np.dot took 378.34us (1000 iterations)
MatMul [100, 784]: tf.matmul took 352.09us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 364.28us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 350.68us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 377.19us (1000 iterations)
After:
np.array([[3]]) took 0.86us (30000 iterations)
Tensor([[3]]) took 15.19us (30000 iterations)
MatMul [2, 2]: np.dot took 0.60us (30000 iterations)
MatMul [2, 2]: tf.matmul took 64.51us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 28.34us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.38us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 48.50us (30000 iterations)
MatMul [100, 784]: np.dot took 475.27us (1000 iterations)
MatMul [100, 784]: tf.matmul took 399.50us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 307.80us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 272.83us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 350.06us (1000 iterations)
PiperOrigin-RevId: 165765641
---
Commit d902babbd authored by David Majnemer<majnemer@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Algebraic simplifier incorrectly transformed convolutions into bitcasts
PiperOrigin-RevId: 165765575
---
Commit 8e78e10ef authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
disable test temporarily
PiperOrigin-RevId: 165763204
---
Commit a271c37db authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Small improvements to the arithmetic optimizer
PiperOrigin-RevId: 165760972
---
Commit b6409594d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Convert some tests to cover both eager and graph.
PiperOrigin-RevId: 165760364
---
Commit 5ead76420 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Reduce XLA compile time by ~7% for a convolutional image model:
* Added CompactPointerSet<T>, which is optimized for set size <= 1.
* Changed expensive CHECKs to DCHECKS in buffer_assignment.cc
* Reserve space in DFS state array before starting DFS.
* Use unsigned arithmetic in DFS state maintenance.
* HloInstruction:
- Moved frequently used fields to start for better cache locality.
- Use InlinedVector instead of vector for operand array.
- Use InlinedVector instead of vector for DFS stack.
* Pre-compute "is array" and "is tuple" for LogicalBuffer.
* PointsToSet:
- Combine two ShapeTrees into one.
- Use CompactPointerSet instead of std::set to hold sources.
- Use CompactPointerSet instead of std::set to hold flattened buffers.
* ShapeTree: use unique_ptr instead of optional for shape storage
(reduces size and destruction overhead).
* Add proper const qualifiers to some FlatSet iterator methods.
Co-author=jeff
PiperOrigin-RevId: 165759117
---
Commit a0544b0b8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make TPU symbols more easily accessible from contrib.
PiperOrigin-RevId: 165753322
---
Commit cdc08afbb authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Slightly relax numeric tolerance for sinlge precision tests of matrix_solve_ls (and tighten it for double precision).
PiperOrigin-RevId: 165750936
---
Commit eebcc861a authored by Jianwei Xie<xiejw@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed the race condition between multi eval step increments.
PiperOrigin-RevId: 165750595
---
Commit bbc0b8471 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 165748384
---
Commit 65f87c967 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Change device string in RecvNodeDescriptor in VirtualScheduler from const
reference to const as the RecvNodeDescriptor (and cached_recv_nodes map)
outlives device string from the NodeDef.
PiperOrigin-RevId: 165748244
---
Commit 57b0276cf authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165747467
---
Commit 64e54423b authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix nested dictionary handling in dataset elements.
Backports recent changes to the core version of the nest.py library.
Fixes #12372.
PiperOrigin-RevId: 165746517
---
Commit 378463ae8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make tf.eye accept Python integer shapes and avoid generating unnecessary shape handling ops.
Clean up test and add tests with placeholders.
PiperOrigin-RevId: 165746090
---
Commit 109ecf823 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add support for complex in matrix_solve_ls_op.
Split into separate files for each data type to speed up build.
PiperOrigin-RevId: 165744539
---
Commit 51441302d authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change.
PiperOrigin-RevId: 165737455
---
Commit d0cb32c2a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Docstring for ResourceVariable.
PiperOrigin-RevId: 165735441
---
Commit 32f4c5b6e authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Add IsFinite op in tf2xla.
PiperOrigin-RevId: 165734702
---
Commit 5f5c3eb0a authored by Mark Daoust<markdaoust@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Move "supervisor.md" from programmer's guide to api_guides.
PiperOrigin-RevId: 165732026
---
Commit d001b58de authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix handling of multi-output tf.py_func() in Dataset.map().
If the `map_func` returns a list of tensors, the current code will
attempt to stack it into a single tensor and raise an unintuitive
error. Some multi-output ops (such as `tf.py_func()`) return lists of
typically-not-stackable tensors. This change treats lists returned
from `map_func` as tuples; users who were relying on this
auto-stacking behavior should manually call `tf.stack()` (or
`tf.convert_to_tensor()`) on the list being returned.
Fixes #12396.
PiperOrigin-RevId: 165731970
---
Commit e6c60fb36 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix flakyness, sometimes the op takes ms to run.
PiperOrigin-RevId: 165728705
---
Commit 360bff8ae authored by Ali Yahya<alive@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Makes tape.watch() work with ResourceVariables.
To this end, also adds a property, `device`, to TensorNode.
PiperOrigin-RevId: 165726368
---
Commit 80bd004cd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implements SVDF model for keyword spotting tutorial.
PiperOrigin-RevId: 165725938
---
Commit aaabf6b90 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix bug: Using a ComputationDataHandle from the wrong ComputationBuilder.
PiperOrigin-RevId: 165724017
---
Commit 107d165d9 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Use 2-arg TraceMe constructor to prevent unnecessary StrCat computation when
tracing is disabled.
PiperOrigin-RevId: 165722280
---
Commit 7d01f89cc authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Android demo app for speech recognition
PiperOrigin-RevId: 165714459
---
Commit a6729325a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Deletes convert_n_to_eager_tensor. Moves convert_to_eager_tensor to constant_op.
PiperOrigin-RevId: 165704074
---
Commit 573b303ac authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BUILD cleanup in tensorflow/core/kernels
PiperOrigin-RevId: 165688864
---
Commit 711be6adc authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
`Dataset.from_generator()` constructs a dataset from a Python generator.
With this change, it becomes possible to use a Python generator as the source
dataset for a `tf.contrib.data` input pipeline. This enables easier integration
with non-TensorFlow data sources. The generator can yield a nested structure of
NumPy arrays, or values convertible to NumPy arrays.
This addresses a concern raised in issue #7951.
PiperOrigin-RevId: 165663857
---
Commit 00594ecdd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
New landing page and leftnav for Programmer's Guide.
PiperOrigin-RevId: 165660897
---
Commit 7359fec79 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implement Batchnorm Inference by expanding them into smaller ops.
1. Add batch norm inference support in batchnorm_rewriter
2. Connect xla's batchnorm inference to tf's FusedBatchNorm
RELNOTES: n/a
PiperOrigin-RevId: 165655351
---
Commit f0da8bf56 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[Rematerialization] Reconsider to remat operations with control dependencies
We added a conservartive logic to not rematerialize operations with control dependencies since the rematerialized operations could result in undesired ordering. However, we now realize that when we remat an operation, we also copy the dependencies of them, which guarantees the rematerialized operation has the same constraint as the original operation.
PiperOrigin-RevId: 165654629
---
Commit a1225879c authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Propagate error code in computation replay tool.
PiperOrigin-RevId: 165654497
---
Commit 513def0bb authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed BuildOpInfoWithoutDevice
PiperOrigin-RevId: 165653933
---
Commit d7e425f0b authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix linear algebra benchmarks.
PiperOrigin-RevId: 165653891
---
Commit 465c40819 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix the shape information propagation for Enter op.
PiperOrigin-RevId: 165653579
---
Commit c0198fd8d authored by Derek Murray<derek.murray@gmail.com>
Committed by gunan<gunan@google.com>:
[CMake] Add missing dependencies on boosted_trees protos and other fixes (#12315)
* [CMake] Add missing dependencies
* Avoid rebuilding boosted_trees protos for Python.
* Add GPU implementation ZeroInitializerOp to the CMake build.
---
Commit 641943fd7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165652758
---
Commit e31346452 authored by Jonathan Hseu<jhseu@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
TPUEstimator: Fix the outfeed thread join.
PiperOrigin-RevId: 165651781
---
Commit 565a9d350 authored by Vijay Vasudevan<vrv@google.com>
Committed by Andrew Harp<andrewharp@users.noreply.github.com>:
Add missing 'type' keyword to ArgumentParser add_argument (#12275)
Fixes #12210
---
Commit 19a55725a authored by Rohan Jain<rohanj@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Allowing functions to run across devices. This change expands the ProcessFunctionLibraryRuntime library to Instantiate and Run functions on different devices. When a FunctionLibraryRuntime encounters a function with a target that is another device, it delegates Instantiate() and Run() calls to the ProcessFunctionLibraryRuntime.
This change also moves the table_ containing all function instantiations to the PFLR instead of the FunctionLibraryRuntime.
PiperOrigin-RevId: 165651194
---
Commit 8c0853db7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a test for negative and zero pow() input.
PiperOrigin-RevId: 165650096
---
Commit a3c4e980e authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed input shape for freezing audio graphs
PiperOrigin-RevId: 165649546
---
Commit 9b9e5989d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a call_logit_fn utility for logit_fn's, similar to Estimator's _call_model_fn.
PiperOrigin-RevId: 165649388
---
Commit 4ff1f4442 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove the script as well if building tf_nightly.
---
Commit 373d78987 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Adding the break.
---
Commit 0139ac983 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove tensorboard as a required package if we are building tf_nightly.
---
Commit a92bd5d5c authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BEGIN_PUBLIC
Automated g4 rollback of changelist 165630063
PiperOrigin-RevId: 165957821
2017-08-21 12:10:44 -07:00
|
|
|
|
|
|
|
|
|
2017-09-19 18:36:26 -07:00
|
|
|
def setup_python(environ_cp):
|
2017-07-25 13:30:03 -07:00
|
|
|
"""Setup python related env variables."""
|
|
|
|
|
# Get PYTHON_BIN_PATH, default is the current running python.
|
|
|
|
|
default_python_bin_path = sys.executable
|
|
|
|
|
ask_python_bin_path = ('Please specify the location of python. [Default is '
|
|
|
|
|
'%s]: ') % default_python_bin_path
|
|
|
|
|
while True:
|
|
|
|
|
python_bin_path = get_from_env_or_user_or_default(
|
|
|
|
|
environ_cp, 'PYTHON_BIN_PATH', ask_python_bin_path,
|
|
|
|
|
default_python_bin_path)
|
|
|
|
|
# Check if the path is valid
|
2017-08-25 14:01:05 -07:00
|
|
|
if os.path.isfile(python_bin_path) and os.access(
|
|
|
|
|
python_bin_path, os.X_OK):
|
2017-07-25 13:30:03 -07:00
|
|
|
break
|
|
|
|
|
elif not os.path.exists(python_bin_path):
|
|
|
|
|
print('Invalid python path: %s cannot be found.' % python_bin_path)
|
|
|
|
|
else:
|
|
|
|
|
print('%s is not executable. Is it the python binary?' % python_bin_path)
|
|
|
|
|
environ_cp['PYTHON_BIN_PATH'] = ''
|
|
|
|
|
|
Merge changes from github.
END_PUBLIC
---
Commit 575bd01d4 authored by Vijay Vasudevan<vrv@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove /replica:0 declaration in device functions and allow them
to be freely bound based on cluster names present.
When more than one value matches, it will choose the first
lexicographically available device that matches the specification,
which in practice will do pretty much the same thing as hardcoding
/replica:0.
PiperOrigin-RevId: 165766815
---
Commit d685bbc54 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Benchmarks with backprop enabled (and removes overhead).
Before:
np.array([[3]]) took 1.50us (30000 iterations)
Tensor([[3]]) took 16.30us (30000 iterations)
MatMul [2, 2]: np.dot took 0.61us (30000 iterations)
MatMul [2, 2]: tf.matmul took 60.53us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 25.72us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.82us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 45.70us (30000 iterations)
MatMul [100, 784]: np.dot took 383.32us (1000 iterations)
MatMul [100, 784]: tf.matmul took 350.35us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 315.97us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 249.42us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 280.95us (1000 iterations)
If backprop is enabled:
np.array([[3]]) took 0.83us (30000 iterations)
Tensor([[3]]) took 15.21us (30000 iterations)
MatMul [2, 2]: np.dot took 0.63us (30000 iterations)
MatMul [2, 2]: tf.matmul took 76.31us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 38.66us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.31us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 51.96us (30000 iterations)
MatMul [100, 784]: np.dot took 378.34us (1000 iterations)
MatMul [100, 784]: tf.matmul took 352.09us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 364.28us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 350.68us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 377.19us (1000 iterations)
After:
np.array([[3]]) took 0.86us (30000 iterations)
Tensor([[3]]) took 15.19us (30000 iterations)
MatMul [2, 2]: np.dot took 0.60us (30000 iterations)
MatMul [2, 2]: tf.matmul took 64.51us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 28.34us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.38us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 48.50us (30000 iterations)
MatMul [100, 784]: np.dot took 475.27us (1000 iterations)
MatMul [100, 784]: tf.matmul took 399.50us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 307.80us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 272.83us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 350.06us (1000 iterations)
PiperOrigin-RevId: 165765641
---
Commit d902babbd authored by David Majnemer<majnemer@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Algebraic simplifier incorrectly transformed convolutions into bitcasts
PiperOrigin-RevId: 165765575
---
Commit 8e78e10ef authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
disable test temporarily
PiperOrigin-RevId: 165763204
---
Commit a271c37db authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Small improvements to the arithmetic optimizer
PiperOrigin-RevId: 165760972
---
Commit b6409594d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Convert some tests to cover both eager and graph.
PiperOrigin-RevId: 165760364
---
Commit 5ead76420 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Reduce XLA compile time by ~7% for a convolutional image model:
* Added CompactPointerSet<T>, which is optimized for set size <= 1.
* Changed expensive CHECKs to DCHECKS in buffer_assignment.cc
* Reserve space in DFS state array before starting DFS.
* Use unsigned arithmetic in DFS state maintenance.
* HloInstruction:
- Moved frequently used fields to start for better cache locality.
- Use InlinedVector instead of vector for operand array.
- Use InlinedVector instead of vector for DFS stack.
* Pre-compute "is array" and "is tuple" for LogicalBuffer.
* PointsToSet:
- Combine two ShapeTrees into one.
- Use CompactPointerSet instead of std::set to hold sources.
- Use CompactPointerSet instead of std::set to hold flattened buffers.
* ShapeTree: use unique_ptr instead of optional for shape storage
(reduces size and destruction overhead).
* Add proper const qualifiers to some FlatSet iterator methods.
Co-author=jeff
PiperOrigin-RevId: 165759117
---
Commit a0544b0b8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make TPU symbols more easily accessible from contrib.
PiperOrigin-RevId: 165753322
---
Commit cdc08afbb authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Slightly relax numeric tolerance for sinlge precision tests of matrix_solve_ls (and tighten it for double precision).
PiperOrigin-RevId: 165750936
---
Commit eebcc861a authored by Jianwei Xie<xiejw@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed the race condition between multi eval step increments.
PiperOrigin-RevId: 165750595
---
Commit bbc0b8471 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 165748384
---
Commit 65f87c967 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Change device string in RecvNodeDescriptor in VirtualScheduler from const
reference to const as the RecvNodeDescriptor (and cached_recv_nodes map)
outlives device string from the NodeDef.
PiperOrigin-RevId: 165748244
---
Commit 57b0276cf authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165747467
---
Commit 64e54423b authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix nested dictionary handling in dataset elements.
Backports recent changes to the core version of the nest.py library.
Fixes #12372.
PiperOrigin-RevId: 165746517
---
Commit 378463ae8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make tf.eye accept Python integer shapes and avoid generating unnecessary shape handling ops.
Clean up test and add tests with placeholders.
PiperOrigin-RevId: 165746090
---
Commit 109ecf823 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add support for complex in matrix_solve_ls_op.
Split into separate files for each data type to speed up build.
PiperOrigin-RevId: 165744539
---
Commit 51441302d authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change.
PiperOrigin-RevId: 165737455
---
Commit d0cb32c2a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Docstring for ResourceVariable.
PiperOrigin-RevId: 165735441
---
Commit 32f4c5b6e authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Add IsFinite op in tf2xla.
PiperOrigin-RevId: 165734702
---
Commit 5f5c3eb0a authored by Mark Daoust<markdaoust@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Move "supervisor.md" from programmer's guide to api_guides.
PiperOrigin-RevId: 165732026
---
Commit d001b58de authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix handling of multi-output tf.py_func() in Dataset.map().
If the `map_func` returns a list of tensors, the current code will
attempt to stack it into a single tensor and raise an unintuitive
error. Some multi-output ops (such as `tf.py_func()`) return lists of
typically-not-stackable tensors. This change treats lists returned
from `map_func` as tuples; users who were relying on this
auto-stacking behavior should manually call `tf.stack()` (or
`tf.convert_to_tensor()`) on the list being returned.
Fixes #12396.
PiperOrigin-RevId: 165731970
---
Commit e6c60fb36 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix flakyness, sometimes the op takes ms to run.
PiperOrigin-RevId: 165728705
---
Commit 360bff8ae authored by Ali Yahya<alive@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Makes tape.watch() work with ResourceVariables.
To this end, also adds a property, `device`, to TensorNode.
PiperOrigin-RevId: 165726368
---
Commit 80bd004cd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implements SVDF model for keyword spotting tutorial.
PiperOrigin-RevId: 165725938
---
Commit aaabf6b90 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix bug: Using a ComputationDataHandle from the wrong ComputationBuilder.
PiperOrigin-RevId: 165724017
---
Commit 107d165d9 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Use 2-arg TraceMe constructor to prevent unnecessary StrCat computation when
tracing is disabled.
PiperOrigin-RevId: 165722280
---
Commit 7d01f89cc authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Android demo app for speech recognition
PiperOrigin-RevId: 165714459
---
Commit a6729325a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Deletes convert_n_to_eager_tensor. Moves convert_to_eager_tensor to constant_op.
PiperOrigin-RevId: 165704074
---
Commit 573b303ac authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BUILD cleanup in tensorflow/core/kernels
PiperOrigin-RevId: 165688864
---
Commit 711be6adc authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
`Dataset.from_generator()` constructs a dataset from a Python generator.
With this change, it becomes possible to use a Python generator as the source
dataset for a `tf.contrib.data` input pipeline. This enables easier integration
with non-TensorFlow data sources. The generator can yield a nested structure of
NumPy arrays, or values convertible to NumPy arrays.
This addresses a concern raised in issue #7951.
PiperOrigin-RevId: 165663857
---
Commit 00594ecdd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
New landing page and leftnav for Programmer's Guide.
PiperOrigin-RevId: 165660897
---
Commit 7359fec79 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implement Batchnorm Inference by expanding them into smaller ops.
1. Add batch norm inference support in batchnorm_rewriter
2. Connect xla's batchnorm inference to tf's FusedBatchNorm
RELNOTES: n/a
PiperOrigin-RevId: 165655351
---
Commit f0da8bf56 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[Rematerialization] Reconsider to remat operations with control dependencies
We added a conservartive logic to not rematerialize operations with control dependencies since the rematerialized operations could result in undesired ordering. However, we now realize that when we remat an operation, we also copy the dependencies of them, which guarantees the rematerialized operation has the same constraint as the original operation.
PiperOrigin-RevId: 165654629
---
Commit a1225879c authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Propagate error code in computation replay tool.
PiperOrigin-RevId: 165654497
---
Commit 513def0bb authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed BuildOpInfoWithoutDevice
PiperOrigin-RevId: 165653933
---
Commit d7e425f0b authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix linear algebra benchmarks.
PiperOrigin-RevId: 165653891
---
Commit 465c40819 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix the shape information propagation for Enter op.
PiperOrigin-RevId: 165653579
---
Commit c0198fd8d authored by Derek Murray<derek.murray@gmail.com>
Committed by gunan<gunan@google.com>:
[CMake] Add missing dependencies on boosted_trees protos and other fixes (#12315)
* [CMake] Add missing dependencies
* Avoid rebuilding boosted_trees protos for Python.
* Add GPU implementation ZeroInitializerOp to the CMake build.
---
Commit 641943fd7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165652758
---
Commit e31346452 authored by Jonathan Hseu<jhseu@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
TPUEstimator: Fix the outfeed thread join.
PiperOrigin-RevId: 165651781
---
Commit 565a9d350 authored by Vijay Vasudevan<vrv@google.com>
Committed by Andrew Harp<andrewharp@users.noreply.github.com>:
Add missing 'type' keyword to ArgumentParser add_argument (#12275)
Fixes #12210
---
Commit 19a55725a authored by Rohan Jain<rohanj@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Allowing functions to run across devices. This change expands the ProcessFunctionLibraryRuntime library to Instantiate and Run functions on different devices. When a FunctionLibraryRuntime encounters a function with a target that is another device, it delegates Instantiate() and Run() calls to the ProcessFunctionLibraryRuntime.
This change also moves the table_ containing all function instantiations to the PFLR instead of the FunctionLibraryRuntime.
PiperOrigin-RevId: 165651194
---
Commit 8c0853db7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a test for negative and zero pow() input.
PiperOrigin-RevId: 165650096
---
Commit a3c4e980e authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed input shape for freezing audio graphs
PiperOrigin-RevId: 165649546
---
Commit 9b9e5989d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a call_logit_fn utility for logit_fn's, similar to Estimator's _call_model_fn.
PiperOrigin-RevId: 165649388
---
Commit 4ff1f4442 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove the script as well if building tf_nightly.
---
Commit 373d78987 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Adding the break.
---
Commit 0139ac983 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove tensorboard as a required package if we are building tf_nightly.
---
Commit a92bd5d5c authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BEGIN_PUBLIC
Automated g4 rollback of changelist 165630063
PiperOrigin-RevId: 165957821
2017-08-21 12:10:44 -07:00
|
|
|
# Convert python path to Windows style before checking lib and version
|
2017-09-02 19:21:45 -07:00
|
|
|
if is_windows() or is_cygwin():
|
Merge changes from github.
END_PUBLIC
---
Commit 575bd01d4 authored by Vijay Vasudevan<vrv@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove /replica:0 declaration in device functions and allow them
to be freely bound based on cluster names present.
When more than one value matches, it will choose the first
lexicographically available device that matches the specification,
which in practice will do pretty much the same thing as hardcoding
/replica:0.
PiperOrigin-RevId: 165766815
---
Commit d685bbc54 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Benchmarks with backprop enabled (and removes overhead).
Before:
np.array([[3]]) took 1.50us (30000 iterations)
Tensor([[3]]) took 16.30us (30000 iterations)
MatMul [2, 2]: np.dot took 0.61us (30000 iterations)
MatMul [2, 2]: tf.matmul took 60.53us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 25.72us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.82us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 45.70us (30000 iterations)
MatMul [100, 784]: np.dot took 383.32us (1000 iterations)
MatMul [100, 784]: tf.matmul took 350.35us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 315.97us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 249.42us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 280.95us (1000 iterations)
If backprop is enabled:
np.array([[3]]) took 0.83us (30000 iterations)
Tensor([[3]]) took 15.21us (30000 iterations)
MatMul [2, 2]: np.dot took 0.63us (30000 iterations)
MatMul [2, 2]: tf.matmul took 76.31us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 38.66us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.31us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 51.96us (30000 iterations)
MatMul [100, 784]: np.dot took 378.34us (1000 iterations)
MatMul [100, 784]: tf.matmul took 352.09us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 364.28us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 350.68us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 377.19us (1000 iterations)
After:
np.array([[3]]) took 0.86us (30000 iterations)
Tensor([[3]]) took 15.19us (30000 iterations)
MatMul [2, 2]: np.dot took 0.60us (30000 iterations)
MatMul [2, 2]: tf.matmul took 64.51us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 28.34us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.38us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 48.50us (30000 iterations)
MatMul [100, 784]: np.dot took 475.27us (1000 iterations)
MatMul [100, 784]: tf.matmul took 399.50us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 307.80us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 272.83us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 350.06us (1000 iterations)
PiperOrigin-RevId: 165765641
---
Commit d902babbd authored by David Majnemer<majnemer@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Algebraic simplifier incorrectly transformed convolutions into bitcasts
PiperOrigin-RevId: 165765575
---
Commit 8e78e10ef authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
disable test temporarily
PiperOrigin-RevId: 165763204
---
Commit a271c37db authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Small improvements to the arithmetic optimizer
PiperOrigin-RevId: 165760972
---
Commit b6409594d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Convert some tests to cover both eager and graph.
PiperOrigin-RevId: 165760364
---
Commit 5ead76420 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Reduce XLA compile time by ~7% for a convolutional image model:
* Added CompactPointerSet<T>, which is optimized for set size <= 1.
* Changed expensive CHECKs to DCHECKS in buffer_assignment.cc
* Reserve space in DFS state array before starting DFS.
* Use unsigned arithmetic in DFS state maintenance.
* HloInstruction:
- Moved frequently used fields to start for better cache locality.
- Use InlinedVector instead of vector for operand array.
- Use InlinedVector instead of vector for DFS stack.
* Pre-compute "is array" and "is tuple" for LogicalBuffer.
* PointsToSet:
- Combine two ShapeTrees into one.
- Use CompactPointerSet instead of std::set to hold sources.
- Use CompactPointerSet instead of std::set to hold flattened buffers.
* ShapeTree: use unique_ptr instead of optional for shape storage
(reduces size and destruction overhead).
* Add proper const qualifiers to some FlatSet iterator methods.
Co-author=jeff
PiperOrigin-RevId: 165759117
---
Commit a0544b0b8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make TPU symbols more easily accessible from contrib.
PiperOrigin-RevId: 165753322
---
Commit cdc08afbb authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Slightly relax numeric tolerance for sinlge precision tests of matrix_solve_ls (and tighten it for double precision).
PiperOrigin-RevId: 165750936
---
Commit eebcc861a authored by Jianwei Xie<xiejw@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed the race condition between multi eval step increments.
PiperOrigin-RevId: 165750595
---
Commit bbc0b8471 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 165748384
---
Commit 65f87c967 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Change device string in RecvNodeDescriptor in VirtualScheduler from const
reference to const as the RecvNodeDescriptor (and cached_recv_nodes map)
outlives device string from the NodeDef.
PiperOrigin-RevId: 165748244
---
Commit 57b0276cf authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165747467
---
Commit 64e54423b authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix nested dictionary handling in dataset elements.
Backports recent changes to the core version of the nest.py library.
Fixes #12372.
PiperOrigin-RevId: 165746517
---
Commit 378463ae8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make tf.eye accept Python integer shapes and avoid generating unnecessary shape handling ops.
Clean up test and add tests with placeholders.
PiperOrigin-RevId: 165746090
---
Commit 109ecf823 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add support for complex in matrix_solve_ls_op.
Split into separate files for each data type to speed up build.
PiperOrigin-RevId: 165744539
---
Commit 51441302d authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change.
PiperOrigin-RevId: 165737455
---
Commit d0cb32c2a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Docstring for ResourceVariable.
PiperOrigin-RevId: 165735441
---
Commit 32f4c5b6e authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Add IsFinite op in tf2xla.
PiperOrigin-RevId: 165734702
---
Commit 5f5c3eb0a authored by Mark Daoust<markdaoust@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Move "supervisor.md" from programmer's guide to api_guides.
PiperOrigin-RevId: 165732026
---
Commit d001b58de authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix handling of multi-output tf.py_func() in Dataset.map().
If the `map_func` returns a list of tensors, the current code will
attempt to stack it into a single tensor and raise an unintuitive
error. Some multi-output ops (such as `tf.py_func()`) return lists of
typically-not-stackable tensors. This change treats lists returned
from `map_func` as tuples; users who were relying on this
auto-stacking behavior should manually call `tf.stack()` (or
`tf.convert_to_tensor()`) on the list being returned.
Fixes #12396.
PiperOrigin-RevId: 165731970
---
Commit e6c60fb36 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix flakyness, sometimes the op takes ms to run.
PiperOrigin-RevId: 165728705
---
Commit 360bff8ae authored by Ali Yahya<alive@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Makes tape.watch() work with ResourceVariables.
To this end, also adds a property, `device`, to TensorNode.
PiperOrigin-RevId: 165726368
---
Commit 80bd004cd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implements SVDF model for keyword spotting tutorial.
PiperOrigin-RevId: 165725938
---
Commit aaabf6b90 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix bug: Using a ComputationDataHandle from the wrong ComputationBuilder.
PiperOrigin-RevId: 165724017
---
Commit 107d165d9 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Use 2-arg TraceMe constructor to prevent unnecessary StrCat computation when
tracing is disabled.
PiperOrigin-RevId: 165722280
---
Commit 7d01f89cc authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Android demo app for speech recognition
PiperOrigin-RevId: 165714459
---
Commit a6729325a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Deletes convert_n_to_eager_tensor. Moves convert_to_eager_tensor to constant_op.
PiperOrigin-RevId: 165704074
---
Commit 573b303ac authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BUILD cleanup in tensorflow/core/kernels
PiperOrigin-RevId: 165688864
---
Commit 711be6adc authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
`Dataset.from_generator()` constructs a dataset from a Python generator.
With this change, it becomes possible to use a Python generator as the source
dataset for a `tf.contrib.data` input pipeline. This enables easier integration
with non-TensorFlow data sources. The generator can yield a nested structure of
NumPy arrays, or values convertible to NumPy arrays.
This addresses a concern raised in issue #7951.
PiperOrigin-RevId: 165663857
---
Commit 00594ecdd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
New landing page and leftnav for Programmer's Guide.
PiperOrigin-RevId: 165660897
---
Commit 7359fec79 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implement Batchnorm Inference by expanding them into smaller ops.
1. Add batch norm inference support in batchnorm_rewriter
2. Connect xla's batchnorm inference to tf's FusedBatchNorm
RELNOTES: n/a
PiperOrigin-RevId: 165655351
---
Commit f0da8bf56 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[Rematerialization] Reconsider to remat operations with control dependencies
We added a conservartive logic to not rematerialize operations with control dependencies since the rematerialized operations could result in undesired ordering. However, we now realize that when we remat an operation, we also copy the dependencies of them, which guarantees the rematerialized operation has the same constraint as the original operation.
PiperOrigin-RevId: 165654629
---
Commit a1225879c authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Propagate error code in computation replay tool.
PiperOrigin-RevId: 165654497
---
Commit 513def0bb authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed BuildOpInfoWithoutDevice
PiperOrigin-RevId: 165653933
---
Commit d7e425f0b authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix linear algebra benchmarks.
PiperOrigin-RevId: 165653891
---
Commit 465c40819 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix the shape information propagation for Enter op.
PiperOrigin-RevId: 165653579
---
Commit c0198fd8d authored by Derek Murray<derek.murray@gmail.com>
Committed by gunan<gunan@google.com>:
[CMake] Add missing dependencies on boosted_trees protos and other fixes (#12315)
* [CMake] Add missing dependencies
* Avoid rebuilding boosted_trees protos for Python.
* Add GPU implementation ZeroInitializerOp to the CMake build.
---
Commit 641943fd7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165652758
---
Commit e31346452 authored by Jonathan Hseu<jhseu@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
TPUEstimator: Fix the outfeed thread join.
PiperOrigin-RevId: 165651781
---
Commit 565a9d350 authored by Vijay Vasudevan<vrv@google.com>
Committed by Andrew Harp<andrewharp@users.noreply.github.com>:
Add missing 'type' keyword to ArgumentParser add_argument (#12275)
Fixes #12210
---
Commit 19a55725a authored by Rohan Jain<rohanj@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Allowing functions to run across devices. This change expands the ProcessFunctionLibraryRuntime library to Instantiate and Run functions on different devices. When a FunctionLibraryRuntime encounters a function with a target that is another device, it delegates Instantiate() and Run() calls to the ProcessFunctionLibraryRuntime.
This change also moves the table_ containing all function instantiations to the PFLR instead of the FunctionLibraryRuntime.
PiperOrigin-RevId: 165651194
---
Commit 8c0853db7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a test for negative and zero pow() input.
PiperOrigin-RevId: 165650096
---
Commit a3c4e980e authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed input shape for freezing audio graphs
PiperOrigin-RevId: 165649546
---
Commit 9b9e5989d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a call_logit_fn utility for logit_fn's, similar to Estimator's _call_model_fn.
PiperOrigin-RevId: 165649388
---
Commit 4ff1f4442 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove the script as well if building tf_nightly.
---
Commit 373d78987 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Adding the break.
---
Commit 0139ac983 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove tensorboard as a required package if we are building tf_nightly.
---
Commit a92bd5d5c authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BEGIN_PUBLIC
Automated g4 rollback of changelist 165630063
PiperOrigin-RevId: 165957821
2017-08-21 12:10:44 -07:00
|
|
|
python_bin_path = cygpath(python_bin_path)
|
|
|
|
|
|
2017-07-25 13:30:03 -07:00
|
|
|
# Get PYTHON_LIB_PATH
|
|
|
|
|
python_lib_path = environ_cp.get('PYTHON_LIB_PATH')
|
|
|
|
|
if not python_lib_path:
|
Merge changes from github.
END_PUBLIC
---
Commit 575bd01d4 authored by Vijay Vasudevan<vrv@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove /replica:0 declaration in device functions and allow them
to be freely bound based on cluster names present.
When more than one value matches, it will choose the first
lexicographically available device that matches the specification,
which in practice will do pretty much the same thing as hardcoding
/replica:0.
PiperOrigin-RevId: 165766815
---
Commit d685bbc54 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Benchmarks with backprop enabled (and removes overhead).
Before:
np.array([[3]]) took 1.50us (30000 iterations)
Tensor([[3]]) took 16.30us (30000 iterations)
MatMul [2, 2]: np.dot took 0.61us (30000 iterations)
MatMul [2, 2]: tf.matmul took 60.53us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 25.72us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.82us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 45.70us (30000 iterations)
MatMul [100, 784]: np.dot took 383.32us (1000 iterations)
MatMul [100, 784]: tf.matmul took 350.35us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 315.97us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 249.42us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 280.95us (1000 iterations)
If backprop is enabled:
np.array([[3]]) took 0.83us (30000 iterations)
Tensor([[3]]) took 15.21us (30000 iterations)
MatMul [2, 2]: np.dot took 0.63us (30000 iterations)
MatMul [2, 2]: tf.matmul took 76.31us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 38.66us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.31us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 51.96us (30000 iterations)
MatMul [100, 784]: np.dot took 378.34us (1000 iterations)
MatMul [100, 784]: tf.matmul took 352.09us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 364.28us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 350.68us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 377.19us (1000 iterations)
After:
np.array([[3]]) took 0.86us (30000 iterations)
Tensor([[3]]) took 15.19us (30000 iterations)
MatMul [2, 2]: np.dot took 0.60us (30000 iterations)
MatMul [2, 2]: tf.matmul took 64.51us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 28.34us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.38us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 48.50us (30000 iterations)
MatMul [100, 784]: np.dot took 475.27us (1000 iterations)
MatMul [100, 784]: tf.matmul took 399.50us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 307.80us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 272.83us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 350.06us (1000 iterations)
PiperOrigin-RevId: 165765641
---
Commit d902babbd authored by David Majnemer<majnemer@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Algebraic simplifier incorrectly transformed convolutions into bitcasts
PiperOrigin-RevId: 165765575
---
Commit 8e78e10ef authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
disable test temporarily
PiperOrigin-RevId: 165763204
---
Commit a271c37db authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Small improvements to the arithmetic optimizer
PiperOrigin-RevId: 165760972
---
Commit b6409594d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Convert some tests to cover both eager and graph.
PiperOrigin-RevId: 165760364
---
Commit 5ead76420 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Reduce XLA compile time by ~7% for a convolutional image model:
* Added CompactPointerSet<T>, which is optimized for set size <= 1.
* Changed expensive CHECKs to DCHECKS in buffer_assignment.cc
* Reserve space in DFS state array before starting DFS.
* Use unsigned arithmetic in DFS state maintenance.
* HloInstruction:
- Moved frequently used fields to start for better cache locality.
- Use InlinedVector instead of vector for operand array.
- Use InlinedVector instead of vector for DFS stack.
* Pre-compute "is array" and "is tuple" for LogicalBuffer.
* PointsToSet:
- Combine two ShapeTrees into one.
- Use CompactPointerSet instead of std::set to hold sources.
- Use CompactPointerSet instead of std::set to hold flattened buffers.
* ShapeTree: use unique_ptr instead of optional for shape storage
(reduces size and destruction overhead).
* Add proper const qualifiers to some FlatSet iterator methods.
Co-author=jeff
PiperOrigin-RevId: 165759117
---
Commit a0544b0b8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make TPU symbols more easily accessible from contrib.
PiperOrigin-RevId: 165753322
---
Commit cdc08afbb authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Slightly relax numeric tolerance for sinlge precision tests of matrix_solve_ls (and tighten it for double precision).
PiperOrigin-RevId: 165750936
---
Commit eebcc861a authored by Jianwei Xie<xiejw@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed the race condition between multi eval step increments.
PiperOrigin-RevId: 165750595
---
Commit bbc0b8471 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 165748384
---
Commit 65f87c967 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Change device string in RecvNodeDescriptor in VirtualScheduler from const
reference to const as the RecvNodeDescriptor (and cached_recv_nodes map)
outlives device string from the NodeDef.
PiperOrigin-RevId: 165748244
---
Commit 57b0276cf authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165747467
---
Commit 64e54423b authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix nested dictionary handling in dataset elements.
Backports recent changes to the core version of the nest.py library.
Fixes #12372.
PiperOrigin-RevId: 165746517
---
Commit 378463ae8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make tf.eye accept Python integer shapes and avoid generating unnecessary shape handling ops.
Clean up test and add tests with placeholders.
PiperOrigin-RevId: 165746090
---
Commit 109ecf823 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add support for complex in matrix_solve_ls_op.
Split into separate files for each data type to speed up build.
PiperOrigin-RevId: 165744539
---
Commit 51441302d authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change.
PiperOrigin-RevId: 165737455
---
Commit d0cb32c2a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Docstring for ResourceVariable.
PiperOrigin-RevId: 165735441
---
Commit 32f4c5b6e authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Add IsFinite op in tf2xla.
PiperOrigin-RevId: 165734702
---
Commit 5f5c3eb0a authored by Mark Daoust<markdaoust@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Move "supervisor.md" from programmer's guide to api_guides.
PiperOrigin-RevId: 165732026
---
Commit d001b58de authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix handling of multi-output tf.py_func() in Dataset.map().
If the `map_func` returns a list of tensors, the current code will
attempt to stack it into a single tensor and raise an unintuitive
error. Some multi-output ops (such as `tf.py_func()`) return lists of
typically-not-stackable tensors. This change treats lists returned
from `map_func` as tuples; users who were relying on this
auto-stacking behavior should manually call `tf.stack()` (or
`tf.convert_to_tensor()`) on the list being returned.
Fixes #12396.
PiperOrigin-RevId: 165731970
---
Commit e6c60fb36 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix flakyness, sometimes the op takes ms to run.
PiperOrigin-RevId: 165728705
---
Commit 360bff8ae authored by Ali Yahya<alive@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Makes tape.watch() work with ResourceVariables.
To this end, also adds a property, `device`, to TensorNode.
PiperOrigin-RevId: 165726368
---
Commit 80bd004cd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implements SVDF model for keyword spotting tutorial.
PiperOrigin-RevId: 165725938
---
Commit aaabf6b90 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix bug: Using a ComputationDataHandle from the wrong ComputationBuilder.
PiperOrigin-RevId: 165724017
---
Commit 107d165d9 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Use 2-arg TraceMe constructor to prevent unnecessary StrCat computation when
tracing is disabled.
PiperOrigin-RevId: 165722280
---
Commit 7d01f89cc authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Android demo app for speech recognition
PiperOrigin-RevId: 165714459
---
Commit a6729325a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Deletes convert_n_to_eager_tensor. Moves convert_to_eager_tensor to constant_op.
PiperOrigin-RevId: 165704074
---
Commit 573b303ac authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BUILD cleanup in tensorflow/core/kernels
PiperOrigin-RevId: 165688864
---
Commit 711be6adc authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
`Dataset.from_generator()` constructs a dataset from a Python generator.
With this change, it becomes possible to use a Python generator as the source
dataset for a `tf.contrib.data` input pipeline. This enables easier integration
with non-TensorFlow data sources. The generator can yield a nested structure of
NumPy arrays, or values convertible to NumPy arrays.
This addresses a concern raised in issue #7951.
PiperOrigin-RevId: 165663857
---
Commit 00594ecdd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
New landing page and leftnav for Programmer's Guide.
PiperOrigin-RevId: 165660897
---
Commit 7359fec79 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implement Batchnorm Inference by expanding them into smaller ops.
1. Add batch norm inference support in batchnorm_rewriter
2. Connect xla's batchnorm inference to tf's FusedBatchNorm
RELNOTES: n/a
PiperOrigin-RevId: 165655351
---
Commit f0da8bf56 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[Rematerialization] Reconsider to remat operations with control dependencies
We added a conservartive logic to not rematerialize operations with control dependencies since the rematerialized operations could result in undesired ordering. However, we now realize that when we remat an operation, we also copy the dependencies of them, which guarantees the rematerialized operation has the same constraint as the original operation.
PiperOrigin-RevId: 165654629
---
Commit a1225879c authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Propagate error code in computation replay tool.
PiperOrigin-RevId: 165654497
---
Commit 513def0bb authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed BuildOpInfoWithoutDevice
PiperOrigin-RevId: 165653933
---
Commit d7e425f0b authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix linear algebra benchmarks.
PiperOrigin-RevId: 165653891
---
Commit 465c40819 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix the shape information propagation for Enter op.
PiperOrigin-RevId: 165653579
---
Commit c0198fd8d authored by Derek Murray<derek.murray@gmail.com>
Committed by gunan<gunan@google.com>:
[CMake] Add missing dependencies on boosted_trees protos and other fixes (#12315)
* [CMake] Add missing dependencies
* Avoid rebuilding boosted_trees protos for Python.
* Add GPU implementation ZeroInitializerOp to the CMake build.
---
Commit 641943fd7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165652758
---
Commit e31346452 authored by Jonathan Hseu<jhseu@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
TPUEstimator: Fix the outfeed thread join.
PiperOrigin-RevId: 165651781
---
Commit 565a9d350 authored by Vijay Vasudevan<vrv@google.com>
Committed by Andrew Harp<andrewharp@users.noreply.github.com>:
Add missing 'type' keyword to ArgumentParser add_argument (#12275)
Fixes #12210
---
Commit 19a55725a authored by Rohan Jain<rohanj@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Allowing functions to run across devices. This change expands the ProcessFunctionLibraryRuntime library to Instantiate and Run functions on different devices. When a FunctionLibraryRuntime encounters a function with a target that is another device, it delegates Instantiate() and Run() calls to the ProcessFunctionLibraryRuntime.
This change also moves the table_ containing all function instantiations to the PFLR instead of the FunctionLibraryRuntime.
PiperOrigin-RevId: 165651194
---
Commit 8c0853db7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a test for negative and zero pow() input.
PiperOrigin-RevId: 165650096
---
Commit a3c4e980e authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed input shape for freezing audio graphs
PiperOrigin-RevId: 165649546
---
Commit 9b9e5989d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a call_logit_fn utility for logit_fn's, similar to Estimator's _call_model_fn.
PiperOrigin-RevId: 165649388
---
Commit 4ff1f4442 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove the script as well if building tf_nightly.
---
Commit 373d78987 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Adding the break.
---
Commit 0139ac983 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove tensorboard as a required package if we are building tf_nightly.
---
Commit a92bd5d5c authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BEGIN_PUBLIC
Automated g4 rollback of changelist 165630063
PiperOrigin-RevId: 165957821
2017-08-21 12:10:44 -07:00
|
|
|
python_lib_paths = get_python_path(environ_cp, python_bin_path)
|
2017-07-25 13:30:03 -07:00
|
|
|
if environ_cp.get('USE_DEFAULT_PYTHON_LIB_PATH') == '1':
|
Merge changes from github.
END_PUBLIC
I dropped the following commit because it doesn't compile.
I will follow up with Andrew to fix it or revert it.
Commit 003deb88b authored by osdamv<osdamv@gmail.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Refactor and implementation of the camera API 1, it fixes #8736 (#10771)
List of commits in this CL:
---
Commit 446450369 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Use identity of param variable in cudnn_rnn.RNNParamsSaveable instead of parameter
variable directly. The RNNParamsSaveable is usually used in a graph which also
has a saver for the cudnn param variable itself, if the same op is used for
both, fails with a two savers for same op error.
PiperOrigin-RevId: 163431826
---
Commit d629a8316 authored by RJ Ryan<rjryan@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Increase bound on tf.contrib.signal.inverse_stft gradient error to avoid flakiness on macOS.
PiperOrigin-RevId: 163426631
---
Commit 253bcbb71 authored by Kay Zhu<kayzhu@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Use HloEvaluator for convolution in reference_util.
Also Speed up HloEvaluator's HandleConvolution in non-opt build, by moving calls
to HloInstruction::shape() out of the inner loop.
PiperOrigin-RevId: 163416183
---
Commit 569a00e68 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update API to traffic in unique_ptrs rather than owning raw pointers
PiperOrigin-RevId: 163414320
---
Commit 31a77bc77 authored by Asim Shankar<ashankar@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Java: Update release to 1.3.0-rc1
PiperOrigin-RevId: 163413736
---
Commit 1ebbf4325 authored by Jonathan Hseu<vomjom@vomjom.net>
Committed by GitHub<noreply@github.com>:
Add missing grpc dependency (#11828)
---
Commit 905abb1f9 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Test asserts should have `expected` first.
PiperOrigin-RevId: 163409348
---
Commit d5cc143e2 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Increase timeout to deflake the test.
PiperOrigin-RevId: 163407824
---
Commit ce1c7f02a authored by Eli Bendersky<eliben@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Properly include logging header in xla_internal_test_main
PiperOrigin-RevId: 163405986
---
Commit 22241cd42 authored by joetoth<joetoth@gmail.com>
Committed by Vijay Vasudevan<vrv@google.com>:
External leveldb link changed (#11833)
table_format.txt was renamed to table_format.md
---
Commit 6b7314de4 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Consolidating the code to fill the partition's function library
into one place. Previously, Partition() and MasterSession::RegisterPartition()
both fills in the partitioned graph's function library.
PiperOrigin-RevId: 163400992
---
Commit 28373cfe7 authored by Frank Chen<frankchn@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Adds preliminary support for Cloud TPUs with Cluster Resolvers. This aims to allow users to have a better experienec when specifying one or multiple Cloud TPUs for their training jobs by allowing users to use names rather than IP addresses.
PiperOrigin-RevId: 163393443
---
Commit e5353c941 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Don't prune nodes that have reference inputs.
PiperOrigin-RevId: 163390862
---
Commit 226510834 authored by Asim Shankar<ashankar@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
C API: Groundwork for experimenting with TF_Tensor in device memory.
TF_Tensor objects are always backed by host memory. This commit lays
the groundwork for allowing TF_Tensor objects to refer to tensor data
on device (e.g., GPU) memory.
PiperOrigin-RevId: 163388079
---
Commit 613bf1c7c authored by Yuefeng Zhou<yuefengz@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
fix asan test failure in SingleMachineTest::ReleaseMemoryAfterDestruction.
PiperOrigin-RevId: 163386941
---
Commit 4653d37a3 authored by Eli Bendersky<eliben@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Change type to appease GPU builds.
PiperOrigin-RevId: 163384927
---
Commit 9f131bd15 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change
PiperOrigin-RevId: 163378484
---
Commit 8bc0236c8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
PiperOrigin-RevId: 163366493
---
Commit 3b97f1f9b authored by Yangzihao Wang<yangzihao@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Change to only run one round of matmul benchmark.
PiperOrigin-RevId: 163364341
---
Commit a4a3a3335 authored by Yun Peng<pcloudy@google.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Fix ./configure on Windows (#11775)
* Fix ./configure on Windows
* Disable bitwise_ops_test on Windows
---
Commit ae3119d16 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Small changes to op framework.
PiperOrigin-RevId: 163361071
---
Commit f40189d26 authored by qjivy<ji.qiu@spreadtrum.com>
Committed by Vijay Vasudevan<vrv@google.com>:
PR again: Enable building label_image with jpeg/gif/png decoder for Android. (#11475)
* Enable building label_image with jpeg/gif/png decoder for Android.
Add dependency "android_tesnorflow_image_op" to label_image, which
is not overlapped with android_tensorflow_kernels.
* Running buildifier to reformat the BUILD files for
sanity check.
---
Commit 599165861 authored by KB Sriram<kbsriram@gmail.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Add the Constant operator class (#11559)
Create a custom operator class to create constants in the Graph,
and introduce the Operator marker annotation to identify
operator classes.
Please see #7149 for the master tracking issue.
---
Commit 86ca3506f authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Further BUILD cleanup
PiperOrigin-RevId: 163360750
---
Commit 376bb063b authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Look inside functions to see which node types are used.
PiperOrigin-RevId: 163360375
---
Commit 2139e7d8b authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] map expects a nested structure.
Fixes #11786
PiperOrigin-RevId: 163359134
---
Commit d09304fca authored by Jonathan Hseu<vomjom@vomjom.net>
Committed by Vijay Vasudevan<vrv@google.com>:
Upgrade gRPC (#11768)
* BUILD rule modifications
* More build fixes
* Code changes
* More code fixes
* Working tests
* CMake build
* Fix pprof
* Fix header includes
* CMake fix test
* Bazel clean
* Fix verbs
* More verbs fixes
* bazel clean for XLA
* Windows build fix test
* Add openssl/rand.h
* New cmake build command
* --config Release
---
Commit 3cd828474 authored by David Norman<DavidNorman@users.noreply.github.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Fix error with default python path selection (#11814)
* Fix error with default python path selection
* Move setting of environment var outside if / else
---
Commit ddd8e21b7 authored by Eli Bendersky<eliben@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Consolidate all similar main()s in tests into a single target.
PiperOrigin-RevId: 163354724
---
Commit a36bca25b authored by Tayo Oguntebi<tayo@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove ShapeWithoutPadding() utility function, as it is no longer needed.
PiperOrigin-RevId: 163353430
---
Commit b26f9cd44 authored by David Norman<DavidNorman@users.noreply.github.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Ensure that the multi-instruction fuse can take shared inputs (#11748)
* Ensure that the multi-instruction fuse can take shared inputs
Note that the fuse action only works when the shared input / constant
appears after all of its consumers in the list of instructions.
* Add a comment describing the test
---
Commit 34cbf161d authored by Jiri Simsa<jsimsa@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update Dataset API documentation.
PiperOrigin-RevId: 163349457
---
Commit 2381ce5c3 authored by Abdullah Alrasheed<a.rasheed@tc-sa.com>
Committed by Vijay Vasudevan<vrv@google.com>:
DOC: Fix typo. (#11813)
you could could be I/O bottlenecked.
TO:
you could be I/O bottlenecked.
---
Commit e4a5c5356 authored by Toby Boyd<tobyboyd@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
["Variable", "VariableV2", "VarHandleOp"] is the default for ps_ops=None
PiperOrigin-RevId: 163344629
---
Commit 722f6f361 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix TensorForest's saveable object names so loading a savedmodel works.
PiperOrigin-RevId: 163332598
---
Commit cda80a785 authored by Eric Liu<ioeric@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tpu profiler] Dump HLO graphs in profile responses to the log directory.
PiperOrigin-RevId: 163318992
---
Commit cea9ef6f5 authored by horance<horance-liu@users.noreply.github.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Refactoring device name utils (#11797)
* remove duplicated code for full_name and legacy_name for DeviceNameUtils
* replace tabs
* Real->Device
---
Commit 1f7c0f917 authored by Kongsea<kongsea@gmail.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Refine docstrings (#11800)
---
Commit dd1f0cddd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Supports lookup devices by fullname either in the canonical form or the
legacy form. This makes DeviceSet behaves the same as DeviceMgr's
FindDevice method.
PiperOrigin-RevId: 163300346
---
Commit 631a364cd authored by Kay Zhu<kayzhu@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Add Reduce, DynamicSlice and DynamicSliceUpdate to HloEvaluator.
- Reduce is disabled explicitly for constant folding, as not all types of
embedded computation can be currently supported by the evaluator.
- Added support to evaluate HloModule to HloEvaluator.
- Minor signature change to Evaluate().
PiperOrigin-RevId: 163299238
---
Commit a52470172 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Sets the incarnation number even when the attribute is set.
PiperOrigin-RevId: 163299121
---
Commit a49fe0366 authored by Suharsh Sivakumar<suharshs@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove platform bridge for grpc_response_reader.
PiperOrigin-RevId: 163295986
---
Commit 4404aa7cb authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Add TODO comment explaining why the IsScalar check exists.
PiperOrigin-RevId: 163292777
---
Commit 43036ac16 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove unnecessary break statements.
PiperOrigin-RevId: 163291947
---
Commit fd5de4690 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Add regression test for a corner case using Reduce that currently fails with the GPU backend.
PiperOrigin-RevId: 163287986
---
Commit 32e198f2d authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[TF:XLA] Add tf.cross support.
See #11788
PiperOrigin-RevId: 163287731
---
Commit 88abddbc3 authored by Alan Yee<alyee@ucsd.edu>
Committed by Vijay Vasudevan<vrv@google.com>:
Update README.md (#11793)
Remove bad practices of sudo pip and install use safer pip install commands
---
Commit 9b30dc3a8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove final mentions of `get_shape` in docstring.
PiperOrigin-RevId: 163282839
---
Commit 423c1eea0 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BREAKING CHANGE: Fix semantic error in how maybe_batch* handles sparse tensors.
PiperOrigin-RevId: 163276613
---
Commit 6028c071b authored by Justin Lebar<jlebar@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Highlight incoming/outgoing edges on hover in HLO graphviz dumps, and other improvements.
Other improvements:
- Don't show tooltips for nodes and clusters. Previously we'd show a
tooltip containing a pointer value expressed as decimal. Not so
useful.
- Show tooltips on edges with the to/from node names.
- Fix bug wherein if we had
- a node at the "edge" of the graph (so its operands aren't included
unless they're referenced by another node),
- with all of its operands included in the graph save one or more
constants, and
- those constants weren't referenced by any nodes not at the edge of
the graph,
we would incorrectly draw the node as "grayed out", indicating that
one of its operands (namely, its constant operand) wasn't present in
the graph.
This is wrong because constants are inlined into their users, so they
should always count as "displayed" for the purposes of determining
whether a node is grayed out.
PiperOrigin-RevId: 163276108
---
Commit ce7a355bd authored by Joshua V. Dillon<jvdillon@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update contrib/distributions/estimator_test build dependency.
PiperOrigin-RevId: 163272464
---
Commit 1b8458a1c authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Shorten docstring line.
PiperOrigin-RevId: 163269709
---
Commit 69e323cc6 authored by Asim Shankar<ashankar@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix comment ypo
PiperOrigin-RevId: 163266376
---
Commit 08790e73d authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Fix a bug in cloning outfeeds, carried the wrong shape.
PiperOrigin-RevId: 163265592
---
Commit 1bad826d6 authored by Yangzihao Wang<yangzihao@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Rollback of GPU kernel implementation of transpose for tensors with one small dimension.
END_PUBLIC
BEGIN_PUBLIC
BEGIN_PUBLIC
Automated g4 rollback of changelist 162525519
PiperOrigin-RevId: 163490703
2017-07-28 10:58:56 -07:00
|
|
|
python_lib_path = python_lib_paths[0]
|
2017-07-25 13:30:03 -07:00
|
|
|
else:
|
2017-08-25 14:01:05 -07:00
|
|
|
print('Found possible Python library paths:\n %s' %
|
|
|
|
|
'\n '.join(python_lib_paths))
|
2017-07-25 13:30:03 -07:00
|
|
|
default_python_lib_path = python_lib_paths[0]
|
|
|
|
|
python_lib_path = get_input(
|
2017-08-25 14:01:05 -07:00
|
|
|
'Please input the desired Python library path to use. '
|
|
|
|
|
'Default is [%s]\n' % python_lib_paths[0])
|
2017-07-25 13:30:03 -07:00
|
|
|
if not python_lib_path:
|
|
|
|
|
python_lib_path = default_python_lib_path
|
Merge changes from github.
END_PUBLIC
I dropped the following commit because it doesn't compile.
I will follow up with Andrew to fix it or revert it.
Commit 003deb88b authored by osdamv<osdamv@gmail.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Refactor and implementation of the camera API 1, it fixes #8736 (#10771)
List of commits in this CL:
---
Commit 446450369 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Use identity of param variable in cudnn_rnn.RNNParamsSaveable instead of parameter
variable directly. The RNNParamsSaveable is usually used in a graph which also
has a saver for the cudnn param variable itself, if the same op is used for
both, fails with a two savers for same op error.
PiperOrigin-RevId: 163431826
---
Commit d629a8316 authored by RJ Ryan<rjryan@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Increase bound on tf.contrib.signal.inverse_stft gradient error to avoid flakiness on macOS.
PiperOrigin-RevId: 163426631
---
Commit 253bcbb71 authored by Kay Zhu<kayzhu@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Use HloEvaluator for convolution in reference_util.
Also Speed up HloEvaluator's HandleConvolution in non-opt build, by moving calls
to HloInstruction::shape() out of the inner loop.
PiperOrigin-RevId: 163416183
---
Commit 569a00e68 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update API to traffic in unique_ptrs rather than owning raw pointers
PiperOrigin-RevId: 163414320
---
Commit 31a77bc77 authored by Asim Shankar<ashankar@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Java: Update release to 1.3.0-rc1
PiperOrigin-RevId: 163413736
---
Commit 1ebbf4325 authored by Jonathan Hseu<vomjom@vomjom.net>
Committed by GitHub<noreply@github.com>:
Add missing grpc dependency (#11828)
---
Commit 905abb1f9 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Test asserts should have `expected` first.
PiperOrigin-RevId: 163409348
---
Commit d5cc143e2 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Increase timeout to deflake the test.
PiperOrigin-RevId: 163407824
---
Commit ce1c7f02a authored by Eli Bendersky<eliben@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Properly include logging header in xla_internal_test_main
PiperOrigin-RevId: 163405986
---
Commit 22241cd42 authored by joetoth<joetoth@gmail.com>
Committed by Vijay Vasudevan<vrv@google.com>:
External leveldb link changed (#11833)
table_format.txt was renamed to table_format.md
---
Commit 6b7314de4 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Consolidating the code to fill the partition's function library
into one place. Previously, Partition() and MasterSession::RegisterPartition()
both fills in the partitioned graph's function library.
PiperOrigin-RevId: 163400992
---
Commit 28373cfe7 authored by Frank Chen<frankchn@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Adds preliminary support for Cloud TPUs with Cluster Resolvers. This aims to allow users to have a better experienec when specifying one or multiple Cloud TPUs for their training jobs by allowing users to use names rather than IP addresses.
PiperOrigin-RevId: 163393443
---
Commit e5353c941 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Don't prune nodes that have reference inputs.
PiperOrigin-RevId: 163390862
---
Commit 226510834 authored by Asim Shankar<ashankar@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
C API: Groundwork for experimenting with TF_Tensor in device memory.
TF_Tensor objects are always backed by host memory. This commit lays
the groundwork for allowing TF_Tensor objects to refer to tensor data
on device (e.g., GPU) memory.
PiperOrigin-RevId: 163388079
---
Commit 613bf1c7c authored by Yuefeng Zhou<yuefengz@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
fix asan test failure in SingleMachineTest::ReleaseMemoryAfterDestruction.
PiperOrigin-RevId: 163386941
---
Commit 4653d37a3 authored by Eli Bendersky<eliben@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Change type to appease GPU builds.
PiperOrigin-RevId: 163384927
---
Commit 9f131bd15 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change
PiperOrigin-RevId: 163378484
---
Commit 8bc0236c8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
PiperOrigin-RevId: 163366493
---
Commit 3b97f1f9b authored by Yangzihao Wang<yangzihao@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Change to only run one round of matmul benchmark.
PiperOrigin-RevId: 163364341
---
Commit a4a3a3335 authored by Yun Peng<pcloudy@google.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Fix ./configure on Windows (#11775)
* Fix ./configure on Windows
* Disable bitwise_ops_test on Windows
---
Commit ae3119d16 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Small changes to op framework.
PiperOrigin-RevId: 163361071
---
Commit f40189d26 authored by qjivy<ji.qiu@spreadtrum.com>
Committed by Vijay Vasudevan<vrv@google.com>:
PR again: Enable building label_image with jpeg/gif/png decoder for Android. (#11475)
* Enable building label_image with jpeg/gif/png decoder for Android.
Add dependency "android_tesnorflow_image_op" to label_image, which
is not overlapped with android_tensorflow_kernels.
* Running buildifier to reformat the BUILD files for
sanity check.
---
Commit 599165861 authored by KB Sriram<kbsriram@gmail.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Add the Constant operator class (#11559)
Create a custom operator class to create constants in the Graph,
and introduce the Operator marker annotation to identify
operator classes.
Please see #7149 for the master tracking issue.
---
Commit 86ca3506f authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Further BUILD cleanup
PiperOrigin-RevId: 163360750
---
Commit 376bb063b authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Look inside functions to see which node types are used.
PiperOrigin-RevId: 163360375
---
Commit 2139e7d8b authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] map expects a nested structure.
Fixes #11786
PiperOrigin-RevId: 163359134
---
Commit d09304fca authored by Jonathan Hseu<vomjom@vomjom.net>
Committed by Vijay Vasudevan<vrv@google.com>:
Upgrade gRPC (#11768)
* BUILD rule modifications
* More build fixes
* Code changes
* More code fixes
* Working tests
* CMake build
* Fix pprof
* Fix header includes
* CMake fix test
* Bazel clean
* Fix verbs
* More verbs fixes
* bazel clean for XLA
* Windows build fix test
* Add openssl/rand.h
* New cmake build command
* --config Release
---
Commit 3cd828474 authored by David Norman<DavidNorman@users.noreply.github.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Fix error with default python path selection (#11814)
* Fix error with default python path selection
* Move setting of environment var outside if / else
---
Commit ddd8e21b7 authored by Eli Bendersky<eliben@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Consolidate all similar main()s in tests into a single target.
PiperOrigin-RevId: 163354724
---
Commit a36bca25b authored by Tayo Oguntebi<tayo@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove ShapeWithoutPadding() utility function, as it is no longer needed.
PiperOrigin-RevId: 163353430
---
Commit b26f9cd44 authored by David Norman<DavidNorman@users.noreply.github.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Ensure that the multi-instruction fuse can take shared inputs (#11748)
* Ensure that the multi-instruction fuse can take shared inputs
Note that the fuse action only works when the shared input / constant
appears after all of its consumers in the list of instructions.
* Add a comment describing the test
---
Commit 34cbf161d authored by Jiri Simsa<jsimsa@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update Dataset API documentation.
PiperOrigin-RevId: 163349457
---
Commit 2381ce5c3 authored by Abdullah Alrasheed<a.rasheed@tc-sa.com>
Committed by Vijay Vasudevan<vrv@google.com>:
DOC: Fix typo. (#11813)
you could could be I/O bottlenecked.
TO:
you could be I/O bottlenecked.
---
Commit e4a5c5356 authored by Toby Boyd<tobyboyd@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
["Variable", "VariableV2", "VarHandleOp"] is the default for ps_ops=None
PiperOrigin-RevId: 163344629
---
Commit 722f6f361 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix TensorForest's saveable object names so loading a savedmodel works.
PiperOrigin-RevId: 163332598
---
Commit cda80a785 authored by Eric Liu<ioeric@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tpu profiler] Dump HLO graphs in profile responses to the log directory.
PiperOrigin-RevId: 163318992
---
Commit cea9ef6f5 authored by horance<horance-liu@users.noreply.github.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Refactoring device name utils (#11797)
* remove duplicated code for full_name and legacy_name for DeviceNameUtils
* replace tabs
* Real->Device
---
Commit 1f7c0f917 authored by Kongsea<kongsea@gmail.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Refine docstrings (#11800)
---
Commit dd1f0cddd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Supports lookup devices by fullname either in the canonical form or the
legacy form. This makes DeviceSet behaves the same as DeviceMgr's
FindDevice method.
PiperOrigin-RevId: 163300346
---
Commit 631a364cd authored by Kay Zhu<kayzhu@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Add Reduce, DynamicSlice and DynamicSliceUpdate to HloEvaluator.
- Reduce is disabled explicitly for constant folding, as not all types of
embedded computation can be currently supported by the evaluator.
- Added support to evaluate HloModule to HloEvaluator.
- Minor signature change to Evaluate().
PiperOrigin-RevId: 163299238
---
Commit a52470172 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Sets the incarnation number even when the attribute is set.
PiperOrigin-RevId: 163299121
---
Commit a49fe0366 authored by Suharsh Sivakumar<suharshs@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove platform bridge for grpc_response_reader.
PiperOrigin-RevId: 163295986
---
Commit 4404aa7cb authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Add TODO comment explaining why the IsScalar check exists.
PiperOrigin-RevId: 163292777
---
Commit 43036ac16 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove unnecessary break statements.
PiperOrigin-RevId: 163291947
---
Commit fd5de4690 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Add regression test for a corner case using Reduce that currently fails with the GPU backend.
PiperOrigin-RevId: 163287986
---
Commit 32e198f2d authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[TF:XLA] Add tf.cross support.
See #11788
PiperOrigin-RevId: 163287731
---
Commit 88abddbc3 authored by Alan Yee<alyee@ucsd.edu>
Committed by Vijay Vasudevan<vrv@google.com>:
Update README.md (#11793)
Remove bad practices of sudo pip and install use safer pip install commands
---
Commit 9b30dc3a8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove final mentions of `get_shape` in docstring.
PiperOrigin-RevId: 163282839
---
Commit 423c1eea0 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BREAKING CHANGE: Fix semantic error in how maybe_batch* handles sparse tensors.
PiperOrigin-RevId: 163276613
---
Commit 6028c071b authored by Justin Lebar<jlebar@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Highlight incoming/outgoing edges on hover in HLO graphviz dumps, and other improvements.
Other improvements:
- Don't show tooltips for nodes and clusters. Previously we'd show a
tooltip containing a pointer value expressed as decimal. Not so
useful.
- Show tooltips on edges with the to/from node names.
- Fix bug wherein if we had
- a node at the "edge" of the graph (so its operands aren't included
unless they're referenced by another node),
- with all of its operands included in the graph save one or more
constants, and
- those constants weren't referenced by any nodes not at the edge of
the graph,
we would incorrectly draw the node as "grayed out", indicating that
one of its operands (namely, its constant operand) wasn't present in
the graph.
This is wrong because constants are inlined into their users, so they
should always count as "displayed" for the purposes of determining
whether a node is grayed out.
PiperOrigin-RevId: 163276108
---
Commit ce7a355bd authored by Joshua V. Dillon<jvdillon@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update contrib/distributions/estimator_test build dependency.
PiperOrigin-RevId: 163272464
---
Commit 1b8458a1c authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Shorten docstring line.
PiperOrigin-RevId: 163269709
---
Commit 69e323cc6 authored by Asim Shankar<ashankar@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix comment ypo
PiperOrigin-RevId: 163266376
---
Commit 08790e73d authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Fix a bug in cloning outfeeds, carried the wrong shape.
PiperOrigin-RevId: 163265592
---
Commit 1bad826d6 authored by Yangzihao Wang<yangzihao@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Rollback of GPU kernel implementation of transpose for tensors with one small dimension.
END_PUBLIC
BEGIN_PUBLIC
BEGIN_PUBLIC
Automated g4 rollback of changelist 162525519
PiperOrigin-RevId: 163490703
2017-07-28 10:58:56 -07:00
|
|
|
environ_cp['PYTHON_LIB_PATH'] = python_lib_path
|
2017-07-25 13:30:03 -07:00
|
|
|
|
Merge changes from github.
END_PUBLIC
---
Commit 575bd01d4 authored by Vijay Vasudevan<vrv@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove /replica:0 declaration in device functions and allow them
to be freely bound based on cluster names present.
When more than one value matches, it will choose the first
lexicographically available device that matches the specification,
which in practice will do pretty much the same thing as hardcoding
/replica:0.
PiperOrigin-RevId: 165766815
---
Commit d685bbc54 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Benchmarks with backprop enabled (and removes overhead).
Before:
np.array([[3]]) took 1.50us (30000 iterations)
Tensor([[3]]) took 16.30us (30000 iterations)
MatMul [2, 2]: np.dot took 0.61us (30000 iterations)
MatMul [2, 2]: tf.matmul took 60.53us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 25.72us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.82us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 45.70us (30000 iterations)
MatMul [100, 784]: np.dot took 383.32us (1000 iterations)
MatMul [100, 784]: tf.matmul took 350.35us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 315.97us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 249.42us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 280.95us (1000 iterations)
If backprop is enabled:
np.array([[3]]) took 0.83us (30000 iterations)
Tensor([[3]]) took 15.21us (30000 iterations)
MatMul [2, 2]: np.dot took 0.63us (30000 iterations)
MatMul [2, 2]: tf.matmul took 76.31us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 38.66us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.31us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 51.96us (30000 iterations)
MatMul [100, 784]: np.dot took 378.34us (1000 iterations)
MatMul [100, 784]: tf.matmul took 352.09us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 364.28us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 350.68us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 377.19us (1000 iterations)
After:
np.array([[3]]) took 0.86us (30000 iterations)
Tensor([[3]]) took 15.19us (30000 iterations)
MatMul [2, 2]: np.dot took 0.60us (30000 iterations)
MatMul [2, 2]: tf.matmul took 64.51us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 28.34us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.38us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 48.50us (30000 iterations)
MatMul [100, 784]: np.dot took 475.27us (1000 iterations)
MatMul [100, 784]: tf.matmul took 399.50us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 307.80us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 272.83us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 350.06us (1000 iterations)
PiperOrigin-RevId: 165765641
---
Commit d902babbd authored by David Majnemer<majnemer@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Algebraic simplifier incorrectly transformed convolutions into bitcasts
PiperOrigin-RevId: 165765575
---
Commit 8e78e10ef authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
disable test temporarily
PiperOrigin-RevId: 165763204
---
Commit a271c37db authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Small improvements to the arithmetic optimizer
PiperOrigin-RevId: 165760972
---
Commit b6409594d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Convert some tests to cover both eager and graph.
PiperOrigin-RevId: 165760364
---
Commit 5ead76420 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Reduce XLA compile time by ~7% for a convolutional image model:
* Added CompactPointerSet<T>, which is optimized for set size <= 1.
* Changed expensive CHECKs to DCHECKS in buffer_assignment.cc
* Reserve space in DFS state array before starting DFS.
* Use unsigned arithmetic in DFS state maintenance.
* HloInstruction:
- Moved frequently used fields to start for better cache locality.
- Use InlinedVector instead of vector for operand array.
- Use InlinedVector instead of vector for DFS stack.
* Pre-compute "is array" and "is tuple" for LogicalBuffer.
* PointsToSet:
- Combine two ShapeTrees into one.
- Use CompactPointerSet instead of std::set to hold sources.
- Use CompactPointerSet instead of std::set to hold flattened buffers.
* ShapeTree: use unique_ptr instead of optional for shape storage
(reduces size and destruction overhead).
* Add proper const qualifiers to some FlatSet iterator methods.
Co-author=jeff
PiperOrigin-RevId: 165759117
---
Commit a0544b0b8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make TPU symbols more easily accessible from contrib.
PiperOrigin-RevId: 165753322
---
Commit cdc08afbb authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Slightly relax numeric tolerance for sinlge precision tests of matrix_solve_ls (and tighten it for double precision).
PiperOrigin-RevId: 165750936
---
Commit eebcc861a authored by Jianwei Xie<xiejw@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed the race condition between multi eval step increments.
PiperOrigin-RevId: 165750595
---
Commit bbc0b8471 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 165748384
---
Commit 65f87c967 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Change device string in RecvNodeDescriptor in VirtualScheduler from const
reference to const as the RecvNodeDescriptor (and cached_recv_nodes map)
outlives device string from the NodeDef.
PiperOrigin-RevId: 165748244
---
Commit 57b0276cf authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165747467
---
Commit 64e54423b authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix nested dictionary handling in dataset elements.
Backports recent changes to the core version of the nest.py library.
Fixes #12372.
PiperOrigin-RevId: 165746517
---
Commit 378463ae8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make tf.eye accept Python integer shapes and avoid generating unnecessary shape handling ops.
Clean up test and add tests with placeholders.
PiperOrigin-RevId: 165746090
---
Commit 109ecf823 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add support for complex in matrix_solve_ls_op.
Split into separate files for each data type to speed up build.
PiperOrigin-RevId: 165744539
---
Commit 51441302d authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change.
PiperOrigin-RevId: 165737455
---
Commit d0cb32c2a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Docstring for ResourceVariable.
PiperOrigin-RevId: 165735441
---
Commit 32f4c5b6e authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Add IsFinite op in tf2xla.
PiperOrigin-RevId: 165734702
---
Commit 5f5c3eb0a authored by Mark Daoust<markdaoust@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Move "supervisor.md" from programmer's guide to api_guides.
PiperOrigin-RevId: 165732026
---
Commit d001b58de authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix handling of multi-output tf.py_func() in Dataset.map().
If the `map_func` returns a list of tensors, the current code will
attempt to stack it into a single tensor and raise an unintuitive
error. Some multi-output ops (such as `tf.py_func()`) return lists of
typically-not-stackable tensors. This change treats lists returned
from `map_func` as tuples; users who were relying on this
auto-stacking behavior should manually call `tf.stack()` (or
`tf.convert_to_tensor()`) on the list being returned.
Fixes #12396.
PiperOrigin-RevId: 165731970
---
Commit e6c60fb36 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix flakyness, sometimes the op takes ms to run.
PiperOrigin-RevId: 165728705
---
Commit 360bff8ae authored by Ali Yahya<alive@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Makes tape.watch() work with ResourceVariables.
To this end, also adds a property, `device`, to TensorNode.
PiperOrigin-RevId: 165726368
---
Commit 80bd004cd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implements SVDF model for keyword spotting tutorial.
PiperOrigin-RevId: 165725938
---
Commit aaabf6b90 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix bug: Using a ComputationDataHandle from the wrong ComputationBuilder.
PiperOrigin-RevId: 165724017
---
Commit 107d165d9 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Use 2-arg TraceMe constructor to prevent unnecessary StrCat computation when
tracing is disabled.
PiperOrigin-RevId: 165722280
---
Commit 7d01f89cc authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Android demo app for speech recognition
PiperOrigin-RevId: 165714459
---
Commit a6729325a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Deletes convert_n_to_eager_tensor. Moves convert_to_eager_tensor to constant_op.
PiperOrigin-RevId: 165704074
---
Commit 573b303ac authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BUILD cleanup in tensorflow/core/kernels
PiperOrigin-RevId: 165688864
---
Commit 711be6adc authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
`Dataset.from_generator()` constructs a dataset from a Python generator.
With this change, it becomes possible to use a Python generator as the source
dataset for a `tf.contrib.data` input pipeline. This enables easier integration
with non-TensorFlow data sources. The generator can yield a nested structure of
NumPy arrays, or values convertible to NumPy arrays.
This addresses a concern raised in issue #7951.
PiperOrigin-RevId: 165663857
---
Commit 00594ecdd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
New landing page and leftnav for Programmer's Guide.
PiperOrigin-RevId: 165660897
---
Commit 7359fec79 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implement Batchnorm Inference by expanding them into smaller ops.
1. Add batch norm inference support in batchnorm_rewriter
2. Connect xla's batchnorm inference to tf's FusedBatchNorm
RELNOTES: n/a
PiperOrigin-RevId: 165655351
---
Commit f0da8bf56 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[Rematerialization] Reconsider to remat operations with control dependencies
We added a conservartive logic to not rematerialize operations with control dependencies since the rematerialized operations could result in undesired ordering. However, we now realize that when we remat an operation, we also copy the dependencies of them, which guarantees the rematerialized operation has the same constraint as the original operation.
PiperOrigin-RevId: 165654629
---
Commit a1225879c authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Propagate error code in computation replay tool.
PiperOrigin-RevId: 165654497
---
Commit 513def0bb authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed BuildOpInfoWithoutDevice
PiperOrigin-RevId: 165653933
---
Commit d7e425f0b authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix linear algebra benchmarks.
PiperOrigin-RevId: 165653891
---
Commit 465c40819 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix the shape information propagation for Enter op.
PiperOrigin-RevId: 165653579
---
Commit c0198fd8d authored by Derek Murray<derek.murray@gmail.com>
Committed by gunan<gunan@google.com>:
[CMake] Add missing dependencies on boosted_trees protos and other fixes (#12315)
* [CMake] Add missing dependencies
* Avoid rebuilding boosted_trees protos for Python.
* Add GPU implementation ZeroInitializerOp to the CMake build.
---
Commit 641943fd7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165652758
---
Commit e31346452 authored by Jonathan Hseu<jhseu@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
TPUEstimator: Fix the outfeed thread join.
PiperOrigin-RevId: 165651781
---
Commit 565a9d350 authored by Vijay Vasudevan<vrv@google.com>
Committed by Andrew Harp<andrewharp@users.noreply.github.com>:
Add missing 'type' keyword to ArgumentParser add_argument (#12275)
Fixes #12210
---
Commit 19a55725a authored by Rohan Jain<rohanj@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Allowing functions to run across devices. This change expands the ProcessFunctionLibraryRuntime library to Instantiate and Run functions on different devices. When a FunctionLibraryRuntime encounters a function with a target that is another device, it delegates Instantiate() and Run() calls to the ProcessFunctionLibraryRuntime.
This change also moves the table_ containing all function instantiations to the PFLR instead of the FunctionLibraryRuntime.
PiperOrigin-RevId: 165651194
---
Commit 8c0853db7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a test for negative and zero pow() input.
PiperOrigin-RevId: 165650096
---
Commit a3c4e980e authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed input shape for freezing audio graphs
PiperOrigin-RevId: 165649546
---
Commit 9b9e5989d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a call_logit_fn utility for logit_fn's, similar to Estimator's _call_model_fn.
PiperOrigin-RevId: 165649388
---
Commit 4ff1f4442 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove the script as well if building tf_nightly.
---
Commit 373d78987 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Adding the break.
---
Commit 0139ac983 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove tensorboard as a required package if we are building tf_nightly.
---
Commit a92bd5d5c authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BEGIN_PUBLIC
Automated g4 rollback of changelist 165630063
PiperOrigin-RevId: 165957821
2017-08-21 12:10:44 -07:00
|
|
|
python_major_version = get_python_major_version(python_bin_path)
|
|
|
|
|
|
2017-07-25 13:30:03 -07:00
|
|
|
# Convert python path to Windows style before writing into bazel.rc
|
2017-09-02 19:21:45 -07:00
|
|
|
if is_windows() or is_cygwin():
|
2017-07-25 13:30:03 -07:00
|
|
|
python_lib_path = cygpath(python_lib_path)
|
|
|
|
|
|
|
|
|
|
# Set-up env variables used by python_configure.bzl
|
|
|
|
|
write_action_env_to_bazelrc('PYTHON_BIN_PATH', python_bin_path)
|
|
|
|
|
write_action_env_to_bazelrc('PYTHON_LIB_PATH', python_lib_path)
|
2017-09-19 18:36:26 -07:00
|
|
|
write_to_bazelrc('build --python_path=\"%s"' % python_bin_path)
|
2017-07-25 13:30:03 -07:00
|
|
|
environ_cp['PYTHON_BIN_PATH'] = python_bin_path
|
|
|
|
|
|
|
|
|
|
# Write tools/python_bin_path.sh
|
2018-03-12 19:33:52 -07:00
|
|
|
with open(os.path.join(
|
|
|
|
|
_TF_WORKSPACE_ROOT, 'tools', 'python_bin_path.sh'), 'w') as f:
|
2017-07-25 13:30:03 -07:00
|
|
|
f.write('export PYTHON_BIN_PATH="%s"' % python_bin_path)
|
|
|
|
|
|
|
|
|
|
|
2018-03-12 19:33:52 -07:00
|
|
|
def reset_tf_configure_bazelrc(workspace_path):
|
2017-07-25 13:30:03 -07:00
|
|
|
"""Reset file that contains customized config settings."""
|
|
|
|
|
open(_TF_BAZELRC, 'w').close()
|
2018-03-12 19:33:52 -07:00
|
|
|
bazelrc_path = os.path.join(workspace_path, '.bazelrc')
|
|
|
|
|
|
|
|
|
|
data = []
|
|
|
|
|
if os.path.exists(bazelrc_path):
|
|
|
|
|
with open(bazelrc_path, 'r') as f:
|
|
|
|
|
data = f.read().splitlines()
|
|
|
|
|
with open(bazelrc_path, 'w') as f:
|
|
|
|
|
for l in data:
|
|
|
|
|
if _TF_BAZELRC_FILENAME in l:
|
|
|
|
|
continue
|
|
|
|
|
f.write('%s\n' % l)
|
|
|
|
|
if is_windows():
|
|
|
|
|
tf_bazelrc_path = _TF_BAZELRC.replace("\\", "/")
|
2017-07-25 13:30:03 -07:00
|
|
|
else:
|
2018-03-12 19:33:52 -07:00
|
|
|
tf_bazelrc_path = _TF_BAZELRC
|
|
|
|
|
f.write('import %s\n' % tf_bazelrc_path)
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def cleanup_makefile():
|
|
|
|
|
"""Delete any leftover BUILD files from the Makefile build.
|
|
|
|
|
|
|
|
|
|
These files could interfere with Bazel parsing.
|
|
|
|
|
"""
|
2018-03-12 19:33:52 -07:00
|
|
|
makefile_download_dir = os.path.join(
|
|
|
|
|
_TF_WORKSPACE_ROOT, 'tensorflow', 'contrib', 'makefile', 'downloads')
|
2017-07-25 13:30:03 -07:00
|
|
|
if os.path.isdir(makefile_download_dir):
|
|
|
|
|
for root, _, filenames in os.walk(makefile_download_dir):
|
|
|
|
|
for f in filenames:
|
|
|
|
|
if f.endswith('BUILD'):
|
|
|
|
|
os.remove(os.path.join(root, f))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_var(environ_cp,
|
|
|
|
|
var_name,
|
|
|
|
|
query_item,
|
|
|
|
|
enabled_by_default,
|
|
|
|
|
question=None,
|
|
|
|
|
yes_reply=None,
|
|
|
|
|
no_reply=None):
|
|
|
|
|
"""Get boolean input from user.
|
|
|
|
|
|
|
|
|
|
If var_name is not set in env, ask user to enable query_item or not. If the
|
|
|
|
|
response is empty, use the default.
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
environ_cp: copy of the os.environ.
|
|
|
|
|
var_name: string for name of environment variable, e.g. "TF_NEED_HDFS".
|
|
|
|
|
query_item: string for feature related to the variable, e.g. "Hadoop File
|
|
|
|
|
System".
|
|
|
|
|
enabled_by_default: boolean for default behavior.
|
|
|
|
|
question: optional string for how to ask for user input.
|
2018-02-07 14:36:00 -08:00
|
|
|
yes_reply: optional string for reply when feature is enabled.
|
2017-07-25 13:30:03 -07:00
|
|
|
no_reply: optional string for reply when feature is disabled.
|
|
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
boolean value of the variable.
|
2018-01-10 11:36:52 -08:00
|
|
|
|
|
|
|
|
Raises:
|
|
|
|
|
UserInputError: if an environment variable is set, but it cannot be
|
|
|
|
|
interpreted as a boolean indicator, assume that the user has made a
|
|
|
|
|
scripting error, and will continue to provide invalid input.
|
|
|
|
|
Raise the error to avoid infinitely looping.
|
2017-07-25 13:30:03 -07:00
|
|
|
"""
|
|
|
|
|
if not question:
|
|
|
|
|
question = 'Do you wish to build TensorFlow with %s support?' % query_item
|
|
|
|
|
if not yes_reply:
|
|
|
|
|
yes_reply = '%s support will be enabled for TensorFlow.' % query_item
|
|
|
|
|
if not no_reply:
|
|
|
|
|
no_reply = 'No %s' % yes_reply
|
|
|
|
|
|
|
|
|
|
yes_reply += '\n'
|
|
|
|
|
no_reply += '\n'
|
|
|
|
|
|
|
|
|
|
if enabled_by_default:
|
|
|
|
|
question += ' [Y/n]: '
|
|
|
|
|
else:
|
|
|
|
|
question += ' [y/N]: '
|
|
|
|
|
|
|
|
|
|
var = environ_cp.get(var_name)
|
2018-01-10 11:36:52 -08:00
|
|
|
if var is not None:
|
|
|
|
|
var_content = var.strip().lower()
|
|
|
|
|
true_strings = ('1', 't', 'true', 'y', 'yes')
|
|
|
|
|
false_strings = ('0', 'f', 'false', 'n', 'no')
|
|
|
|
|
if var_content in true_strings:
|
|
|
|
|
var = True
|
|
|
|
|
elif var_content in false_strings:
|
|
|
|
|
var = False
|
|
|
|
|
else:
|
|
|
|
|
raise UserInputError(
|
|
|
|
|
'Environment variable %s must be set as a boolean indicator.\n'
|
|
|
|
|
'The following are accepted as TRUE : %s.\n'
|
|
|
|
|
'The following are accepted as FALSE: %s.\n'
|
|
|
|
|
'Current value is %s.' % (
|
|
|
|
|
var_name, ', '.join(true_strings), ', '.join(false_strings),
|
|
|
|
|
var))
|
|
|
|
|
|
2017-07-25 13:30:03 -07:00
|
|
|
while var is None:
|
|
|
|
|
user_input_origin = get_input(question)
|
|
|
|
|
user_input = user_input_origin.strip().lower()
|
|
|
|
|
if user_input == 'y':
|
|
|
|
|
print(yes_reply)
|
|
|
|
|
var = True
|
|
|
|
|
elif user_input == 'n':
|
|
|
|
|
print(no_reply)
|
|
|
|
|
var = False
|
|
|
|
|
elif not user_input:
|
|
|
|
|
if enabled_by_default:
|
|
|
|
|
print(yes_reply)
|
|
|
|
|
var = True
|
|
|
|
|
else:
|
|
|
|
|
print(no_reply)
|
|
|
|
|
var = False
|
|
|
|
|
else:
|
|
|
|
|
print('Invalid selection: %s' % user_input_origin)
|
|
|
|
|
return var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def set_build_var(environ_cp, var_name, query_item, option_name,
|
2017-09-14 13:35:57 -07:00
|
|
|
enabled_by_default, bazel_config_name=None):
|
2017-07-25 13:30:03 -07:00
|
|
|
"""Set if query_item will be enabled for the build.
|
|
|
|
|
|
|
|
|
|
Ask user if query_item will be enabled. Default is used if no input is given.
|
|
|
|
|
Set subprocess environment variable and write to .bazelrc if enabled.
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
environ_cp: copy of the os.environ.
|
|
|
|
|
var_name: string for name of environment variable, e.g. "TF_NEED_HDFS".
|
|
|
|
|
query_item: string for feature related to the variable, e.g. "Hadoop File
|
|
|
|
|
System".
|
|
|
|
|
option_name: string for option to define in .bazelrc.
|
|
|
|
|
enabled_by_default: boolean for default behavior.
|
2017-09-14 13:35:57 -07:00
|
|
|
bazel_config_name: Name for Bazel --config argument to enable build feature.
|
2017-07-25 13:30:03 -07:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
var = str(int(get_var(environ_cp, var_name, query_item, enabled_by_default)))
|
|
|
|
|
environ_cp[var_name] = var
|
|
|
|
|
if var == '1':
|
|
|
|
|
write_to_bazelrc('build --define %s=true' % option_name)
|
2017-09-14 13:35:57 -07:00
|
|
|
elif bazel_config_name is not None:
|
|
|
|
|
# TODO(mikecase): Migrate all users of configure.py to use --config Bazel
|
|
|
|
|
# options and not to set build configs through environment variables.
|
|
|
|
|
write_to_bazelrc('build:%s --define %s=true'
|
|
|
|
|
% (bazel_config_name, option_name))
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def set_action_env_var(environ_cp,
|
|
|
|
|
var_name,
|
|
|
|
|
query_item,
|
|
|
|
|
enabled_by_default,
|
|
|
|
|
question=None,
|
|
|
|
|
yes_reply=None,
|
|
|
|
|
no_reply=None):
|
|
|
|
|
"""Set boolean action_env variable.
|
|
|
|
|
|
|
|
|
|
Ask user if query_item will be enabled. Default is used if no input is given.
|
|
|
|
|
Set environment variable and write to .bazelrc.
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
environ_cp: copy of the os.environ.
|
|
|
|
|
var_name: string for name of environment variable, e.g. "TF_NEED_HDFS".
|
|
|
|
|
query_item: string for feature related to the variable, e.g. "Hadoop File
|
|
|
|
|
System".
|
|
|
|
|
enabled_by_default: boolean for default behavior.
|
|
|
|
|
question: optional string for how to ask for user input.
|
2018-02-07 14:36:00 -08:00
|
|
|
yes_reply: optional string for reply when feature is enabled.
|
2017-07-25 13:30:03 -07:00
|
|
|
no_reply: optional string for reply when feature is disabled.
|
|
|
|
|
"""
|
|
|
|
|
var = int(
|
|
|
|
|
get_var(environ_cp, var_name, query_item, enabled_by_default, question,
|
|
|
|
|
yes_reply, no_reply))
|
|
|
|
|
|
|
|
|
|
write_action_env_to_bazelrc(var_name, var)
|
|
|
|
|
environ_cp[var_name] = str(var)
|
|
|
|
|
|
|
|
|
|
|
2017-08-04 00:52:34 -07:00
|
|
|
def convert_version_to_int(version):
|
|
|
|
|
"""Convert a version number to a integer that can be used to compare.
|
|
|
|
|
|
Merge changes from github.
END_PUBLIC
---
Commit 9f81374c3 authored by raymondxyang<zihao.yang@microsoft.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Add option for build more python tests in Cmake (#11853)
* Ignore Windows built project
* Fix deprecated methods in tf.contrib.python
* Fix regex match for Windows build in contrib.keras
* Fix Regex match for Windows build in session_bundle
* * Fix deprecated methods
* Fix regex match for Windows
* Fix compatibility issue with Python 3.x
* Add missing ops into Windows build for test
* Enabled more testcases for Windows build
* Clean code and fix typo
* Add conditional cmake mode for enabling more unit testcase
* Add Cmake mode for major Contrib packages
* Add supplementary info in RAEDME for new cmake option
* * Update tf_tests after testing with TF 1.3
* Clean code and resolve conflicts
* Fix unsafe regex matches and format code
* Update exclude list after testing with latest master branch
* Fix missing module
---
Commit 98f0e1efe authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Dynamic ksize and strides with MaxPool (#11875)
* Dynamic ksize with max_pool
This fix tries to fix the issue raised in 4746 where ksize
is static (attr) with max_pool.
This fix changes ksize to input tensor so that it is dynamic now.
This fix fixes 4746.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add dynamic ksize to MaxPoolGrad and MaxPoolGradGrad
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test cases for max_pool_v2
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix GPU Jenkins issue.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Enable MaxPoolV2 in GPU
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Hide MaxPoolV2 and other fixes.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit 02d6bc185 authored by Bairen Yi<byronyi@users.noreply.github.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
remove useless variable (#12212)
---
Commit ed6b0d905 authored by namrata-ibm<bhavenamrata@gmail.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Adding support for s390x in calculation of cpu_frequency (#12201)
---
Commit 627dfc9dd authored by Taehoon Lee<taehoonlee@snu.ac.kr>
Committed by Taehoon Lee<taehoonlee@snu.ac.kr>:
Fix typos
---
Commit c0f9b0a91 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
In fast-math mode emit a tanh that has a faster min/max.
PiperOrigin-RevId: 164943597
---
Commit 87605f3d6 authored by Kay Zhu<kayzhu@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[TF:XLA] Use HloEvaluator for ComputeConstant, remove the need of a dedicated
compute constant backend.
PiperOrigin-RevId: 164940970
---
Commit 881de45c2 authored by Taehoon Lee<me@taehoonlee.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Add bool type supports for GPU kernels (#11927)
* Add bool type supports for GPU kernels
* Add bool type test codes for GPU kernels
---
Commit eeacdcdb1 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add missing "CPU" suffix in registrations.
PiperOrigin-RevId: 164939527
---
Commit de01be952 authored by namrata-ibm<bhavenamrata@gmail.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Adding support for Big Endian in graph_constructor_test and wav_io (#12179)
---
Commit 26719d29f authored by QingYing Chen<pkudysj@126.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Implement CRF decode (Viterbi decode) for tensor (#12056)
* Implement CRF decoding for tensors
* add test code for tensor version's CRF decoding
* made modifications according to pylint
* add some comments for crf decode
* remove useless code
* add comments at the top comment of crf module and add more comments in crf_test
* capitalize first char of first word in comments
* replace crf_decode test code with a deterministic example
---
Commit f9a81ca2f authored by Pete Warden<pete@petewarden.com>
Committed by gunan<gunan@google.com>:
Create CI build script for Raspberry Pi (#12190)
* Create CI build script for Raspberry Pi
* Moved location of Pi build script
---
Commit e2a163a90 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Merge code from PR #11940 with internal changes from cl/164796436, and update Python tests to also run on GPU.
PiperOrigin-RevId: 164929133
---
Commit 08bbfa187 authored by Taehoon Lee<me@taehoonlee.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Fix typos (#12195)
---
Commit ab96f41fb authored by Luke Iwanski<luke@codeplay.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
[OpenCL] Extends matmul_benchmark.py to cover SYCL (#11697)
* [OpenCL] Extends matmul_benchmark.py to cover SYCL
* Fixed typo
* /gpu:0 -> /device:GPU:0
* Fixes control_flow_ops_py_test
* /gpu: -> /device:GPU:
* Fixes //tensorflow/python/profiler/internal:run_metadata_test
* gpu: -> GPU:
* Fixes tfprof_node
* [OpenCL] Fixes device path to name with many colons (#123)
The device path is constructed from a device name by replacing all
colons with underscores. Some device names contain more than one colon,
for example 'device:SYCL:0' which gives a path 'device_SYCL_0'. The
previous code would not convert this back to the original device name,
but rather to 'device:SYCL_0'.
An alternative fix would be to convert all underscores to colons in the
device name (i.e. remove the restriction inside `replace("_", ":", 1)`),
however I'm not sure if there are any device names which contain
underscores.
* If no gpu device aviable fake one
* gpu: -> device:GPU
* Fixes profiler test
* /gpu:x -> /device:GPU:x
* Fixes debug_io_utils_test.cc test
* Fixes device_name_utils_test.cc
---
Commit 35e7a3665 authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Remove unneeded casting of int64 for reverse_sequence (#12192)
This fix remove unneeded cast of int64 for reverse_sequence:
```
lengths = math_ops.to_int64(lengths)
```
as int32 has already been enabled for reverse_sequence.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit 9fba8c185 authored by Anna R<annarev@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add benchmark dashboard link to benchmarks doc. Also, I added a link and
description for Benchmarks page to Community index page.
PiperOrigin-RevId: 164924906
---
Commit bb6f32fa7 authored by Mark Heffernan<meheff@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make HloAliasAnalysis updatable after changes to the HLO graph.
As part of this change make HloAliasAnalysis a thinner layer which
basically only holds a map from HloValue to HloBuffer and vice versa.
PiperOrigin-RevId: 164923041
---
Commit 9103096c1 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by Thomas K?ppe<tkoeppe@google.com>:
Merged commit includes the following changes:
164923041 by meheff:
Make HloAliasAnalysis updatable after changes to the HLO graph.
As part of this change make HloAliasAnalysis a thinner layer which
basically only holds a map from HloValue to HloBuffer and vice versa.
--
PiperOrigin-RevId: 164923041
---
Commit 822603aed authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Merging sibling fusion instruction using multi_output_fusion
PiperOrigin-RevId: 164920220
---
Commit c035aa2a8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 164917891
---
Commit e1e81d9ba authored by Luke Iwanski<luke@codeplay.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
[OpenCL] Fixes double memcpy bug (#151) (#12173)
* [OpenCL] Fixes double memcpy bug (#151)
As the debg CopyOp is called on a Tensor without type, we need to use
the DataType enum to get type information, and use this to pass the type
on to Eigen. This is a workaround Eigen's need to have a type when
calling memcpy. If the Eigen memcpy can be provided without a type
requirement, then the memcpy in sycl_util is unnecessary.
* Acts on feedback from: #12173/files/32cb12a9001b672425867b5a3110fd98e737a20b#r132496277
---
Commit d9ca2d86d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change
PiperOrigin-RevId: 164916465
---
Commit b8d13d218 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove more parts of DCASGD missed in the first pass. (47949b)
PiperOrigin-RevId: 164914552
---
Commit 73b3d52c7 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
cmake fix
PiperOrigin-RevId: 164911656
---
Commit 2173b5b0a authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Allow TFE_TensorHandleCopyToDevice to have the same device as src and
destination. It will reuse the same underlying buffer in those cases.
PiperOrigin-RevId: 164909906
---
Commit 13eb3b90e authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Experimental C and Python APIs to invoke TensorFlow kernels on concrete values.
PiperOrigin-RevId: 164902588
---
Commit 7dfabcc01 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Initialize ExecutionOptions in ComputeConstant to default values.
PiperOrigin-RevId: 164894867
---
Commit c8897e9bc authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Static required time computation
PiperOrigin-RevId: 164894645
---
Commit 076158f9b authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Enable implicit->explicit conversion by default.
PiperOrigin-RevId: 164890915
---
Commit 58c4a4cb1 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Bugfix: number of input channels is not necessarily in the last dimension, after introduction of data_format param.
PiperOrigin-RevId: 164889729
---
Commit 8f9b1af8a authored by Igor Saprykin<isaprykin@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Recover MonitoredSession when the Coordinator is requested to stop with one of the _PREEMPTION_ERRORS.
When SyncReplicasOptimizer is used, a preemption in the Coordinator may result in two cases:
Case 1) the session gets silently marked as complete
Case 2) the session gets stuck
This CL aims to solve and verify solutions for both of these problems. Fix 1 changes the should_stop logic. Fix 2 changes the CoordinatedSession.run() logic.
SyncReplicasOptimizer runs a separate set of threads using a Coordinator instance. Those threads do FIFOQueue.enqueue; the main thread does a blocking FIFOQueue.dequeue.
`sync_token_q` FIFOQueue is on parameter-servers. When one of the PS instances gets preempted, an AbortedError causes the Coordinator to stop via request_stop(ex). That by itself changes the state of MonitoredSession.should_stop() to True (Fix 1).
Results of the blocking Dequeue operation are sent to the chief worker via Recv. What happens next depends on the amount of tokens in `sync_token_q`. If there are enough for the next call to Dequeue to return, then the low-level "tf session run() call" returns. The next iteration of the `while not MonitoredSession.should_stop()` loop decides that the training is complete (Case 1).
If there are not enough tokens in `sync_token_q`, then the blocking Dequeue is going to keep waiting for them. This results in the graph execution getting stuck and the whole session getting garbage collected after 10 minutes (Case 2).
We decided to fix that by re-creating a session after it gets garbage collected (Fix 2). An alternative was to try to cancel the pending Dequeue operation, but it's not clear that it is the right thing to do and it is also not easy.
PiperOrigin-RevId: 164888390
---
Commit 46e4de6e5 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Undo loop fusion changes for now as they seem to be altering a few results.
END_PUBLIC
RELNOTES: n/a
BEGIN_PUBLIC
BEGIN_PUBLIC
Automated g4 rollback of changelist 164825735
PiperOrigin-RevId: 165340331
2017-08-15 12:08:29 -07:00
|
|
|
Version strings of the form X.YZ and X.Y.Z-xxxxx are supported. The
|
|
|
|
|
'xxxxx' part, for instance 'homebrew' on OS/X, is ignored.
|
|
|
|
|
|
2017-08-04 00:52:34 -07:00
|
|
|
Args:
|
Merge changes from github.
END_PUBLIC
---
Commit 9f81374c3 authored by raymondxyang<zihao.yang@microsoft.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Add option for build more python tests in Cmake (#11853)
* Ignore Windows built project
* Fix deprecated methods in tf.contrib.python
* Fix regex match for Windows build in contrib.keras
* Fix Regex match for Windows build in session_bundle
* * Fix deprecated methods
* Fix regex match for Windows
* Fix compatibility issue with Python 3.x
* Add missing ops into Windows build for test
* Enabled more testcases for Windows build
* Clean code and fix typo
* Add conditional cmake mode for enabling more unit testcase
* Add Cmake mode for major Contrib packages
* Add supplementary info in RAEDME for new cmake option
* * Update tf_tests after testing with TF 1.3
* Clean code and resolve conflicts
* Fix unsafe regex matches and format code
* Update exclude list after testing with latest master branch
* Fix missing module
---
Commit 98f0e1efe authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Dynamic ksize and strides with MaxPool (#11875)
* Dynamic ksize with max_pool
This fix tries to fix the issue raised in 4746 where ksize
is static (attr) with max_pool.
This fix changes ksize to input tensor so that it is dynamic now.
This fix fixes 4746.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add dynamic ksize to MaxPoolGrad and MaxPoolGradGrad
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test cases for max_pool_v2
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix GPU Jenkins issue.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Enable MaxPoolV2 in GPU
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Hide MaxPoolV2 and other fixes.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit 02d6bc185 authored by Bairen Yi<byronyi@users.noreply.github.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
remove useless variable (#12212)
---
Commit ed6b0d905 authored by namrata-ibm<bhavenamrata@gmail.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Adding support for s390x in calculation of cpu_frequency (#12201)
---
Commit 627dfc9dd authored by Taehoon Lee<taehoonlee@snu.ac.kr>
Committed by Taehoon Lee<taehoonlee@snu.ac.kr>:
Fix typos
---
Commit c0f9b0a91 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
In fast-math mode emit a tanh that has a faster min/max.
PiperOrigin-RevId: 164943597
---
Commit 87605f3d6 authored by Kay Zhu<kayzhu@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[TF:XLA] Use HloEvaluator for ComputeConstant, remove the need of a dedicated
compute constant backend.
PiperOrigin-RevId: 164940970
---
Commit 881de45c2 authored by Taehoon Lee<me@taehoonlee.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Add bool type supports for GPU kernels (#11927)
* Add bool type supports for GPU kernels
* Add bool type test codes for GPU kernels
---
Commit eeacdcdb1 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add missing "CPU" suffix in registrations.
PiperOrigin-RevId: 164939527
---
Commit de01be952 authored by namrata-ibm<bhavenamrata@gmail.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Adding support for Big Endian in graph_constructor_test and wav_io (#12179)
---
Commit 26719d29f authored by QingYing Chen<pkudysj@126.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Implement CRF decode (Viterbi decode) for tensor (#12056)
* Implement CRF decoding for tensors
* add test code for tensor version's CRF decoding
* made modifications according to pylint
* add some comments for crf decode
* remove useless code
* add comments at the top comment of crf module and add more comments in crf_test
* capitalize first char of first word in comments
* replace crf_decode test code with a deterministic example
---
Commit f9a81ca2f authored by Pete Warden<pete@petewarden.com>
Committed by gunan<gunan@google.com>:
Create CI build script for Raspberry Pi (#12190)
* Create CI build script for Raspberry Pi
* Moved location of Pi build script
---
Commit e2a163a90 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Merge code from PR #11940 with internal changes from cl/164796436, and update Python tests to also run on GPU.
PiperOrigin-RevId: 164929133
---
Commit 08bbfa187 authored by Taehoon Lee<me@taehoonlee.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Fix typos (#12195)
---
Commit ab96f41fb authored by Luke Iwanski<luke@codeplay.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
[OpenCL] Extends matmul_benchmark.py to cover SYCL (#11697)
* [OpenCL] Extends matmul_benchmark.py to cover SYCL
* Fixed typo
* /gpu:0 -> /device:GPU:0
* Fixes control_flow_ops_py_test
* /gpu: -> /device:GPU:
* Fixes //tensorflow/python/profiler/internal:run_metadata_test
* gpu: -> GPU:
* Fixes tfprof_node
* [OpenCL] Fixes device path to name with many colons (#123)
The device path is constructed from a device name by replacing all
colons with underscores. Some device names contain more than one colon,
for example 'device:SYCL:0' which gives a path 'device_SYCL_0'. The
previous code would not convert this back to the original device name,
but rather to 'device:SYCL_0'.
An alternative fix would be to convert all underscores to colons in the
device name (i.e. remove the restriction inside `replace("_", ":", 1)`),
however I'm not sure if there are any device names which contain
underscores.
* If no gpu device aviable fake one
* gpu: -> device:GPU
* Fixes profiler test
* /gpu:x -> /device:GPU:x
* Fixes debug_io_utils_test.cc test
* Fixes device_name_utils_test.cc
---
Commit 35e7a3665 authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Remove unneeded casting of int64 for reverse_sequence (#12192)
This fix remove unneeded cast of int64 for reverse_sequence:
```
lengths = math_ops.to_int64(lengths)
```
as int32 has already been enabled for reverse_sequence.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit 9fba8c185 authored by Anna R<annarev@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add benchmark dashboard link to benchmarks doc. Also, I added a link and
description for Benchmarks page to Community index page.
PiperOrigin-RevId: 164924906
---
Commit bb6f32fa7 authored by Mark Heffernan<meheff@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make HloAliasAnalysis updatable after changes to the HLO graph.
As part of this change make HloAliasAnalysis a thinner layer which
basically only holds a map from HloValue to HloBuffer and vice versa.
PiperOrigin-RevId: 164923041
---
Commit 9103096c1 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by Thomas K?ppe<tkoeppe@google.com>:
Merged commit includes the following changes:
164923041 by meheff:
Make HloAliasAnalysis updatable after changes to the HLO graph.
As part of this change make HloAliasAnalysis a thinner layer which
basically only holds a map from HloValue to HloBuffer and vice versa.
--
PiperOrigin-RevId: 164923041
---
Commit 822603aed authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Merging sibling fusion instruction using multi_output_fusion
PiperOrigin-RevId: 164920220
---
Commit c035aa2a8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 164917891
---
Commit e1e81d9ba authored by Luke Iwanski<luke@codeplay.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
[OpenCL] Fixes double memcpy bug (#151) (#12173)
* [OpenCL] Fixes double memcpy bug (#151)
As the debg CopyOp is called on a Tensor without type, we need to use
the DataType enum to get type information, and use this to pass the type
on to Eigen. This is a workaround Eigen's need to have a type when
calling memcpy. If the Eigen memcpy can be provided without a type
requirement, then the memcpy in sycl_util is unnecessary.
* Acts on feedback from: #12173/files/32cb12a9001b672425867b5a3110fd98e737a20b#r132496277
---
Commit d9ca2d86d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change
PiperOrigin-RevId: 164916465
---
Commit b8d13d218 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove more parts of DCASGD missed in the first pass. (47949b)
PiperOrigin-RevId: 164914552
---
Commit 73b3d52c7 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
cmake fix
PiperOrigin-RevId: 164911656
---
Commit 2173b5b0a authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Allow TFE_TensorHandleCopyToDevice to have the same device as src and
destination. It will reuse the same underlying buffer in those cases.
PiperOrigin-RevId: 164909906
---
Commit 13eb3b90e authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Experimental C and Python APIs to invoke TensorFlow kernels on concrete values.
PiperOrigin-RevId: 164902588
---
Commit 7dfabcc01 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Initialize ExecutionOptions in ComputeConstant to default values.
PiperOrigin-RevId: 164894867
---
Commit c8897e9bc authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Static required time computation
PiperOrigin-RevId: 164894645
---
Commit 076158f9b authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Enable implicit->explicit conversion by default.
PiperOrigin-RevId: 164890915
---
Commit 58c4a4cb1 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Bugfix: number of input channels is not necessarily in the last dimension, after introduction of data_format param.
PiperOrigin-RevId: 164889729
---
Commit 8f9b1af8a authored by Igor Saprykin<isaprykin@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Recover MonitoredSession when the Coordinator is requested to stop with one of the _PREEMPTION_ERRORS.
When SyncReplicasOptimizer is used, a preemption in the Coordinator may result in two cases:
Case 1) the session gets silently marked as complete
Case 2) the session gets stuck
This CL aims to solve and verify solutions for both of these problems. Fix 1 changes the should_stop logic. Fix 2 changes the CoordinatedSession.run() logic.
SyncReplicasOptimizer runs a separate set of threads using a Coordinator instance. Those threads do FIFOQueue.enqueue; the main thread does a blocking FIFOQueue.dequeue.
`sync_token_q` FIFOQueue is on parameter-servers. When one of the PS instances gets preempted, an AbortedError causes the Coordinator to stop via request_stop(ex). That by itself changes the state of MonitoredSession.should_stop() to True (Fix 1).
Results of the blocking Dequeue operation are sent to the chief worker via Recv. What happens next depends on the amount of tokens in `sync_token_q`. If there are enough for the next call to Dequeue to return, then the low-level "tf session run() call" returns. The next iteration of the `while not MonitoredSession.should_stop()` loop decides that the training is complete (Case 1).
If there are not enough tokens in `sync_token_q`, then the blocking Dequeue is going to keep waiting for them. This results in the graph execution getting stuck and the whole session getting garbage collected after 10 minutes (Case 2).
We decided to fix that by re-creating a session after it gets garbage collected (Fix 2). An alternative was to try to cancel the pending Dequeue operation, but it's not clear that it is the right thing to do and it is also not easy.
PiperOrigin-RevId: 164888390
---
Commit 46e4de6e5 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Undo loop fusion changes for now as they seem to be altering a few results.
END_PUBLIC
RELNOTES: n/a
BEGIN_PUBLIC
BEGIN_PUBLIC
Automated g4 rollback of changelist 164825735
PiperOrigin-RevId: 165340331
2017-08-15 12:08:29 -07:00
|
|
|
version: a version to be converted
|
2017-08-04 00:52:34 -07:00
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
An integer if converted successfully, otherwise return None.
|
|
|
|
|
"""
|
Merge changes from github.
END_PUBLIC
---
Commit 9f81374c3 authored by raymondxyang<zihao.yang@microsoft.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Add option for build more python tests in Cmake (#11853)
* Ignore Windows built project
* Fix deprecated methods in tf.contrib.python
* Fix regex match for Windows build in contrib.keras
* Fix Regex match for Windows build in session_bundle
* * Fix deprecated methods
* Fix regex match for Windows
* Fix compatibility issue with Python 3.x
* Add missing ops into Windows build for test
* Enabled more testcases for Windows build
* Clean code and fix typo
* Add conditional cmake mode for enabling more unit testcase
* Add Cmake mode for major Contrib packages
* Add supplementary info in RAEDME for new cmake option
* * Update tf_tests after testing with TF 1.3
* Clean code and resolve conflicts
* Fix unsafe regex matches and format code
* Update exclude list after testing with latest master branch
* Fix missing module
---
Commit 98f0e1efe authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Dynamic ksize and strides with MaxPool (#11875)
* Dynamic ksize with max_pool
This fix tries to fix the issue raised in 4746 where ksize
is static (attr) with max_pool.
This fix changes ksize to input tensor so that it is dynamic now.
This fix fixes 4746.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add dynamic ksize to MaxPoolGrad and MaxPoolGradGrad
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test cases for max_pool_v2
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix GPU Jenkins issue.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Enable MaxPoolV2 in GPU
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Hide MaxPoolV2 and other fixes.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit 02d6bc185 authored by Bairen Yi<byronyi@users.noreply.github.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
remove useless variable (#12212)
---
Commit ed6b0d905 authored by namrata-ibm<bhavenamrata@gmail.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Adding support for s390x in calculation of cpu_frequency (#12201)
---
Commit 627dfc9dd authored by Taehoon Lee<taehoonlee@snu.ac.kr>
Committed by Taehoon Lee<taehoonlee@snu.ac.kr>:
Fix typos
---
Commit c0f9b0a91 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
In fast-math mode emit a tanh that has a faster min/max.
PiperOrigin-RevId: 164943597
---
Commit 87605f3d6 authored by Kay Zhu<kayzhu@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[TF:XLA] Use HloEvaluator for ComputeConstant, remove the need of a dedicated
compute constant backend.
PiperOrigin-RevId: 164940970
---
Commit 881de45c2 authored by Taehoon Lee<me@taehoonlee.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Add bool type supports for GPU kernels (#11927)
* Add bool type supports for GPU kernels
* Add bool type test codes for GPU kernels
---
Commit eeacdcdb1 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add missing "CPU" suffix in registrations.
PiperOrigin-RevId: 164939527
---
Commit de01be952 authored by namrata-ibm<bhavenamrata@gmail.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Adding support for Big Endian in graph_constructor_test and wav_io (#12179)
---
Commit 26719d29f authored by QingYing Chen<pkudysj@126.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Implement CRF decode (Viterbi decode) for tensor (#12056)
* Implement CRF decoding for tensors
* add test code for tensor version's CRF decoding
* made modifications according to pylint
* add some comments for crf decode
* remove useless code
* add comments at the top comment of crf module and add more comments in crf_test
* capitalize first char of first word in comments
* replace crf_decode test code with a deterministic example
---
Commit f9a81ca2f authored by Pete Warden<pete@petewarden.com>
Committed by gunan<gunan@google.com>:
Create CI build script for Raspberry Pi (#12190)
* Create CI build script for Raspberry Pi
* Moved location of Pi build script
---
Commit e2a163a90 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Merge code from PR #11940 with internal changes from cl/164796436, and update Python tests to also run on GPU.
PiperOrigin-RevId: 164929133
---
Commit 08bbfa187 authored by Taehoon Lee<me@taehoonlee.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Fix typos (#12195)
---
Commit ab96f41fb authored by Luke Iwanski<luke@codeplay.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
[OpenCL] Extends matmul_benchmark.py to cover SYCL (#11697)
* [OpenCL] Extends matmul_benchmark.py to cover SYCL
* Fixed typo
* /gpu:0 -> /device:GPU:0
* Fixes control_flow_ops_py_test
* /gpu: -> /device:GPU:
* Fixes //tensorflow/python/profiler/internal:run_metadata_test
* gpu: -> GPU:
* Fixes tfprof_node
* [OpenCL] Fixes device path to name with many colons (#123)
The device path is constructed from a device name by replacing all
colons with underscores. Some device names contain more than one colon,
for example 'device:SYCL:0' which gives a path 'device_SYCL_0'. The
previous code would not convert this back to the original device name,
but rather to 'device:SYCL_0'.
An alternative fix would be to convert all underscores to colons in the
device name (i.e. remove the restriction inside `replace("_", ":", 1)`),
however I'm not sure if there are any device names which contain
underscores.
* If no gpu device aviable fake one
* gpu: -> device:GPU
* Fixes profiler test
* /gpu:x -> /device:GPU:x
* Fixes debug_io_utils_test.cc test
* Fixes device_name_utils_test.cc
---
Commit 35e7a3665 authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Remove unneeded casting of int64 for reverse_sequence (#12192)
This fix remove unneeded cast of int64 for reverse_sequence:
```
lengths = math_ops.to_int64(lengths)
```
as int32 has already been enabled for reverse_sequence.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit 9fba8c185 authored by Anna R<annarev@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add benchmark dashboard link to benchmarks doc. Also, I added a link and
description for Benchmarks page to Community index page.
PiperOrigin-RevId: 164924906
---
Commit bb6f32fa7 authored by Mark Heffernan<meheff@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make HloAliasAnalysis updatable after changes to the HLO graph.
As part of this change make HloAliasAnalysis a thinner layer which
basically only holds a map from HloValue to HloBuffer and vice versa.
PiperOrigin-RevId: 164923041
---
Commit 9103096c1 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by Thomas K?ppe<tkoeppe@google.com>:
Merged commit includes the following changes:
164923041 by meheff:
Make HloAliasAnalysis updatable after changes to the HLO graph.
As part of this change make HloAliasAnalysis a thinner layer which
basically only holds a map from HloValue to HloBuffer and vice versa.
--
PiperOrigin-RevId: 164923041
---
Commit 822603aed authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Merging sibling fusion instruction using multi_output_fusion
PiperOrigin-RevId: 164920220
---
Commit c035aa2a8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 164917891
---
Commit e1e81d9ba authored by Luke Iwanski<luke@codeplay.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
[OpenCL] Fixes double memcpy bug (#151) (#12173)
* [OpenCL] Fixes double memcpy bug (#151)
As the debg CopyOp is called on a Tensor without type, we need to use
the DataType enum to get type information, and use this to pass the type
on to Eigen. This is a workaround Eigen's need to have a type when
calling memcpy. If the Eigen memcpy can be provided without a type
requirement, then the memcpy in sycl_util is unnecessary.
* Acts on feedback from: #12173/files/32cb12a9001b672425867b5a3110fd98e737a20b#r132496277
---
Commit d9ca2d86d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change
PiperOrigin-RevId: 164916465
---
Commit b8d13d218 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove more parts of DCASGD missed in the first pass. (47949b)
PiperOrigin-RevId: 164914552
---
Commit 73b3d52c7 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
cmake fix
PiperOrigin-RevId: 164911656
---
Commit 2173b5b0a authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Allow TFE_TensorHandleCopyToDevice to have the same device as src and
destination. It will reuse the same underlying buffer in those cases.
PiperOrigin-RevId: 164909906
---
Commit 13eb3b90e authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Experimental C and Python APIs to invoke TensorFlow kernels on concrete values.
PiperOrigin-RevId: 164902588
---
Commit 7dfabcc01 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Initialize ExecutionOptions in ComputeConstant to default values.
PiperOrigin-RevId: 164894867
---
Commit c8897e9bc authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Static required time computation
PiperOrigin-RevId: 164894645
---
Commit 076158f9b authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Enable implicit->explicit conversion by default.
PiperOrigin-RevId: 164890915
---
Commit 58c4a4cb1 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Bugfix: number of input channels is not necessarily in the last dimension, after introduction of data_format param.
PiperOrigin-RevId: 164889729
---
Commit 8f9b1af8a authored by Igor Saprykin<isaprykin@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Recover MonitoredSession when the Coordinator is requested to stop with one of the _PREEMPTION_ERRORS.
When SyncReplicasOptimizer is used, a preemption in the Coordinator may result in two cases:
Case 1) the session gets silently marked as complete
Case 2) the session gets stuck
This CL aims to solve and verify solutions for both of these problems. Fix 1 changes the should_stop logic. Fix 2 changes the CoordinatedSession.run() logic.
SyncReplicasOptimizer runs a separate set of threads using a Coordinator instance. Those threads do FIFOQueue.enqueue; the main thread does a blocking FIFOQueue.dequeue.
`sync_token_q` FIFOQueue is on parameter-servers. When one of the PS instances gets preempted, an AbortedError causes the Coordinator to stop via request_stop(ex). That by itself changes the state of MonitoredSession.should_stop() to True (Fix 1).
Results of the blocking Dequeue operation are sent to the chief worker via Recv. What happens next depends on the amount of tokens in `sync_token_q`. If there are enough for the next call to Dequeue to return, then the low-level "tf session run() call" returns. The next iteration of the `while not MonitoredSession.should_stop()` loop decides that the training is complete (Case 1).
If there are not enough tokens in `sync_token_q`, then the blocking Dequeue is going to keep waiting for them. This results in the graph execution getting stuck and the whole session getting garbage collected after 10 minutes (Case 2).
We decided to fix that by re-creating a session after it gets garbage collected (Fix 2). An alternative was to try to cancel the pending Dequeue operation, but it's not clear that it is the right thing to do and it is also not easy.
PiperOrigin-RevId: 164888390
---
Commit 46e4de6e5 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Undo loop fusion changes for now as they seem to be altering a few results.
END_PUBLIC
RELNOTES: n/a
BEGIN_PUBLIC
BEGIN_PUBLIC
Automated g4 rollback of changelist 164825735
PiperOrigin-RevId: 165340331
2017-08-15 12:08:29 -07:00
|
|
|
version = version.split('-')[0]
|
2017-08-04 00:52:34 -07:00
|
|
|
version_segments = version.split('.')
|
|
|
|
|
for seg in version_segments:
|
|
|
|
|
if not seg.isdigit():
|
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
|
version_str = ''.join(['%03d' % int(seg) for seg in version_segments])
|
|
|
|
|
return int(version_str)
|
|
|
|
|
|
|
|
|
|
|
2017-07-25 13:30:03 -07:00
|
|
|
def check_bazel_version(min_version):
|
2018-02-22 14:24:57 -08:00
|
|
|
"""Check installed bazel version is at least min_version.
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
min_version: string for minimum bazel version.
|
2017-08-04 00:52:34 -07:00
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
The bazel version detected.
|
2017-07-25 13:30:03 -07:00
|
|
|
"""
|
2017-08-25 14:01:05 -07:00
|
|
|
if which('bazel') is None:
|
2017-07-25 13:30:03 -07:00
|
|
|
print('Cannot find bazel. Please install bazel.')
|
|
|
|
|
sys.exit(0)
|
2018-03-12 19:33:52 -07:00
|
|
|
curr_version = run_shell(['bazel', '--batch', '--bazelrc=/dev/null', 'version'])
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
for line in curr_version.split('\n'):
|
|
|
|
|
if 'Build label: ' in line:
|
|
|
|
|
curr_version = line.split('Build label: ')[1]
|
|
|
|
|
break
|
|
|
|
|
|
2017-08-04 00:52:34 -07:00
|
|
|
min_version_int = convert_version_to_int(min_version)
|
|
|
|
|
curr_version_int = convert_version_to_int(curr_version)
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
# Check if current bazel version can be detected properly.
|
2017-08-04 00:52:34 -07:00
|
|
|
if not curr_version_int:
|
|
|
|
|
print('WARNING: current bazel installation is not a release version.')
|
|
|
|
|
print('Make sure you are running at least bazel %s' % min_version)
|
|
|
|
|
return curr_version
|
|
|
|
|
|
2017-08-22 17:26:52 -07:00
|
|
|
print('You have bazel %s installed.' % curr_version)
|
Merge changes from github.
END_PUBLIC
---
Commit 9f81374c3 authored by raymondxyang<zihao.yang@microsoft.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Add option for build more python tests in Cmake (#11853)
* Ignore Windows built project
* Fix deprecated methods in tf.contrib.python
* Fix regex match for Windows build in contrib.keras
* Fix Regex match for Windows build in session_bundle
* * Fix deprecated methods
* Fix regex match for Windows
* Fix compatibility issue with Python 3.x
* Add missing ops into Windows build for test
* Enabled more testcases for Windows build
* Clean code and fix typo
* Add conditional cmake mode for enabling more unit testcase
* Add Cmake mode for major Contrib packages
* Add supplementary info in RAEDME for new cmake option
* * Update tf_tests after testing with TF 1.3
* Clean code and resolve conflicts
* Fix unsafe regex matches and format code
* Update exclude list after testing with latest master branch
* Fix missing module
---
Commit 98f0e1efe authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Dynamic ksize and strides with MaxPool (#11875)
* Dynamic ksize with max_pool
This fix tries to fix the issue raised in 4746 where ksize
is static (attr) with max_pool.
This fix changes ksize to input tensor so that it is dynamic now.
This fix fixes 4746.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add dynamic ksize to MaxPoolGrad and MaxPoolGradGrad
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test cases for max_pool_v2
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix GPU Jenkins issue.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Enable MaxPoolV2 in GPU
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Hide MaxPoolV2 and other fixes.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit 02d6bc185 authored by Bairen Yi<byronyi@users.noreply.github.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
remove useless variable (#12212)
---
Commit ed6b0d905 authored by namrata-ibm<bhavenamrata@gmail.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Adding support for s390x in calculation of cpu_frequency (#12201)
---
Commit 627dfc9dd authored by Taehoon Lee<taehoonlee@snu.ac.kr>
Committed by Taehoon Lee<taehoonlee@snu.ac.kr>:
Fix typos
---
Commit c0f9b0a91 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
In fast-math mode emit a tanh that has a faster min/max.
PiperOrigin-RevId: 164943597
---
Commit 87605f3d6 authored by Kay Zhu<kayzhu@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[TF:XLA] Use HloEvaluator for ComputeConstant, remove the need of a dedicated
compute constant backend.
PiperOrigin-RevId: 164940970
---
Commit 881de45c2 authored by Taehoon Lee<me@taehoonlee.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Add bool type supports for GPU kernels (#11927)
* Add bool type supports for GPU kernels
* Add bool type test codes for GPU kernels
---
Commit eeacdcdb1 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add missing "CPU" suffix in registrations.
PiperOrigin-RevId: 164939527
---
Commit de01be952 authored by namrata-ibm<bhavenamrata@gmail.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Adding support for Big Endian in graph_constructor_test and wav_io (#12179)
---
Commit 26719d29f authored by QingYing Chen<pkudysj@126.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Implement CRF decode (Viterbi decode) for tensor (#12056)
* Implement CRF decoding for tensors
* add test code for tensor version's CRF decoding
* made modifications according to pylint
* add some comments for crf decode
* remove useless code
* add comments at the top comment of crf module and add more comments in crf_test
* capitalize first char of first word in comments
* replace crf_decode test code with a deterministic example
---
Commit f9a81ca2f authored by Pete Warden<pete@petewarden.com>
Committed by gunan<gunan@google.com>:
Create CI build script for Raspberry Pi (#12190)
* Create CI build script for Raspberry Pi
* Moved location of Pi build script
---
Commit e2a163a90 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Merge code from PR #11940 with internal changes from cl/164796436, and update Python tests to also run on GPU.
PiperOrigin-RevId: 164929133
---
Commit 08bbfa187 authored by Taehoon Lee<me@taehoonlee.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Fix typos (#12195)
---
Commit ab96f41fb authored by Luke Iwanski<luke@codeplay.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
[OpenCL] Extends matmul_benchmark.py to cover SYCL (#11697)
* [OpenCL] Extends matmul_benchmark.py to cover SYCL
* Fixed typo
* /gpu:0 -> /device:GPU:0
* Fixes control_flow_ops_py_test
* /gpu: -> /device:GPU:
* Fixes //tensorflow/python/profiler/internal:run_metadata_test
* gpu: -> GPU:
* Fixes tfprof_node
* [OpenCL] Fixes device path to name with many colons (#123)
The device path is constructed from a device name by replacing all
colons with underscores. Some device names contain more than one colon,
for example 'device:SYCL:0' which gives a path 'device_SYCL_0'. The
previous code would not convert this back to the original device name,
but rather to 'device:SYCL_0'.
An alternative fix would be to convert all underscores to colons in the
device name (i.e. remove the restriction inside `replace("_", ":", 1)`),
however I'm not sure if there are any device names which contain
underscores.
* If no gpu device aviable fake one
* gpu: -> device:GPU
* Fixes profiler test
* /gpu:x -> /device:GPU:x
* Fixes debug_io_utils_test.cc test
* Fixes device_name_utils_test.cc
---
Commit 35e7a3665 authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Remove unneeded casting of int64 for reverse_sequence (#12192)
This fix remove unneeded cast of int64 for reverse_sequence:
```
lengths = math_ops.to_int64(lengths)
```
as int32 has already been enabled for reverse_sequence.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit 9fba8c185 authored by Anna R<annarev@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add benchmark dashboard link to benchmarks doc. Also, I added a link and
description for Benchmarks page to Community index page.
PiperOrigin-RevId: 164924906
---
Commit bb6f32fa7 authored by Mark Heffernan<meheff@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make HloAliasAnalysis updatable after changes to the HLO graph.
As part of this change make HloAliasAnalysis a thinner layer which
basically only holds a map from HloValue to HloBuffer and vice versa.
PiperOrigin-RevId: 164923041
---
Commit 9103096c1 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by Thomas K?ppe<tkoeppe@google.com>:
Merged commit includes the following changes:
164923041 by meheff:
Make HloAliasAnalysis updatable after changes to the HLO graph.
As part of this change make HloAliasAnalysis a thinner layer which
basically only holds a map from HloValue to HloBuffer and vice versa.
--
PiperOrigin-RevId: 164923041
---
Commit 822603aed authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Merging sibling fusion instruction using multi_output_fusion
PiperOrigin-RevId: 164920220
---
Commit c035aa2a8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 164917891
---
Commit e1e81d9ba authored by Luke Iwanski<luke@codeplay.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
[OpenCL] Fixes double memcpy bug (#151) (#12173)
* [OpenCL] Fixes double memcpy bug (#151)
As the debg CopyOp is called on a Tensor without type, we need to use
the DataType enum to get type information, and use this to pass the type
on to Eigen. This is a workaround Eigen's need to have a type when
calling memcpy. If the Eigen memcpy can be provided without a type
requirement, then the memcpy in sycl_util is unnecessary.
* Acts on feedback from: #12173/files/32cb12a9001b672425867b5a3110fd98e737a20b#r132496277
---
Commit d9ca2d86d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change
PiperOrigin-RevId: 164916465
---
Commit b8d13d218 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove more parts of DCASGD missed in the first pass. (47949b)
PiperOrigin-RevId: 164914552
---
Commit 73b3d52c7 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
cmake fix
PiperOrigin-RevId: 164911656
---
Commit 2173b5b0a authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Allow TFE_TensorHandleCopyToDevice to have the same device as src and
destination. It will reuse the same underlying buffer in those cases.
PiperOrigin-RevId: 164909906
---
Commit 13eb3b90e authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Experimental C and Python APIs to invoke TensorFlow kernels on concrete values.
PiperOrigin-RevId: 164902588
---
Commit 7dfabcc01 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Initialize ExecutionOptions in ComputeConstant to default values.
PiperOrigin-RevId: 164894867
---
Commit c8897e9bc authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Static required time computation
PiperOrigin-RevId: 164894645
---
Commit 076158f9b authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Enable implicit->explicit conversion by default.
PiperOrigin-RevId: 164890915
---
Commit 58c4a4cb1 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Bugfix: number of input channels is not necessarily in the last dimension, after introduction of data_format param.
PiperOrigin-RevId: 164889729
---
Commit 8f9b1af8a authored by Igor Saprykin<isaprykin@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Recover MonitoredSession when the Coordinator is requested to stop with one of the _PREEMPTION_ERRORS.
When SyncReplicasOptimizer is used, a preemption in the Coordinator may result in two cases:
Case 1) the session gets silently marked as complete
Case 2) the session gets stuck
This CL aims to solve and verify solutions for both of these problems. Fix 1 changes the should_stop logic. Fix 2 changes the CoordinatedSession.run() logic.
SyncReplicasOptimizer runs a separate set of threads using a Coordinator instance. Those threads do FIFOQueue.enqueue; the main thread does a blocking FIFOQueue.dequeue.
`sync_token_q` FIFOQueue is on parameter-servers. When one of the PS instances gets preempted, an AbortedError causes the Coordinator to stop via request_stop(ex). That by itself changes the state of MonitoredSession.should_stop() to True (Fix 1).
Results of the blocking Dequeue operation are sent to the chief worker via Recv. What happens next depends on the amount of tokens in `sync_token_q`. If there are enough for the next call to Dequeue to return, then the low-level "tf session run() call" returns. The next iteration of the `while not MonitoredSession.should_stop()` loop decides that the training is complete (Case 1).
If there are not enough tokens in `sync_token_q`, then the blocking Dequeue is going to keep waiting for them. This results in the graph execution getting stuck and the whole session getting garbage collected after 10 minutes (Case 2).
We decided to fix that by re-creating a session after it gets garbage collected (Fix 2). An alternative was to try to cancel the pending Dequeue operation, but it's not clear that it is the right thing to do and it is also not easy.
PiperOrigin-RevId: 164888390
---
Commit 46e4de6e5 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Undo loop fusion changes for now as they seem to be altering a few results.
END_PUBLIC
RELNOTES: n/a
BEGIN_PUBLIC
BEGIN_PUBLIC
Automated g4 rollback of changelist 164825735
PiperOrigin-RevId: 165340331
2017-08-15 12:08:29 -07:00
|
|
|
|
2017-08-04 00:52:34 -07:00
|
|
|
if curr_version_int < min_version_int:
|
2017-07-25 13:30:03 -07:00
|
|
|
print('Please upgrade your bazel installation to version %s or higher to '
|
|
|
|
|
'build TensorFlow!' % min_version)
|
|
|
|
|
sys.exit(0)
|
2017-08-04 00:52:34 -07:00
|
|
|
return curr_version
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def set_cc_opt_flags(environ_cp):
|
|
|
|
|
"""Set up architecture-dependent optimization flags.
|
|
|
|
|
|
|
|
|
|
Also append CC optimization flags to bazel.rc..
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
environ_cp: copy of the os.environ.
|
|
|
|
|
"""
|
|
|
|
|
if is_ppc64le():
|
|
|
|
|
# gcc on ppc64le does not support -march, use mcpu instead
|
|
|
|
|
default_cc_opt_flags = '-mcpu=native'
|
2018-04-04 15:45:20 -07:00
|
|
|
elif is_windows():
|
|
|
|
|
default_cc_opt_flags = '/arch:AVX'
|
2017-07-25 13:30:03 -07:00
|
|
|
else:
|
|
|
|
|
default_cc_opt_flags = '-march=native'
|
|
|
|
|
question = ('Please specify optimization flags to use during compilation when'
|
|
|
|
|
' bazel option "--config=opt" is specified [Default is %s]: '
|
|
|
|
|
) % default_cc_opt_flags
|
|
|
|
|
cc_opt_flags = get_from_env_or_user_or_default(environ_cp, 'CC_OPT_FLAGS',
|
|
|
|
|
question, default_cc_opt_flags)
|
|
|
|
|
for opt in cc_opt_flags.split():
|
2017-11-10 13:14:03 -08:00
|
|
|
write_to_bazelrc('build:opt --copt=%s' % opt)
|
|
|
|
|
# It should be safe on the same build host.
|
2018-04-04 15:45:20 -07:00
|
|
|
if not is_ppc64le() and not is_windows():
|
2018-03-12 19:33:52 -07:00
|
|
|
write_to_bazelrc('build:opt --host_copt=-march=native')
|
2017-11-09 08:46:31 -08:00
|
|
|
write_to_bazelrc('build:opt --define with_default_optimizations=true')
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
def set_tf_cuda_clang(environ_cp):
|
|
|
|
|
"""set TF_CUDA_CLANG action_env.
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
environ_cp: copy of the os.environ.
|
|
|
|
|
"""
|
|
|
|
|
question = 'Do you want to use clang as CUDA compiler?'
|
|
|
|
|
yes_reply = 'Clang will be used as CUDA compiler.'
|
|
|
|
|
no_reply = 'nvcc will be used as CUDA compiler.'
|
|
|
|
|
set_action_env_var(
|
|
|
|
|
environ_cp,
|
|
|
|
|
'TF_CUDA_CLANG',
|
|
|
|
|
None,
|
|
|
|
|
False,
|
|
|
|
|
question=question,
|
|
|
|
|
yes_reply=yes_reply,
|
|
|
|
|
no_reply=no_reply)
|
|
|
|
|
|
|
|
|
|
|
2017-12-22 03:07:51 -08:00
|
|
|
def set_tf_download_clang(environ_cp):
|
|
|
|
|
"""Set TF_DOWNLOAD_CLANG action_env."""
|
2018-03-22 05:33:42 -07:00
|
|
|
question = 'Do you wish to download a fresh release of clang? (Experimental)'
|
2017-12-22 03:07:51 -08:00
|
|
|
yes_reply = 'Clang will be downloaded and used to compile tensorflow.'
|
|
|
|
|
no_reply = 'Clang will not be downloaded.'
|
|
|
|
|
set_action_env_var(
|
|
|
|
|
environ_cp,
|
|
|
|
|
'TF_DOWNLOAD_CLANG',
|
|
|
|
|
None,
|
|
|
|
|
False,
|
|
|
|
|
question=question,
|
|
|
|
|
yes_reply=yes_reply,
|
|
|
|
|
no_reply=no_reply)
|
|
|
|
|
|
|
|
|
|
|
2017-07-25 13:30:03 -07:00
|
|
|
def get_from_env_or_user_or_default(environ_cp, var_name, ask_for_var,
|
|
|
|
|
var_default):
|
|
|
|
|
"""Get var_name either from env, or user or default.
|
|
|
|
|
|
|
|
|
|
If var_name has been set as environment variable, use the preset value, else
|
|
|
|
|
ask for user input. If no input is provided, the default is used.
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
environ_cp: copy of the os.environ.
|
|
|
|
|
var_name: string for name of environment variable, e.g. "TF_NEED_HDFS".
|
|
|
|
|
ask_for_var: string for how to ask for user input.
|
|
|
|
|
var_default: default value string.
|
|
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
string value for var_name
|
|
|
|
|
"""
|
|
|
|
|
var = environ_cp.get(var_name)
|
|
|
|
|
if not var:
|
|
|
|
|
var = get_input(ask_for_var)
|
2017-08-22 17:26:52 -07:00
|
|
|
print('\n')
|
2017-07-25 13:30:03 -07:00
|
|
|
if not var:
|
|
|
|
|
var = var_default
|
|
|
|
|
return var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def set_clang_cuda_compiler_path(environ_cp):
|
|
|
|
|
"""Set CLANG_CUDA_COMPILER_PATH."""
|
2017-08-25 14:01:05 -07:00
|
|
|
default_clang_path = which('clang') or ''
|
2017-07-25 13:30:03 -07:00
|
|
|
ask_clang_path = ('Please specify which clang should be used as device and '
|
|
|
|
|
'host compiler. [Default is %s]: ') % default_clang_path
|
|
|
|
|
|
|
|
|
|
while True:
|
|
|
|
|
clang_cuda_compiler_path = get_from_env_or_user_or_default(
|
|
|
|
|
environ_cp, 'CLANG_CUDA_COMPILER_PATH', ask_clang_path,
|
|
|
|
|
default_clang_path)
|
|
|
|
|
if os.path.exists(clang_cuda_compiler_path):
|
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
# Reset and retry
|
|
|
|
|
print('Invalid clang path: %s cannot be found.' % clang_cuda_compiler_path)
|
|
|
|
|
environ_cp['CLANG_CUDA_COMPILER_PATH'] = ''
|
|
|
|
|
|
|
|
|
|
# Set CLANG_CUDA_COMPILER_PATH
|
|
|
|
|
environ_cp['CLANG_CUDA_COMPILER_PATH'] = clang_cuda_compiler_path
|
|
|
|
|
write_action_env_to_bazelrc('CLANG_CUDA_COMPILER_PATH',
|
|
|
|
|
clang_cuda_compiler_path)
|
|
|
|
|
|
|
|
|
|
|
2017-12-05 11:59:17 -08:00
|
|
|
def prompt_loop_or_load_from_env(
|
|
|
|
|
environ_cp,
|
|
|
|
|
var_name,
|
|
|
|
|
var_default,
|
|
|
|
|
ask_for_var,
|
|
|
|
|
check_success,
|
|
|
|
|
error_msg,
|
|
|
|
|
suppress_default_error=False,
|
|
|
|
|
n_ask_attempts=_DEFAULT_PROMPT_ASK_ATTEMPTS
|
|
|
|
|
):
|
|
|
|
|
"""Loop over user prompts for an ENV param until receiving a valid response.
|
|
|
|
|
|
|
|
|
|
For the env param var_name, read from the environment or verify user input
|
|
|
|
|
until receiving valid input. When done, set var_name in the environ_cp to its
|
|
|
|
|
new value.
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
environ_cp: (Dict) copy of the os.environ.
|
|
|
|
|
var_name: (String) string for name of environment variable, e.g. "TF_MYVAR".
|
|
|
|
|
var_default: (String) default value string.
|
|
|
|
|
ask_for_var: (String) string for how to ask for user input.
|
|
|
|
|
check_success: (Function) function that takes one argument and returns a
|
|
|
|
|
boolean. Should return True if the value provided is considered valid. May
|
|
|
|
|
contain a complex error message if error_msg does not provide enough
|
|
|
|
|
information. In that case, set suppress_default_error to True.
|
|
|
|
|
error_msg: (String) String with one and only one '%s'. Formatted with each
|
|
|
|
|
invalid response upon check_success(input) failure.
|
|
|
|
|
suppress_default_error: (Bool) Suppress the above error message in favor of
|
|
|
|
|
one from the check_success function.
|
|
|
|
|
n_ask_attempts: (Integer) Number of times to query for valid input before
|
|
|
|
|
raising an error and quitting.
|
|
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
[String] The value of var_name after querying for input.
|
|
|
|
|
|
|
|
|
|
Raises:
|
|
|
|
|
UserInputError: if a query has been attempted n_ask_attempts times without
|
2018-01-10 11:36:52 -08:00
|
|
|
success, assume that the user has made a scripting error, and will
|
|
|
|
|
continue to provide invalid input. Raise the error to avoid infinitely
|
|
|
|
|
looping.
|
2017-12-05 11:59:17 -08:00
|
|
|
"""
|
|
|
|
|
default = environ_cp.get(var_name) or var_default
|
|
|
|
|
full_query = '%s [Default is %s]: ' % (
|
|
|
|
|
ask_for_var,
|
|
|
|
|
default,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
for _ in range(n_ask_attempts):
|
|
|
|
|
val = get_from_env_or_user_or_default(environ_cp,
|
|
|
|
|
var_name,
|
|
|
|
|
full_query,
|
|
|
|
|
default)
|
|
|
|
|
if check_success(val):
|
|
|
|
|
break
|
|
|
|
|
if not suppress_default_error:
|
|
|
|
|
print(error_msg % val)
|
|
|
|
|
environ_cp[var_name] = ''
|
|
|
|
|
else:
|
|
|
|
|
raise UserInputError('Invalid %s setting was provided %d times in a row. '
|
|
|
|
|
'Assuming to be a scripting mistake.' %
|
|
|
|
|
(var_name, n_ask_attempts))
|
|
|
|
|
|
|
|
|
|
environ_cp[var_name] = val
|
|
|
|
|
return val
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def create_android_ndk_rule(environ_cp):
|
|
|
|
|
"""Set ANDROID_NDK_HOME and write Android NDK WORKSPACE rule."""
|
|
|
|
|
if is_windows() or is_cygwin():
|
|
|
|
|
default_ndk_path = cygpath('%s/Android/Sdk/ndk-bundle' %
|
|
|
|
|
environ_cp['APPDATA'])
|
|
|
|
|
elif is_macos():
|
|
|
|
|
default_ndk_path = '%s/library/Android/Sdk/ndk-bundle' % environ_cp['HOME']
|
|
|
|
|
else:
|
|
|
|
|
default_ndk_path = '%s/Android/Sdk/ndk-bundle' % environ_cp['HOME']
|
|
|
|
|
|
|
|
|
|
def valid_ndk_path(path):
|
|
|
|
|
return (os.path.exists(path) and
|
|
|
|
|
os.path.exists(os.path.join(path, 'source.properties')))
|
|
|
|
|
|
|
|
|
|
android_ndk_home_path = prompt_loop_or_load_from_env(
|
|
|
|
|
environ_cp,
|
|
|
|
|
var_name='ANDROID_NDK_HOME',
|
|
|
|
|
var_default=default_ndk_path,
|
|
|
|
|
ask_for_var='Please specify the home path of the Android NDK to use.',
|
|
|
|
|
check_success=valid_ndk_path,
|
|
|
|
|
error_msg=('The path %s or its child file "source.properties" '
|
|
|
|
|
'does not exist.')
|
|
|
|
|
)
|
2018-06-05 17:47:19 -07:00
|
|
|
write_action_env_to_bazelrc('ANDROID_NDK_HOME', android_ndk_home_path)
|
|
|
|
|
write_action_env_to_bazelrc('ANDROID_NDK_API_LEVEL',
|
|
|
|
|
check_ndk_level(android_ndk_home_path))
|
2017-12-05 11:59:17 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def create_android_sdk_rule(environ_cp):
|
|
|
|
|
"""Set Android variables and write Android SDK WORKSPACE rule."""
|
|
|
|
|
if is_windows() or is_cygwin():
|
|
|
|
|
default_sdk_path = cygpath('%s/Android/Sdk' % environ_cp['APPDATA'])
|
|
|
|
|
elif is_macos():
|
2018-07-17 09:00:24 -07:00
|
|
|
default_sdk_path = '%s/library/Android/Sdk' % environ_cp['HOME']
|
2017-12-05 11:59:17 -08:00
|
|
|
else:
|
|
|
|
|
default_sdk_path = '%s/Android/Sdk' % environ_cp['HOME']
|
|
|
|
|
|
|
|
|
|
def valid_sdk_path(path):
|
|
|
|
|
return (os.path.exists(path) and
|
|
|
|
|
os.path.exists(os.path.join(path, 'platforms')) and
|
|
|
|
|
os.path.exists(os.path.join(path, 'build-tools')))
|
|
|
|
|
|
|
|
|
|
android_sdk_home_path = prompt_loop_or_load_from_env(
|
|
|
|
|
environ_cp,
|
|
|
|
|
var_name='ANDROID_SDK_HOME',
|
|
|
|
|
var_default=default_sdk_path,
|
|
|
|
|
ask_for_var='Please specify the home path of the Android SDK to use.',
|
|
|
|
|
check_success=valid_sdk_path,
|
|
|
|
|
error_msg=('Either %s does not exist, or it does not contain the '
|
|
|
|
|
'subdirectories "platforms" and "build-tools".'))
|
|
|
|
|
|
|
|
|
|
platforms = os.path.join(android_sdk_home_path, 'platforms')
|
|
|
|
|
api_levels = sorted(os.listdir(platforms))
|
|
|
|
|
api_levels = [x.replace('android-', '') for x in api_levels]
|
|
|
|
|
|
|
|
|
|
def valid_api_level(api_level):
|
|
|
|
|
return os.path.exists(os.path.join(android_sdk_home_path,
|
|
|
|
|
'platforms',
|
|
|
|
|
'android-' + api_level))
|
|
|
|
|
|
|
|
|
|
android_api_level = prompt_loop_or_load_from_env(
|
|
|
|
|
environ_cp,
|
|
|
|
|
var_name='ANDROID_API_LEVEL',
|
|
|
|
|
var_default=api_levels[-1],
|
|
|
|
|
ask_for_var=('Please specify the Android SDK API level to use. '
|
|
|
|
|
'[Available levels: %s]') % api_levels,
|
|
|
|
|
check_success=valid_api_level,
|
|
|
|
|
error_msg='Android-%s is not present in the SDK path.')
|
|
|
|
|
|
|
|
|
|
build_tools = os.path.join(android_sdk_home_path, 'build-tools')
|
|
|
|
|
versions = sorted(os.listdir(build_tools))
|
|
|
|
|
|
|
|
|
|
def valid_build_tools(version):
|
|
|
|
|
return os.path.exists(os.path.join(android_sdk_home_path,
|
|
|
|
|
'build-tools',
|
|
|
|
|
version))
|
|
|
|
|
|
|
|
|
|
android_build_tools_version = prompt_loop_or_load_from_env(
|
|
|
|
|
environ_cp,
|
|
|
|
|
var_name='ANDROID_BUILD_TOOLS_VERSION',
|
|
|
|
|
var_default=versions[-1],
|
|
|
|
|
ask_for_var=('Please specify an Android build tools version to use. '
|
|
|
|
|
'[Available versions: %s]') % versions,
|
|
|
|
|
check_success=valid_build_tools,
|
|
|
|
|
error_msg=('The selected SDK does not have build-tools version %s '
|
|
|
|
|
'available.'))
|
|
|
|
|
|
2018-06-05 17:47:19 -07:00
|
|
|
write_action_env_to_bazelrc('ANDROID_BUILD_TOOLS_VERSION',
|
|
|
|
|
android_build_tools_version)
|
|
|
|
|
write_action_env_to_bazelrc('ANDROID_SDK_API_LEVEL',
|
|
|
|
|
android_api_level)
|
|
|
|
|
write_action_env_to_bazelrc('ANDROID_SDK_HOME',
|
|
|
|
|
android_sdk_home_path)
|
2017-12-05 11:59:17 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_ndk_level(android_ndk_home_path):
|
|
|
|
|
"""Check the revision number of an Android NDK path."""
|
|
|
|
|
properties_path = '%s/source.properties' % android_ndk_home_path
|
|
|
|
|
if is_windows() or is_cygwin():
|
|
|
|
|
properties_path = cygpath(properties_path)
|
|
|
|
|
with open(properties_path, 'r') as f:
|
|
|
|
|
filedata = f.read()
|
|
|
|
|
|
|
|
|
|
revision = re.search(r'Pkg.Revision = (\d+)', filedata)
|
|
|
|
|
if revision:
|
2018-06-05 17:47:19 -07:00
|
|
|
ndk_api_level = revision.group(1)
|
|
|
|
|
else:
|
|
|
|
|
raise Exception('Unable to parse NDK revision.')
|
|
|
|
|
if int(ndk_api_level) not in _SUPPORTED_ANDROID_NDK_VERSIONS:
|
|
|
|
|
print('WARNING: The API level of the NDK in %s is %s, which is not '
|
|
|
|
|
'supported by Bazel (officially supported versions: %s). Please use '
|
|
|
|
|
'another version. Compiling Android targets may result in confusing '
|
|
|
|
|
'errors.\n' % (android_ndk_home_path, ndk_api_level,
|
|
|
|
|
_SUPPORTED_ANDROID_NDK_VERSIONS))
|
|
|
|
|
return ndk_api_level
|
2017-12-05 11:59:17 -08:00
|
|
|
|
|
|
|
|
|
2017-07-25 13:30:03 -07:00
|
|
|
def set_gcc_host_compiler_path(environ_cp):
|
|
|
|
|
"""Set GCC_HOST_COMPILER_PATH."""
|
2017-08-25 14:01:05 -07:00
|
|
|
default_gcc_host_compiler_path = which('gcc') or ''
|
2017-07-25 13:30:03 -07:00
|
|
|
cuda_bin_symlink = '%s/bin/gcc' % environ_cp.get('CUDA_TOOLKIT_PATH')
|
|
|
|
|
|
|
|
|
|
if os.path.islink(cuda_bin_symlink):
|
|
|
|
|
# os.readlink is only available in linux
|
2017-08-25 14:01:05 -07:00
|
|
|
default_gcc_host_compiler_path = os.path.realpath(cuda_bin_symlink)
|
2017-07-25 13:30:03 -07:00
|
|
|
|
2017-12-05 11:59:17 -08:00
|
|
|
gcc_host_compiler_path = prompt_loop_or_load_from_env(
|
|
|
|
|
environ_cp,
|
|
|
|
|
var_name='GCC_HOST_COMPILER_PATH',
|
|
|
|
|
var_default=default_gcc_host_compiler_path,
|
|
|
|
|
ask_for_var=
|
|
|
|
|
'Please specify which gcc should be used by nvcc as the host compiler.',
|
|
|
|
|
check_success=os.path.exists,
|
|
|
|
|
error_msg='Invalid gcc path. %s cannot be found.',
|
|
|
|
|
)
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
write_action_env_to_bazelrc('GCC_HOST_COMPILER_PATH', gcc_host_compiler_path)
|
|
|
|
|
|
|
|
|
|
|
2018-02-16 18:22:55 -08:00
|
|
|
def reformat_version_sequence(version_str, sequence_count):
|
|
|
|
|
"""Reformat the version string to have the given number of sequences.
|
|
|
|
|
|
|
|
|
|
For example:
|
|
|
|
|
Given (7, 2) -> 7.0
|
|
|
|
|
(7.0.1, 2) -> 7.0
|
|
|
|
|
(5, 1) -> 5
|
|
|
|
|
(5.0.3.2, 1) -> 5
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
version_str: String, the version string.
|
|
|
|
|
sequence_count: int, an integer.
|
|
|
|
|
Returns:
|
|
|
|
|
string, reformatted version string.
|
|
|
|
|
"""
|
|
|
|
|
v = version_str.split('.')
|
|
|
|
|
if len(v) < sequence_count:
|
|
|
|
|
v = v + (['0'] * (sequence_count - len(v)))
|
|
|
|
|
|
|
|
|
|
return '.'.join(v[:sequence_count])
|
|
|
|
|
|
|
|
|
|
|
2017-07-25 13:30:03 -07:00
|
|
|
def set_tf_cuda_version(environ_cp):
|
|
|
|
|
"""Set CUDA_TOOLKIT_PATH and TF_CUDA_VERSION."""
|
|
|
|
|
ask_cuda_version = (
|
2018-05-08 12:04:38 -07:00
|
|
|
'Please specify the CUDA SDK version you want to use. '
|
|
|
|
|
'[Leave empty to default to CUDA %s]: ') % _DEFAULT_CUDA_VERSION
|
2017-07-25 13:30:03 -07:00
|
|
|
|
2017-12-13 11:49:40 -08:00
|
|
|
for _ in range(_DEFAULT_PROMPT_ASK_ATTEMPTS):
|
2017-07-25 13:30:03 -07:00
|
|
|
# Configure the Cuda SDK version to use.
|
|
|
|
|
tf_cuda_version = get_from_env_or_user_or_default(
|
|
|
|
|
environ_cp, 'TF_CUDA_VERSION', ask_cuda_version, _DEFAULT_CUDA_VERSION)
|
2018-02-16 18:22:55 -08:00
|
|
|
tf_cuda_version = reformat_version_sequence(str(tf_cuda_version), 2)
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
# Find out where the CUDA toolkit is installed
|
|
|
|
|
default_cuda_path = _DEFAULT_CUDA_PATH
|
2017-09-02 19:21:45 -07:00
|
|
|
if is_windows() or is_cygwin():
|
2017-07-25 13:30:03 -07:00
|
|
|
default_cuda_path = cygpath(
|
|
|
|
|
environ_cp.get('CUDA_PATH', _DEFAULT_CUDA_PATH_WIN))
|
|
|
|
|
elif is_linux():
|
|
|
|
|
# If the default doesn't exist, try an alternative default.
|
|
|
|
|
if (not os.path.exists(default_cuda_path)
|
|
|
|
|
) and os.path.exists(_DEFAULT_CUDA_PATH_LINUX):
|
|
|
|
|
default_cuda_path = _DEFAULT_CUDA_PATH_LINUX
|
|
|
|
|
ask_cuda_path = ('Please specify the location where CUDA %s toolkit is'
|
|
|
|
|
' installed. Refer to README.md for more details. '
|
|
|
|
|
'[Default is %s]: ') % (tf_cuda_version, default_cuda_path)
|
|
|
|
|
cuda_toolkit_path = get_from_env_or_user_or_default(
|
|
|
|
|
environ_cp, 'CUDA_TOOLKIT_PATH', ask_cuda_path, default_cuda_path)
|
2018-07-07 06:59:19 -07:00
|
|
|
if is_windows() or is_cygwin():
|
|
|
|
|
cuda_toolkit_path = cygpath(cuda_toolkit_path)
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
if is_windows():
|
2018-08-09 00:29:49 +01:00
|
|
|
cuda_rt_lib_paths = ['lib/x64/cudart.lib']
|
2017-07-25 13:30:03 -07:00
|
|
|
elif is_linux():
|
2018-08-09 00:29:49 +01:00
|
|
|
cuda_rt_lib_paths = ['%s/libcudart.so.%s' % (x, tf_cuda_version)
|
|
|
|
|
for x in ['lib64', 'lib/x86_64-linux-gnu']]
|
2017-07-25 13:30:03 -07:00
|
|
|
elif is_macos():
|
2018-08-09 00:29:49 +01:00
|
|
|
cuda_rt_lib_paths = ['lib/libcudart.%s.dylib' % tf_cuda_version]
|
2017-07-25 13:30:03 -07:00
|
|
|
|
2018-08-09 00:29:49 +01:00
|
|
|
cuda_toolkit_paths_full = [os.path.join(cuda_toolkit_path, x) for x in cuda_rt_lib_paths]
|
|
|
|
|
if any([os.path.exists(x) for x in cuda_toolkit_paths_full]):
|
2018-08-17 13:53:06 -07:00
|
|
|
break
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
# Reset and retry
|
|
|
|
|
print('Invalid path to CUDA %s toolkit. %s cannot be found' %
|
2018-09-12 10:58:24 +03:00
|
|
|
(tf_cuda_version, cuda_toolkit_paths_full))
|
2017-07-25 13:30:03 -07:00
|
|
|
environ_cp['TF_CUDA_VERSION'] = ''
|
|
|
|
|
environ_cp['CUDA_TOOLKIT_PATH'] = ''
|
|
|
|
|
|
2017-12-13 11:49:40 -08:00
|
|
|
else:
|
|
|
|
|
raise UserInputError('Invalid TF_CUDA_SETTING setting was provided %d '
|
|
|
|
|
'times in a row. Assuming to be a scripting mistake.' %
|
|
|
|
|
_DEFAULT_PROMPT_ASK_ATTEMPTS)
|
|
|
|
|
|
2017-07-25 13:30:03 -07:00
|
|
|
# Set CUDA_TOOLKIT_PATH and TF_CUDA_VERSION
|
|
|
|
|
environ_cp['CUDA_TOOLKIT_PATH'] = cuda_toolkit_path
|
|
|
|
|
write_action_env_to_bazelrc('CUDA_TOOLKIT_PATH', cuda_toolkit_path)
|
|
|
|
|
environ_cp['TF_CUDA_VERSION'] = tf_cuda_version
|
|
|
|
|
write_action_env_to_bazelrc('TF_CUDA_VERSION', tf_cuda_version)
|
|
|
|
|
|
|
|
|
|
|
2017-11-22 13:42:21 -08:00
|
|
|
def set_tf_cudnn_version(environ_cp):
|
2017-07-25 13:30:03 -07:00
|
|
|
"""Set CUDNN_INSTALL_PATH and TF_CUDNN_VERSION."""
|
|
|
|
|
ask_cudnn_version = (
|
2017-08-25 14:01:05 -07:00
|
|
|
'Please specify the cuDNN version you want to use. '
|
2017-07-25 13:30:03 -07:00
|
|
|
'[Leave empty to default to cuDNN %s.0]: ') % _DEFAULT_CUDNN_VERSION
|
|
|
|
|
|
2017-12-13 11:49:40 -08:00
|
|
|
for _ in range(_DEFAULT_PROMPT_ASK_ATTEMPTS):
|
2017-07-25 13:30:03 -07:00
|
|
|
tf_cudnn_version = get_from_env_or_user_or_default(
|
|
|
|
|
environ_cp, 'TF_CUDNN_VERSION', ask_cudnn_version,
|
|
|
|
|
_DEFAULT_CUDNN_VERSION)
|
2018-02-16 18:22:55 -08:00
|
|
|
tf_cudnn_version = reformat_version_sequence(str(tf_cudnn_version), 1)
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
default_cudnn_path = environ_cp.get('CUDA_TOOLKIT_PATH')
|
|
|
|
|
ask_cudnn_path = (r'Please specify the location where cuDNN %s library is '
|
|
|
|
|
'installed. Refer to README.md for more details. [Default'
|
2018-07-19 13:48:50 -07:00
|
|
|
' is %s]: ') % (tf_cudnn_version, default_cudnn_path)
|
2017-07-25 13:30:03 -07:00
|
|
|
cudnn_install_path = get_from_env_or_user_or_default(
|
|
|
|
|
environ_cp, 'CUDNN_INSTALL_PATH', ask_cudnn_path, default_cudnn_path)
|
|
|
|
|
|
|
|
|
|
# Result returned from "read" will be used unexpanded. That make "~"
|
|
|
|
|
# unusable. Going through one more level of expansion to handle that.
|
|
|
|
|
cudnn_install_path = os.path.realpath(
|
|
|
|
|
os.path.expanduser(cudnn_install_path))
|
2017-09-02 19:21:45 -07:00
|
|
|
if is_windows() or is_cygwin():
|
2017-07-25 13:30:03 -07:00
|
|
|
cudnn_install_path = cygpath(cudnn_install_path)
|
|
|
|
|
|
|
|
|
|
if is_windows():
|
|
|
|
|
cuda_dnn_lib_path = 'lib/x64/cudnn.lib'
|
|
|
|
|
cuda_dnn_lib_alt_path = 'lib/x64/cudnn.lib'
|
|
|
|
|
elif is_linux():
|
|
|
|
|
cuda_dnn_lib_path = 'lib64/libcudnn.so.%s' % tf_cudnn_version
|
|
|
|
|
cuda_dnn_lib_alt_path = 'libcudnn.so.%s' % tf_cudnn_version
|
|
|
|
|
elif is_macos():
|
|
|
|
|
cuda_dnn_lib_path = 'lib/libcudnn.%s.dylib' % tf_cudnn_version
|
|
|
|
|
cuda_dnn_lib_alt_path = 'libcudnn.%s.dylib' % tf_cudnn_version
|
|
|
|
|
|
|
|
|
|
cuda_dnn_lib_path_full = os.path.join(cudnn_install_path, cuda_dnn_lib_path)
|
|
|
|
|
cuda_dnn_lib_alt_path_full = os.path.join(cudnn_install_path,
|
|
|
|
|
cuda_dnn_lib_alt_path)
|
|
|
|
|
if os.path.exists(cuda_dnn_lib_path_full) or os.path.exists(
|
|
|
|
|
cuda_dnn_lib_alt_path_full):
|
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
# Try another alternative for Linux
|
|
|
|
|
if is_linux():
|
2017-08-25 14:01:05 -07:00
|
|
|
ldconfig_bin = which('ldconfig') or '/sbin/ldconfig'
|
|
|
|
|
cudnn_path_from_ldconfig = run_shell([ldconfig_bin, '-p'])
|
|
|
|
|
cudnn_path_from_ldconfig = re.search('.*libcudnn.so .* => (.*)',
|
2017-09-06 17:57:04 -07:00
|
|
|
cudnn_path_from_ldconfig)
|
|
|
|
|
if cudnn_path_from_ldconfig:
|
|
|
|
|
cudnn_path_from_ldconfig = cudnn_path_from_ldconfig.group(1)
|
|
|
|
|
if os.path.exists('%s.%s' % (cudnn_path_from_ldconfig,
|
|
|
|
|
tf_cudnn_version)):
|
|
|
|
|
cudnn_install_path = os.path.dirname(cudnn_path_from_ldconfig)
|
|
|
|
|
break
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
# Reset and Retry
|
|
|
|
|
print(
|
|
|
|
|
'Invalid path to cuDNN %s toolkit. None of the following files can be '
|
|
|
|
|
'found:' % tf_cudnn_version)
|
|
|
|
|
print(cuda_dnn_lib_path_full)
|
|
|
|
|
print(cuda_dnn_lib_alt_path_full)
|
|
|
|
|
if is_linux():
|
|
|
|
|
print('%s.%s' % (cudnn_path_from_ldconfig, tf_cudnn_version))
|
|
|
|
|
|
|
|
|
|
environ_cp['TF_CUDNN_VERSION'] = ''
|
2017-12-13 11:49:40 -08:00
|
|
|
else:
|
|
|
|
|
raise UserInputError('Invalid TF_CUDNN setting was provided %d '
|
|
|
|
|
'times in a row. Assuming to be a scripting mistake.' %
|
|
|
|
|
_DEFAULT_PROMPT_ASK_ATTEMPTS)
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
# Set CUDNN_INSTALL_PATH and TF_CUDNN_VERSION
|
|
|
|
|
environ_cp['CUDNN_INSTALL_PATH'] = cudnn_install_path
|
|
|
|
|
write_action_env_to_bazelrc('CUDNN_INSTALL_PATH', cudnn_install_path)
|
|
|
|
|
environ_cp['TF_CUDNN_VERSION'] = tf_cudnn_version
|
|
|
|
|
write_action_env_to_bazelrc('TF_CUDNN_VERSION', tf_cudnn_version)
|
|
|
|
|
|
|
|
|
|
|
2018-06-28 19:13:20 -07:00
|
|
|
def is_cuda_compatible(lib, cuda_ver, cudnn_ver):
|
|
|
|
|
"""Check compatibility between given library and cudnn/cudart libraries."""
|
|
|
|
|
ldd_bin = which('ldd') or '/usr/bin/ldd'
|
|
|
|
|
ldd_out = run_shell([ldd_bin, lib], True)
|
|
|
|
|
ldd_out = ldd_out.split(os.linesep)
|
|
|
|
|
cudnn_pattern = re.compile('.*libcudnn.so\\.?(.*) =>.*$')
|
|
|
|
|
cuda_pattern = re.compile('.*libcudart.so\\.?(.*) =>.*$')
|
|
|
|
|
cudnn = None
|
|
|
|
|
cudart = None
|
|
|
|
|
cudnn_ok = True # assume no cudnn dependency by default
|
|
|
|
|
cuda_ok = True # assume no cuda dependency by default
|
|
|
|
|
for line in ldd_out:
|
|
|
|
|
if 'libcudnn.so' in line:
|
|
|
|
|
cudnn = cudnn_pattern.search(line)
|
|
|
|
|
cudnn_ok = False
|
|
|
|
|
elif 'libcudart.so' in line:
|
|
|
|
|
cudart = cuda_pattern.search(line)
|
|
|
|
|
cuda_ok = False
|
|
|
|
|
if cudnn and len(cudnn.group(1)):
|
|
|
|
|
cudnn = convert_version_to_int(cudnn.group(1))
|
|
|
|
|
if cudart and len(cudart.group(1)):
|
|
|
|
|
cudart = convert_version_to_int(cudart.group(1))
|
|
|
|
|
if cudnn is not None:
|
|
|
|
|
cudnn_ok = (cudnn == cudnn_ver)
|
|
|
|
|
if cudart is not None:
|
|
|
|
|
cuda_ok = (cudart == cuda_ver)
|
|
|
|
|
return cudnn_ok and cuda_ok
|
|
|
|
|
|
|
|
|
|
|
2018-01-25 23:59:19 -08:00
|
|
|
def set_tf_tensorrt_install_path(environ_cp):
|
|
|
|
|
"""Set TENSORRT_INSTALL_PATH and TF_TENSORRT_VERSION.
|
|
|
|
|
|
|
|
|
|
Adapted from code contributed by Sami Kama (https://github.com/samikama).
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
environ_cp: copy of the os.environ.
|
|
|
|
|
|
|
|
|
|
Raises:
|
|
|
|
|
ValueError: if this method was called under non-Linux platform.
|
|
|
|
|
UserInputError: if user has provided invalid input multiple times.
|
|
|
|
|
"""
|
|
|
|
|
if not is_linux():
|
|
|
|
|
raise ValueError('Currently TensorRT is only supported on Linux platform.')
|
|
|
|
|
|
|
|
|
|
# Ask user whether to add TensorRT support.
|
2018-06-28 19:13:20 -07:00
|
|
|
if str(int(get_var(environ_cp, 'TF_NEED_TENSORRT', 'TensorRT',
|
|
|
|
|
False))) != '1':
|
2018-01-25 23:59:19 -08:00
|
|
|
return
|
|
|
|
|
|
|
|
|
|
for _ in range(_DEFAULT_PROMPT_ASK_ATTEMPTS):
|
|
|
|
|
ask_tensorrt_path = (r'Please specify the location where TensorRT is '
|
|
|
|
|
'installed. [Default is %s]:') % (
|
|
|
|
|
_DEFAULT_TENSORRT_PATH_LINUX)
|
|
|
|
|
trt_install_path = get_from_env_or_user_or_default(
|
|
|
|
|
environ_cp, 'TENSORRT_INSTALL_PATH', ask_tensorrt_path,
|
|
|
|
|
_DEFAULT_TENSORRT_PATH_LINUX)
|
|
|
|
|
|
|
|
|
|
# Result returned from "read" will be used unexpanded. That make "~"
|
|
|
|
|
# unusable. Going through one more level of expansion to handle that.
|
2018-06-28 19:13:20 -07:00
|
|
|
trt_install_path = os.path.realpath(os.path.expanduser(trt_install_path))
|
2018-01-25 23:59:19 -08:00
|
|
|
|
|
|
|
|
def find_libs(search_path):
|
|
|
|
|
"""Search for libnvinfer.so in "search_path"."""
|
|
|
|
|
fl = set()
|
|
|
|
|
if os.path.exists(search_path) and os.path.isdir(search_path):
|
2018-06-28 19:13:20 -07:00
|
|
|
fl.update([
|
|
|
|
|
os.path.realpath(os.path.join(search_path, x))
|
|
|
|
|
for x in os.listdir(search_path)
|
|
|
|
|
if 'libnvinfer.so' in x
|
|
|
|
|
])
|
2018-01-25 23:59:19 -08:00
|
|
|
return fl
|
|
|
|
|
|
|
|
|
|
possible_files = find_libs(trt_install_path)
|
|
|
|
|
possible_files.update(find_libs(os.path.join(trt_install_path, 'lib')))
|
|
|
|
|
possible_files.update(find_libs(os.path.join(trt_install_path, 'lib64')))
|
|
|
|
|
cuda_ver = convert_version_to_int(environ_cp['TF_CUDA_VERSION'])
|
|
|
|
|
cudnn_ver = convert_version_to_int(environ_cp['TF_CUDNN_VERSION'])
|
|
|
|
|
nvinfer_pattern = re.compile('.*libnvinfer.so.?(.*)$')
|
|
|
|
|
highest_ver = [0, None, None]
|
|
|
|
|
|
|
|
|
|
for lib_file in possible_files:
|
2018-06-28 19:13:20 -07:00
|
|
|
if is_cuda_compatible(lib_file, cuda_ver, cudnn_ver):
|
2018-03-21 12:07:51 -07:00
|
|
|
matches = nvinfer_pattern.search(lib_file)
|
|
|
|
|
if len(matches.groups()) == 0:
|
|
|
|
|
continue
|
|
|
|
|
ver_str = matches.group(1)
|
2018-01-25 23:59:19 -08:00
|
|
|
ver = convert_version_to_int(ver_str) if len(ver_str) else 0
|
|
|
|
|
if ver > highest_ver[0]:
|
|
|
|
|
highest_ver = [ver, ver_str, lib_file]
|
|
|
|
|
if highest_ver[1] is not None:
|
|
|
|
|
trt_install_path = os.path.dirname(highest_ver[2])
|
|
|
|
|
tf_tensorrt_version = highest_ver[1]
|
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
# Try another alternative from ldconfig.
|
|
|
|
|
ldconfig_bin = which('ldconfig') or '/sbin/ldconfig'
|
|
|
|
|
ldconfig_output = run_shell([ldconfig_bin, '-p'])
|
2018-06-28 19:13:20 -07:00
|
|
|
search_result = re.search('.*libnvinfer.so\\.?([0-9.]*).* => (.*)',
|
|
|
|
|
ldconfig_output)
|
2018-01-25 23:59:19 -08:00
|
|
|
if search_result:
|
|
|
|
|
libnvinfer_path_from_ldconfig = search_result.group(2)
|
|
|
|
|
if os.path.exists(libnvinfer_path_from_ldconfig):
|
2018-06-28 19:13:20 -07:00
|
|
|
if is_cuda_compatible(libnvinfer_path_from_ldconfig, cuda_ver,
|
|
|
|
|
cudnn_ver):
|
2018-01-25 23:59:19 -08:00
|
|
|
trt_install_path = os.path.dirname(libnvinfer_path_from_ldconfig)
|
|
|
|
|
tf_tensorrt_version = search_result.group(1)
|
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
# Reset and Retry
|
2018-02-22 14:24:57 -08:00
|
|
|
if possible_files:
|
|
|
|
|
print('TensorRT libraries found in one the following directories',
|
|
|
|
|
'are not compatible with selected cuda and cudnn installations')
|
|
|
|
|
print(trt_install_path)
|
|
|
|
|
print(os.path.join(trt_install_path, 'lib'))
|
|
|
|
|
print(os.path.join(trt_install_path, 'lib64'))
|
|
|
|
|
if search_result:
|
|
|
|
|
print(libnvinfer_path_from_ldconfig)
|
|
|
|
|
else:
|
|
|
|
|
print(
|
|
|
|
|
'Invalid path to TensorRT. None of the following files can be found:')
|
|
|
|
|
print(trt_install_path)
|
|
|
|
|
print(os.path.join(trt_install_path, 'lib'))
|
|
|
|
|
print(os.path.join(trt_install_path, 'lib64'))
|
|
|
|
|
if search_result:
|
|
|
|
|
print(libnvinfer_path_from_ldconfig)
|
2018-01-25 23:59:19 -08:00
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
raise UserInputError('Invalid TF_TENSORRT setting was provided %d '
|
|
|
|
|
'times in a row. Assuming to be a scripting mistake.' %
|
|
|
|
|
_DEFAULT_PROMPT_ASK_ATTEMPTS)
|
|
|
|
|
|
|
|
|
|
# Set TENSORRT_INSTALL_PATH and TF_TENSORRT_VERSION
|
|
|
|
|
environ_cp['TENSORRT_INSTALL_PATH'] = trt_install_path
|
|
|
|
|
write_action_env_to_bazelrc('TENSORRT_INSTALL_PATH', trt_install_path)
|
|
|
|
|
environ_cp['TF_TENSORRT_VERSION'] = tf_tensorrt_version
|
|
|
|
|
write_action_env_to_bazelrc('TF_TENSORRT_VERSION', tf_tensorrt_version)
|
|
|
|
|
|
|
|
|
|
|
2018-04-05 03:09:27 -07:00
|
|
|
def set_tf_nccl_install_path(environ_cp):
|
|
|
|
|
"""Set NCCL_INSTALL_PATH and TF_NCCL_VERSION.
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
environ_cp: copy of the os.environ.
|
|
|
|
|
|
|
|
|
|
Raises:
|
|
|
|
|
ValueError: if this method was called under non-Linux platform.
|
|
|
|
|
UserInputError: if user has provided invalid input multiple times.
|
|
|
|
|
"""
|
|
|
|
|
if not is_linux():
|
|
|
|
|
raise ValueError('Currently NCCL is only supported on Linux platforms.')
|
|
|
|
|
|
|
|
|
|
ask_nccl_version = (
|
2018-07-13 12:46:24 -07:00
|
|
|
'Please specify the NCCL version you want to use. If NCCL %s is not '
|
|
|
|
|
'installed, then you can use version 1.3 that can be fetched '
|
|
|
|
|
'automatically but it may have worse performance with multiple GPUs. '
|
|
|
|
|
'[Default is %s]: ') % (_DEFAULT_NCCL_VERSION, _DEFAULT_NCCL_VERSION)
|
2018-04-05 03:09:27 -07:00
|
|
|
|
|
|
|
|
for _ in range(_DEFAULT_PROMPT_ASK_ATTEMPTS):
|
|
|
|
|
tf_nccl_version = get_from_env_or_user_or_default(
|
|
|
|
|
environ_cp, 'TF_NCCL_VERSION', ask_nccl_version, _DEFAULT_NCCL_VERSION)
|
|
|
|
|
tf_nccl_version = reformat_version_sequence(str(tf_nccl_version), 1)
|
|
|
|
|
|
|
|
|
|
if tf_nccl_version == '1':
|
|
|
|
|
break # No need to get install path, NCCL 1 is a GitHub repo.
|
|
|
|
|
|
|
|
|
|
# TODO(csigg): Look with ldconfig first if we can find the library in paths
|
|
|
|
|
# like /usr/lib/x86_64-linux-gnu and the header file in the corresponding
|
|
|
|
|
# include directory. This is where the NCCL .deb packages install them.
|
|
|
|
|
# Then ask the user if we should use that. Instead of a single
|
|
|
|
|
# NCCL_INSTALL_PATH, pass separate NCCL_LIB_PATH and NCCL_HDR_PATH to
|
|
|
|
|
# nccl_configure.bzl
|
|
|
|
|
default_nccl_path = environ_cp.get('CUDA_TOOLKIT_PATH')
|
|
|
|
|
ask_nccl_path = (r'Please specify the location where NCCL %s library is '
|
|
|
|
|
'installed. Refer to README.md for more details. [Default '
|
|
|
|
|
'is %s]:') % (tf_nccl_version, default_nccl_path)
|
|
|
|
|
nccl_install_path = get_from_env_or_user_or_default(
|
|
|
|
|
environ_cp, 'NCCL_INSTALL_PATH', ask_nccl_path, default_nccl_path)
|
|
|
|
|
|
|
|
|
|
# Result returned from "read" will be used unexpanded. That make "~"
|
|
|
|
|
# unusable. Going through one more level of expansion to handle that.
|
|
|
|
|
nccl_install_path = os.path.realpath(os.path.expanduser(nccl_install_path))
|
|
|
|
|
if is_windows() or is_cygwin():
|
|
|
|
|
nccl_install_path = cygpath(nccl_install_path)
|
|
|
|
|
|
|
|
|
|
if is_windows():
|
|
|
|
|
nccl_lib_path = 'lib/x64/nccl.lib'
|
|
|
|
|
elif is_linux():
|
|
|
|
|
nccl_lib_path = 'lib/libnccl.so.%s' % tf_nccl_version
|
|
|
|
|
elif is_macos():
|
|
|
|
|
nccl_lib_path = 'lib/libnccl.%s.dylib' % tf_nccl_version
|
|
|
|
|
|
|
|
|
|
nccl_lib_path = os.path.join(nccl_install_path, nccl_lib_path)
|
|
|
|
|
nccl_hdr_path = os.path.join(nccl_install_path, 'include/nccl.h')
|
|
|
|
|
if os.path.exists(nccl_lib_path) and os.path.exists(nccl_hdr_path):
|
|
|
|
|
# Set NCCL_INSTALL_PATH
|
|
|
|
|
environ_cp['NCCL_INSTALL_PATH'] = nccl_install_path
|
|
|
|
|
write_action_env_to_bazelrc('NCCL_INSTALL_PATH', nccl_install_path)
|
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
# Reset and Retry
|
|
|
|
|
print('Invalid path to NCCL %s toolkit, %s or %s not found. Please use the '
|
|
|
|
|
'O/S agnostic package of NCCL 2' % (tf_nccl_version, nccl_lib_path,
|
|
|
|
|
nccl_hdr_path))
|
|
|
|
|
|
|
|
|
|
environ_cp['TF_NCCL_VERSION'] = ''
|
|
|
|
|
else:
|
|
|
|
|
raise UserInputError('Invalid TF_NCCL setting was provided %d '
|
|
|
|
|
'times in a row. Assuming to be a scripting mistake.' %
|
|
|
|
|
_DEFAULT_PROMPT_ASK_ATTEMPTS)
|
|
|
|
|
|
|
|
|
|
# Set TF_NCCL_VERSION
|
|
|
|
|
environ_cp['TF_NCCL_VERSION'] = tf_nccl_version
|
|
|
|
|
write_action_env_to_bazelrc('TF_NCCL_VERSION', tf_nccl_version)
|
|
|
|
|
|
|
|
|
|
|
2017-07-25 13:30:03 -07:00
|
|
|
def get_native_cuda_compute_capabilities(environ_cp):
|
|
|
|
|
"""Get native cuda compute capabilities.
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
environ_cp: copy of the os.environ.
|
|
|
|
|
Returns:
|
|
|
|
|
string of native cuda compute capabilities, separated by comma.
|
|
|
|
|
"""
|
|
|
|
|
device_query_bin = os.path.join(
|
|
|
|
|
environ_cp.get('CUDA_TOOLKIT_PATH'), 'extras/demo_suite/deviceQuery')
|
2017-08-25 14:01:05 -07:00
|
|
|
if os.path.isfile(device_query_bin) and os.access(device_query_bin, os.X_OK):
|
|
|
|
|
try:
|
|
|
|
|
output = run_shell(device_query_bin).split('\n')
|
|
|
|
|
pattern = re.compile('[0-9]*\\.[0-9]*')
|
|
|
|
|
output = [pattern.search(x) for x in output if 'Capability' in x]
|
|
|
|
|
output = ','.join(x.group() for x in output if x is not None)
|
|
|
|
|
except subprocess.CalledProcessError:
|
|
|
|
|
output = ''
|
|
|
|
|
else:
|
2017-07-25 13:30:03 -07:00
|
|
|
output = ''
|
|
|
|
|
return output
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def set_tf_cuda_compute_capabilities(environ_cp):
|
|
|
|
|
"""Set TF_CUDA_COMPUTE_CAPABILITIES."""
|
|
|
|
|
while True:
|
|
|
|
|
native_cuda_compute_capabilities = get_native_cuda_compute_capabilities(
|
|
|
|
|
environ_cp)
|
|
|
|
|
if not native_cuda_compute_capabilities:
|
|
|
|
|
default_cuda_compute_capabilities = _DEFAULT_CUDA_COMPUTE_CAPABILITIES
|
|
|
|
|
else:
|
|
|
|
|
default_cuda_compute_capabilities = native_cuda_compute_capabilities
|
|
|
|
|
|
|
|
|
|
ask_cuda_compute_capabilities = (
|
|
|
|
|
'Please specify a list of comma-separated '
|
|
|
|
|
'Cuda compute capabilities you want to '
|
|
|
|
|
'build with.\nYou can find the compute '
|
|
|
|
|
'capability of your device at: '
|
|
|
|
|
'https://developer.nvidia.com/cuda-gpus.\nPlease'
|
|
|
|
|
' note that each additional compute '
|
|
|
|
|
'capability significantly increases your '
|
2018-07-19 13:48:50 -07:00
|
|
|
'build time and binary size. [Default is: %s]: ' %
|
2017-07-25 13:30:03 -07:00
|
|
|
default_cuda_compute_capabilities)
|
|
|
|
|
tf_cuda_compute_capabilities = get_from_env_or_user_or_default(
|
|
|
|
|
environ_cp, 'TF_CUDA_COMPUTE_CAPABILITIES',
|
|
|
|
|
ask_cuda_compute_capabilities, default_cuda_compute_capabilities)
|
|
|
|
|
# Check whether all capabilities from the input is valid
|
|
|
|
|
all_valid = True
|
2018-04-30 22:30:58 -05:00
|
|
|
# Remove all whitespace characters before splitting the string
|
2018-06-05 17:47:19 -07:00
|
|
|
# that users may insert by accident, as this will result in error
|
2018-04-30 22:30:58 -05:00
|
|
|
tf_cuda_compute_capabilities = ''.join(tf_cuda_compute_capabilities.split())
|
2017-07-25 13:30:03 -07:00
|
|
|
for compute_capability in tf_cuda_compute_capabilities.split(','):
|
Merge changes from github.
END_PUBLIC
---
Commit 575bd01d4 authored by Vijay Vasudevan<vrv@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove /replica:0 declaration in device functions and allow them
to be freely bound based on cluster names present.
When more than one value matches, it will choose the first
lexicographically available device that matches the specification,
which in practice will do pretty much the same thing as hardcoding
/replica:0.
PiperOrigin-RevId: 165766815
---
Commit d685bbc54 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Benchmarks with backprop enabled (and removes overhead).
Before:
np.array([[3]]) took 1.50us (30000 iterations)
Tensor([[3]]) took 16.30us (30000 iterations)
MatMul [2, 2]: np.dot took 0.61us (30000 iterations)
MatMul [2, 2]: tf.matmul took 60.53us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 25.72us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.82us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 45.70us (30000 iterations)
MatMul [100, 784]: np.dot took 383.32us (1000 iterations)
MatMul [100, 784]: tf.matmul took 350.35us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 315.97us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 249.42us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 280.95us (1000 iterations)
If backprop is enabled:
np.array([[3]]) took 0.83us (30000 iterations)
Tensor([[3]]) took 15.21us (30000 iterations)
MatMul [2, 2]: np.dot took 0.63us (30000 iterations)
MatMul [2, 2]: tf.matmul took 76.31us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 38.66us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.31us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 51.96us (30000 iterations)
MatMul [100, 784]: np.dot took 378.34us (1000 iterations)
MatMul [100, 784]: tf.matmul took 352.09us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 364.28us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 350.68us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 377.19us (1000 iterations)
After:
np.array([[3]]) took 0.86us (30000 iterations)
Tensor([[3]]) took 15.19us (30000 iterations)
MatMul [2, 2]: np.dot took 0.60us (30000 iterations)
MatMul [2, 2]: tf.matmul took 64.51us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 28.34us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.38us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 48.50us (30000 iterations)
MatMul [100, 784]: np.dot took 475.27us (1000 iterations)
MatMul [100, 784]: tf.matmul took 399.50us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 307.80us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 272.83us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 350.06us (1000 iterations)
PiperOrigin-RevId: 165765641
---
Commit d902babbd authored by David Majnemer<majnemer@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Algebraic simplifier incorrectly transformed convolutions into bitcasts
PiperOrigin-RevId: 165765575
---
Commit 8e78e10ef authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
disable test temporarily
PiperOrigin-RevId: 165763204
---
Commit a271c37db authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Small improvements to the arithmetic optimizer
PiperOrigin-RevId: 165760972
---
Commit b6409594d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Convert some tests to cover both eager and graph.
PiperOrigin-RevId: 165760364
---
Commit 5ead76420 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Reduce XLA compile time by ~7% for a convolutional image model:
* Added CompactPointerSet<T>, which is optimized for set size <= 1.
* Changed expensive CHECKs to DCHECKS in buffer_assignment.cc
* Reserve space in DFS state array before starting DFS.
* Use unsigned arithmetic in DFS state maintenance.
* HloInstruction:
- Moved frequently used fields to start for better cache locality.
- Use InlinedVector instead of vector for operand array.
- Use InlinedVector instead of vector for DFS stack.
* Pre-compute "is array" and "is tuple" for LogicalBuffer.
* PointsToSet:
- Combine two ShapeTrees into one.
- Use CompactPointerSet instead of std::set to hold sources.
- Use CompactPointerSet instead of std::set to hold flattened buffers.
* ShapeTree: use unique_ptr instead of optional for shape storage
(reduces size and destruction overhead).
* Add proper const qualifiers to some FlatSet iterator methods.
Co-author=jeff
PiperOrigin-RevId: 165759117
---
Commit a0544b0b8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make TPU symbols more easily accessible from contrib.
PiperOrigin-RevId: 165753322
---
Commit cdc08afbb authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Slightly relax numeric tolerance for sinlge precision tests of matrix_solve_ls (and tighten it for double precision).
PiperOrigin-RevId: 165750936
---
Commit eebcc861a authored by Jianwei Xie<xiejw@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed the race condition between multi eval step increments.
PiperOrigin-RevId: 165750595
---
Commit bbc0b8471 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 165748384
---
Commit 65f87c967 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Change device string in RecvNodeDescriptor in VirtualScheduler from const
reference to const as the RecvNodeDescriptor (and cached_recv_nodes map)
outlives device string from the NodeDef.
PiperOrigin-RevId: 165748244
---
Commit 57b0276cf authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165747467
---
Commit 64e54423b authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix nested dictionary handling in dataset elements.
Backports recent changes to the core version of the nest.py library.
Fixes #12372.
PiperOrigin-RevId: 165746517
---
Commit 378463ae8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make tf.eye accept Python integer shapes and avoid generating unnecessary shape handling ops.
Clean up test and add tests with placeholders.
PiperOrigin-RevId: 165746090
---
Commit 109ecf823 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add support for complex in matrix_solve_ls_op.
Split into separate files for each data type to speed up build.
PiperOrigin-RevId: 165744539
---
Commit 51441302d authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change.
PiperOrigin-RevId: 165737455
---
Commit d0cb32c2a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Docstring for ResourceVariable.
PiperOrigin-RevId: 165735441
---
Commit 32f4c5b6e authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Add IsFinite op in tf2xla.
PiperOrigin-RevId: 165734702
---
Commit 5f5c3eb0a authored by Mark Daoust<markdaoust@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Move "supervisor.md" from programmer's guide to api_guides.
PiperOrigin-RevId: 165732026
---
Commit d001b58de authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix handling of multi-output tf.py_func() in Dataset.map().
If the `map_func` returns a list of tensors, the current code will
attempt to stack it into a single tensor and raise an unintuitive
error. Some multi-output ops (such as `tf.py_func()`) return lists of
typically-not-stackable tensors. This change treats lists returned
from `map_func` as tuples; users who were relying on this
auto-stacking behavior should manually call `tf.stack()` (or
`tf.convert_to_tensor()`) on the list being returned.
Fixes #12396.
PiperOrigin-RevId: 165731970
---
Commit e6c60fb36 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix flakyness, sometimes the op takes ms to run.
PiperOrigin-RevId: 165728705
---
Commit 360bff8ae authored by Ali Yahya<alive@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Makes tape.watch() work with ResourceVariables.
To this end, also adds a property, `device`, to TensorNode.
PiperOrigin-RevId: 165726368
---
Commit 80bd004cd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implements SVDF model for keyword spotting tutorial.
PiperOrigin-RevId: 165725938
---
Commit aaabf6b90 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix bug: Using a ComputationDataHandle from the wrong ComputationBuilder.
PiperOrigin-RevId: 165724017
---
Commit 107d165d9 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Use 2-arg TraceMe constructor to prevent unnecessary StrCat computation when
tracing is disabled.
PiperOrigin-RevId: 165722280
---
Commit 7d01f89cc authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Android demo app for speech recognition
PiperOrigin-RevId: 165714459
---
Commit a6729325a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Deletes convert_n_to_eager_tensor. Moves convert_to_eager_tensor to constant_op.
PiperOrigin-RevId: 165704074
---
Commit 573b303ac authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BUILD cleanup in tensorflow/core/kernels
PiperOrigin-RevId: 165688864
---
Commit 711be6adc authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
`Dataset.from_generator()` constructs a dataset from a Python generator.
With this change, it becomes possible to use a Python generator as the source
dataset for a `tf.contrib.data` input pipeline. This enables easier integration
with non-TensorFlow data sources. The generator can yield a nested structure of
NumPy arrays, or values convertible to NumPy arrays.
This addresses a concern raised in issue #7951.
PiperOrigin-RevId: 165663857
---
Commit 00594ecdd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
New landing page and leftnav for Programmer's Guide.
PiperOrigin-RevId: 165660897
---
Commit 7359fec79 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implement Batchnorm Inference by expanding them into smaller ops.
1. Add batch norm inference support in batchnorm_rewriter
2. Connect xla's batchnorm inference to tf's FusedBatchNorm
RELNOTES: n/a
PiperOrigin-RevId: 165655351
---
Commit f0da8bf56 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[Rematerialization] Reconsider to remat operations with control dependencies
We added a conservartive logic to not rematerialize operations with control dependencies since the rematerialized operations could result in undesired ordering. However, we now realize that when we remat an operation, we also copy the dependencies of them, which guarantees the rematerialized operation has the same constraint as the original operation.
PiperOrigin-RevId: 165654629
---
Commit a1225879c authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Propagate error code in computation replay tool.
PiperOrigin-RevId: 165654497
---
Commit 513def0bb authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed BuildOpInfoWithoutDevice
PiperOrigin-RevId: 165653933
---
Commit d7e425f0b authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix linear algebra benchmarks.
PiperOrigin-RevId: 165653891
---
Commit 465c40819 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix the shape information propagation for Enter op.
PiperOrigin-RevId: 165653579
---
Commit c0198fd8d authored by Derek Murray<derek.murray@gmail.com>
Committed by gunan<gunan@google.com>:
[CMake] Add missing dependencies on boosted_trees protos and other fixes (#12315)
* [CMake] Add missing dependencies
* Avoid rebuilding boosted_trees protos for Python.
* Add GPU implementation ZeroInitializerOp to the CMake build.
---
Commit 641943fd7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165652758
---
Commit e31346452 authored by Jonathan Hseu<jhseu@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
TPUEstimator: Fix the outfeed thread join.
PiperOrigin-RevId: 165651781
---
Commit 565a9d350 authored by Vijay Vasudevan<vrv@google.com>
Committed by Andrew Harp<andrewharp@users.noreply.github.com>:
Add missing 'type' keyword to ArgumentParser add_argument (#12275)
Fixes #12210
---
Commit 19a55725a authored by Rohan Jain<rohanj@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Allowing functions to run across devices. This change expands the ProcessFunctionLibraryRuntime library to Instantiate and Run functions on different devices. When a FunctionLibraryRuntime encounters a function with a target that is another device, it delegates Instantiate() and Run() calls to the ProcessFunctionLibraryRuntime.
This change also moves the table_ containing all function instantiations to the PFLR instead of the FunctionLibraryRuntime.
PiperOrigin-RevId: 165651194
---
Commit 8c0853db7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a test for negative and zero pow() input.
PiperOrigin-RevId: 165650096
---
Commit a3c4e980e authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed input shape for freezing audio graphs
PiperOrigin-RevId: 165649546
---
Commit 9b9e5989d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a call_logit_fn utility for logit_fn's, similar to Estimator's _call_model_fn.
PiperOrigin-RevId: 165649388
---
Commit 4ff1f4442 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove the script as well if building tf_nightly.
---
Commit 373d78987 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Adding the break.
---
Commit 0139ac983 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove tensorboard as a required package if we are building tf_nightly.
---
Commit a92bd5d5c authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BEGIN_PUBLIC
Automated g4 rollback of changelist 165630063
PiperOrigin-RevId: 165957821
2017-08-21 12:10:44 -07:00
|
|
|
m = re.match('[0-9]+.[0-9]+', compute_capability)
|
|
|
|
|
if not m:
|
2017-07-25 13:30:03 -07:00
|
|
|
print('Invalid compute capability: ' % compute_capability)
|
|
|
|
|
all_valid = False
|
Merge changes from github.
END_PUBLIC
---
Commit 575bd01d4 authored by Vijay Vasudevan<vrv@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove /replica:0 declaration in device functions and allow them
to be freely bound based on cluster names present.
When more than one value matches, it will choose the first
lexicographically available device that matches the specification,
which in practice will do pretty much the same thing as hardcoding
/replica:0.
PiperOrigin-RevId: 165766815
---
Commit d685bbc54 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Benchmarks with backprop enabled (and removes overhead).
Before:
np.array([[3]]) took 1.50us (30000 iterations)
Tensor([[3]]) took 16.30us (30000 iterations)
MatMul [2, 2]: np.dot took 0.61us (30000 iterations)
MatMul [2, 2]: tf.matmul took 60.53us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 25.72us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.82us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 45.70us (30000 iterations)
MatMul [100, 784]: np.dot took 383.32us (1000 iterations)
MatMul [100, 784]: tf.matmul took 350.35us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 315.97us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 249.42us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 280.95us (1000 iterations)
If backprop is enabled:
np.array([[3]]) took 0.83us (30000 iterations)
Tensor([[3]]) took 15.21us (30000 iterations)
MatMul [2, 2]: np.dot took 0.63us (30000 iterations)
MatMul [2, 2]: tf.matmul took 76.31us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 38.66us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.31us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 51.96us (30000 iterations)
MatMul [100, 784]: np.dot took 378.34us (1000 iterations)
MatMul [100, 784]: tf.matmul took 352.09us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 364.28us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 350.68us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 377.19us (1000 iterations)
After:
np.array([[3]]) took 0.86us (30000 iterations)
Tensor([[3]]) took 15.19us (30000 iterations)
MatMul [2, 2]: np.dot took 0.60us (30000 iterations)
MatMul [2, 2]: tf.matmul took 64.51us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 28.34us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.38us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 48.50us (30000 iterations)
MatMul [100, 784]: np.dot took 475.27us (1000 iterations)
MatMul [100, 784]: tf.matmul took 399.50us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 307.80us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 272.83us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 350.06us (1000 iterations)
PiperOrigin-RevId: 165765641
---
Commit d902babbd authored by David Majnemer<majnemer@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Algebraic simplifier incorrectly transformed convolutions into bitcasts
PiperOrigin-RevId: 165765575
---
Commit 8e78e10ef authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
disable test temporarily
PiperOrigin-RevId: 165763204
---
Commit a271c37db authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Small improvements to the arithmetic optimizer
PiperOrigin-RevId: 165760972
---
Commit b6409594d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Convert some tests to cover both eager and graph.
PiperOrigin-RevId: 165760364
---
Commit 5ead76420 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Reduce XLA compile time by ~7% for a convolutional image model:
* Added CompactPointerSet<T>, which is optimized for set size <= 1.
* Changed expensive CHECKs to DCHECKS in buffer_assignment.cc
* Reserve space in DFS state array before starting DFS.
* Use unsigned arithmetic in DFS state maintenance.
* HloInstruction:
- Moved frequently used fields to start for better cache locality.
- Use InlinedVector instead of vector for operand array.
- Use InlinedVector instead of vector for DFS stack.
* Pre-compute "is array" and "is tuple" for LogicalBuffer.
* PointsToSet:
- Combine two ShapeTrees into one.
- Use CompactPointerSet instead of std::set to hold sources.
- Use CompactPointerSet instead of std::set to hold flattened buffers.
* ShapeTree: use unique_ptr instead of optional for shape storage
(reduces size and destruction overhead).
* Add proper const qualifiers to some FlatSet iterator methods.
Co-author=jeff
PiperOrigin-RevId: 165759117
---
Commit a0544b0b8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make TPU symbols more easily accessible from contrib.
PiperOrigin-RevId: 165753322
---
Commit cdc08afbb authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Slightly relax numeric tolerance for sinlge precision tests of matrix_solve_ls (and tighten it for double precision).
PiperOrigin-RevId: 165750936
---
Commit eebcc861a authored by Jianwei Xie<xiejw@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed the race condition between multi eval step increments.
PiperOrigin-RevId: 165750595
---
Commit bbc0b8471 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 165748384
---
Commit 65f87c967 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Change device string in RecvNodeDescriptor in VirtualScheduler from const
reference to const as the RecvNodeDescriptor (and cached_recv_nodes map)
outlives device string from the NodeDef.
PiperOrigin-RevId: 165748244
---
Commit 57b0276cf authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165747467
---
Commit 64e54423b authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix nested dictionary handling in dataset elements.
Backports recent changes to the core version of the nest.py library.
Fixes #12372.
PiperOrigin-RevId: 165746517
---
Commit 378463ae8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make tf.eye accept Python integer shapes and avoid generating unnecessary shape handling ops.
Clean up test and add tests with placeholders.
PiperOrigin-RevId: 165746090
---
Commit 109ecf823 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add support for complex in matrix_solve_ls_op.
Split into separate files for each data type to speed up build.
PiperOrigin-RevId: 165744539
---
Commit 51441302d authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change.
PiperOrigin-RevId: 165737455
---
Commit d0cb32c2a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Docstring for ResourceVariable.
PiperOrigin-RevId: 165735441
---
Commit 32f4c5b6e authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Add IsFinite op in tf2xla.
PiperOrigin-RevId: 165734702
---
Commit 5f5c3eb0a authored by Mark Daoust<markdaoust@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Move "supervisor.md" from programmer's guide to api_guides.
PiperOrigin-RevId: 165732026
---
Commit d001b58de authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix handling of multi-output tf.py_func() in Dataset.map().
If the `map_func` returns a list of tensors, the current code will
attempt to stack it into a single tensor and raise an unintuitive
error. Some multi-output ops (such as `tf.py_func()`) return lists of
typically-not-stackable tensors. This change treats lists returned
from `map_func` as tuples; users who were relying on this
auto-stacking behavior should manually call `tf.stack()` (or
`tf.convert_to_tensor()`) on the list being returned.
Fixes #12396.
PiperOrigin-RevId: 165731970
---
Commit e6c60fb36 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix flakyness, sometimes the op takes ms to run.
PiperOrigin-RevId: 165728705
---
Commit 360bff8ae authored by Ali Yahya<alive@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Makes tape.watch() work with ResourceVariables.
To this end, also adds a property, `device`, to TensorNode.
PiperOrigin-RevId: 165726368
---
Commit 80bd004cd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implements SVDF model for keyword spotting tutorial.
PiperOrigin-RevId: 165725938
---
Commit aaabf6b90 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix bug: Using a ComputationDataHandle from the wrong ComputationBuilder.
PiperOrigin-RevId: 165724017
---
Commit 107d165d9 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Use 2-arg TraceMe constructor to prevent unnecessary StrCat computation when
tracing is disabled.
PiperOrigin-RevId: 165722280
---
Commit 7d01f89cc authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Android demo app for speech recognition
PiperOrigin-RevId: 165714459
---
Commit a6729325a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Deletes convert_n_to_eager_tensor. Moves convert_to_eager_tensor to constant_op.
PiperOrigin-RevId: 165704074
---
Commit 573b303ac authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BUILD cleanup in tensorflow/core/kernels
PiperOrigin-RevId: 165688864
---
Commit 711be6adc authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
`Dataset.from_generator()` constructs a dataset from a Python generator.
With this change, it becomes possible to use a Python generator as the source
dataset for a `tf.contrib.data` input pipeline. This enables easier integration
with non-TensorFlow data sources. The generator can yield a nested structure of
NumPy arrays, or values convertible to NumPy arrays.
This addresses a concern raised in issue #7951.
PiperOrigin-RevId: 165663857
---
Commit 00594ecdd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
New landing page and leftnav for Programmer's Guide.
PiperOrigin-RevId: 165660897
---
Commit 7359fec79 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implement Batchnorm Inference by expanding them into smaller ops.
1. Add batch norm inference support in batchnorm_rewriter
2. Connect xla's batchnorm inference to tf's FusedBatchNorm
RELNOTES: n/a
PiperOrigin-RevId: 165655351
---
Commit f0da8bf56 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[Rematerialization] Reconsider to remat operations with control dependencies
We added a conservartive logic to not rematerialize operations with control dependencies since the rematerialized operations could result in undesired ordering. However, we now realize that when we remat an operation, we also copy the dependencies of them, which guarantees the rematerialized operation has the same constraint as the original operation.
PiperOrigin-RevId: 165654629
---
Commit a1225879c authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Propagate error code in computation replay tool.
PiperOrigin-RevId: 165654497
---
Commit 513def0bb authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed BuildOpInfoWithoutDevice
PiperOrigin-RevId: 165653933
---
Commit d7e425f0b authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix linear algebra benchmarks.
PiperOrigin-RevId: 165653891
---
Commit 465c40819 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix the shape information propagation for Enter op.
PiperOrigin-RevId: 165653579
---
Commit c0198fd8d authored by Derek Murray<derek.murray@gmail.com>
Committed by gunan<gunan@google.com>:
[CMake] Add missing dependencies on boosted_trees protos and other fixes (#12315)
* [CMake] Add missing dependencies
* Avoid rebuilding boosted_trees protos for Python.
* Add GPU implementation ZeroInitializerOp to the CMake build.
---
Commit 641943fd7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 165652758
---
Commit e31346452 authored by Jonathan Hseu<jhseu@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
TPUEstimator: Fix the outfeed thread join.
PiperOrigin-RevId: 165651781
---
Commit 565a9d350 authored by Vijay Vasudevan<vrv@google.com>
Committed by Andrew Harp<andrewharp@users.noreply.github.com>:
Add missing 'type' keyword to ArgumentParser add_argument (#12275)
Fixes #12210
---
Commit 19a55725a authored by Rohan Jain<rohanj@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Allowing functions to run across devices. This change expands the ProcessFunctionLibraryRuntime library to Instantiate and Run functions on different devices. When a FunctionLibraryRuntime encounters a function with a target that is another device, it delegates Instantiate() and Run() calls to the ProcessFunctionLibraryRuntime.
This change also moves the table_ containing all function instantiations to the PFLR instead of the FunctionLibraryRuntime.
PiperOrigin-RevId: 165651194
---
Commit 8c0853db7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a test for negative and zero pow() input.
PiperOrigin-RevId: 165650096
---
Commit a3c4e980e authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed input shape for freezing audio graphs
PiperOrigin-RevId: 165649546
---
Commit 9b9e5989d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a call_logit_fn utility for logit_fn's, similar to Estimator's _call_model_fn.
PiperOrigin-RevId: 165649388
---
Commit 4ff1f4442 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove the script as well if building tf_nightly.
---
Commit 373d78987 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Adding the break.
---
Commit 0139ac983 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove tensorboard as a required package if we are building tf_nightly.
---
Commit a92bd5d5c authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BEGIN_PUBLIC
Automated g4 rollback of changelist 165630063
PiperOrigin-RevId: 165957821
2017-08-21 12:10:44 -07:00
|
|
|
else:
|
|
|
|
|
ver = int(m.group(0).split('.')[0])
|
|
|
|
|
if ver < 3:
|
|
|
|
|
print('Only compute capabilities 3.0 or higher are supported.')
|
|
|
|
|
all_valid = False
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
if all_valid:
|
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
# Reset and Retry
|
|
|
|
|
environ_cp['TF_CUDA_COMPUTE_CAPABILITIES'] = ''
|
|
|
|
|
|
|
|
|
|
# Set TF_CUDA_COMPUTE_CAPABILITIES
|
|
|
|
|
environ_cp['TF_CUDA_COMPUTE_CAPABILITIES'] = tf_cuda_compute_capabilities
|
|
|
|
|
write_action_env_to_bazelrc('TF_CUDA_COMPUTE_CAPABILITIES',
|
|
|
|
|
tf_cuda_compute_capabilities)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def set_other_cuda_vars(environ_cp):
|
|
|
|
|
"""Set other CUDA related variables."""
|
2018-07-11 04:52:49 -07:00
|
|
|
# If CUDA is enabled, always use GPU during build and test.
|
|
|
|
|
if environ_cp.get('TF_CUDA_CLANG') == '1':
|
|
|
|
|
write_to_bazelrc('build --config=cuda_clang')
|
|
|
|
|
write_to_bazelrc('test --config=cuda_clang')
|
2017-07-25 13:30:03 -07:00
|
|
|
else:
|
2018-07-11 04:52:49 -07:00
|
|
|
write_to_bazelrc('build --config=cuda')
|
|
|
|
|
write_to_bazelrc('test --config=cuda')
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def set_host_cxx_compiler(environ_cp):
|
|
|
|
|
"""Set HOST_CXX_COMPILER."""
|
2017-08-25 14:01:05 -07:00
|
|
|
default_cxx_host_compiler = which('g++') or ''
|
2017-07-25 13:30:03 -07:00
|
|
|
|
2017-12-05 11:59:17 -08:00
|
|
|
host_cxx_compiler = prompt_loop_or_load_from_env(
|
|
|
|
|
environ_cp,
|
|
|
|
|
var_name='HOST_CXX_COMPILER',
|
|
|
|
|
var_default=default_cxx_host_compiler,
|
|
|
|
|
ask_for_var=('Please specify which C++ compiler should be used as the '
|
|
|
|
|
'host C++ compiler.'),
|
|
|
|
|
check_success=os.path.exists,
|
|
|
|
|
error_msg='Invalid C++ compiler path. %s cannot be found.',
|
|
|
|
|
)
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
write_action_env_to_bazelrc('HOST_CXX_COMPILER', host_cxx_compiler)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def set_host_c_compiler(environ_cp):
|
|
|
|
|
"""Set HOST_C_COMPILER."""
|
2017-08-25 14:01:05 -07:00
|
|
|
default_c_host_compiler = which('gcc') or ''
|
2017-07-25 13:30:03 -07:00
|
|
|
|
2017-12-05 11:59:17 -08:00
|
|
|
host_c_compiler = prompt_loop_or_load_from_env(
|
|
|
|
|
environ_cp,
|
|
|
|
|
var_name='HOST_C_COMPILER',
|
|
|
|
|
var_default=default_c_host_compiler,
|
2018-03-12 19:33:52 -07:00
|
|
|
ask_for_var=('Please specify which C compiler should be used as the host '
|
2017-12-05 11:59:17 -08:00
|
|
|
'C compiler.'),
|
|
|
|
|
check_success=os.path.exists,
|
|
|
|
|
error_msg='Invalid C compiler path. %s cannot be found.',
|
|
|
|
|
)
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
write_action_env_to_bazelrc('HOST_C_COMPILER', host_c_compiler)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def set_computecpp_toolkit_path(environ_cp):
|
|
|
|
|
"""Set COMPUTECPP_TOOLKIT_PATH."""
|
|
|
|
|
|
2017-12-05 11:59:17 -08:00
|
|
|
def toolkit_exists(toolkit_path):
|
|
|
|
|
"""Check if a computecpp toolkit path is valid."""
|
2017-07-25 13:30:03 -07:00
|
|
|
if is_linux():
|
|
|
|
|
sycl_rt_lib_path = 'lib/libComputeCpp.so'
|
|
|
|
|
else:
|
|
|
|
|
sycl_rt_lib_path = ''
|
|
|
|
|
|
2017-12-05 11:59:17 -08:00
|
|
|
sycl_rt_lib_path_full = os.path.join(toolkit_path,
|
2017-07-25 13:30:03 -07:00
|
|
|
sycl_rt_lib_path)
|
2017-12-05 11:59:17 -08:00
|
|
|
exists = os.path.exists(sycl_rt_lib_path_full)
|
|
|
|
|
if not exists:
|
|
|
|
|
print('Invalid SYCL %s library path. %s cannot be found' %
|
|
|
|
|
(_TF_OPENCL_VERSION, sycl_rt_lib_path_full))
|
|
|
|
|
return exists
|
2017-07-25 13:30:03 -07:00
|
|
|
|
2017-12-05 11:59:17 -08:00
|
|
|
computecpp_toolkit_path = prompt_loop_or_load_from_env(
|
|
|
|
|
environ_cp,
|
|
|
|
|
var_name='COMPUTECPP_TOOLKIT_PATH',
|
|
|
|
|
var_default=_DEFAULT_COMPUTECPP_TOOLKIT_PATH,
|
|
|
|
|
ask_for_var=(
|
|
|
|
|
'Please specify the location where ComputeCpp for SYCL %s is '
|
|
|
|
|
'installed.' % _TF_OPENCL_VERSION),
|
|
|
|
|
check_success=toolkit_exists,
|
|
|
|
|
error_msg='Invalid SYCL compiler path. %s cannot be found.',
|
|
|
|
|
suppress_default_error=True)
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
write_action_env_to_bazelrc('COMPUTECPP_TOOLKIT_PATH',
|
|
|
|
|
computecpp_toolkit_path)
|
|
|
|
|
|
2018-01-05 14:09:41 -08:00
|
|
|
|
2017-12-15 18:15:07 -08:00
|
|
|
def set_trisycl_include_dir(environ_cp):
|
2018-01-05 14:09:41 -08:00
|
|
|
"""Set TRISYCL_INCLUDE_DIR."""
|
2018-01-10 11:36:52 -08:00
|
|
|
|
2017-12-15 18:15:07 -08:00
|
|
|
ask_trisycl_include_dir = ('Please specify the location of the triSYCL '
|
|
|
|
|
'include directory. (Use --config=sycl_trisycl '
|
|
|
|
|
'when building with Bazel) '
|
|
|
|
|
'[Default is %s]: '
|
2018-01-05 14:09:41 -08:00
|
|
|
) % (_DEFAULT_TRISYCL_INCLUDE_DIR)
|
2018-01-10 11:36:52 -08:00
|
|
|
|
2017-12-15 18:15:07 -08:00
|
|
|
while True:
|
|
|
|
|
trisycl_include_dir = get_from_env_or_user_or_default(
|
2018-01-05 14:09:41 -08:00
|
|
|
environ_cp, 'TRISYCL_INCLUDE_DIR', ask_trisycl_include_dir,
|
|
|
|
|
_DEFAULT_TRISYCL_INCLUDE_DIR)
|
2017-12-15 18:15:07 -08:00
|
|
|
if os.path.exists(trisycl_include_dir):
|
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
print('Invalid triSYCL include directory, %s cannot be found'
|
|
|
|
|
% (trisycl_include_dir))
|
|
|
|
|
|
|
|
|
|
# Set TRISYCL_INCLUDE_DIR
|
|
|
|
|
environ_cp['TRISYCL_INCLUDE_DIR'] = trisycl_include_dir
|
|
|
|
|
write_action_env_to_bazelrc('TRISYCL_INCLUDE_DIR',
|
|
|
|
|
trisycl_include_dir)
|
2017-07-25 13:30:03 -07:00
|
|
|
|
2017-11-22 13:42:21 -08:00
|
|
|
|
2017-07-25 13:30:03 -07:00
|
|
|
def set_mpi_home(environ_cp):
|
|
|
|
|
"""Set MPI_HOME."""
|
2017-12-05 11:59:17 -08:00
|
|
|
|
2017-08-25 14:01:05 -07:00
|
|
|
default_mpi_home = which('mpirun') or which('mpiexec') or ''
|
|
|
|
|
default_mpi_home = os.path.dirname(os.path.dirname(default_mpi_home))
|
|
|
|
|
|
2017-12-05 11:59:17 -08:00
|
|
|
def valid_mpi_path(mpi_home):
|
|
|
|
|
exists = (os.path.exists(os.path.join(mpi_home, 'include')) and
|
|
|
|
|
os.path.exists(os.path.join(mpi_home, 'lib')))
|
|
|
|
|
if not exists:
|
|
|
|
|
print('Invalid path to the MPI Toolkit. %s or %s cannot be found' %
|
|
|
|
|
(os.path.join(mpi_home, 'include'),
|
|
|
|
|
os.path.exists(os.path.join(mpi_home, 'lib'))))
|
|
|
|
|
return exists
|
2017-07-25 13:30:03 -07:00
|
|
|
|
2017-12-05 11:59:17 -08:00
|
|
|
_ = prompt_loop_or_load_from_env(
|
|
|
|
|
environ_cp,
|
|
|
|
|
var_name='MPI_HOME',
|
|
|
|
|
var_default=default_mpi_home,
|
|
|
|
|
ask_for_var='Please specify the MPI toolkit folder.',
|
|
|
|
|
check_success=valid_mpi_path,
|
|
|
|
|
error_msg='',
|
|
|
|
|
suppress_default_error=True)
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def set_other_mpi_vars(environ_cp):
|
|
|
|
|
"""Set other MPI related variables."""
|
|
|
|
|
# Link the MPI header files
|
|
|
|
|
mpi_home = environ_cp.get('MPI_HOME')
|
|
|
|
|
symlink_force('%s/include/mpi.h' % mpi_home, 'third_party/mpi/mpi.h')
|
|
|
|
|
|
|
|
|
|
# Determine if we use OpenMPI or MVAPICH, these require different header files
|
|
|
|
|
# to be included here to make bazel dependency checker happy
|
|
|
|
|
if os.path.exists(os.path.join(mpi_home, 'include/mpi_portable_platform.h')):
|
|
|
|
|
symlink_force(
|
|
|
|
|
os.path.join(mpi_home, 'include/mpi_portable_platform.h'),
|
|
|
|
|
'third_party/mpi/mpi_portable_platform.h')
|
|
|
|
|
# TODO(gunan): avoid editing files in configure
|
|
|
|
|
sed_in_place('third_party/mpi/mpi.bzl', 'MPI_LIB_IS_OPENMPI=False',
|
|
|
|
|
'MPI_LIB_IS_OPENMPI=True')
|
|
|
|
|
else:
|
|
|
|
|
# MVAPICH / MPICH
|
|
|
|
|
symlink_force(
|
|
|
|
|
os.path.join(mpi_home, 'include/mpio.h'), 'third_party/mpi/mpio.h')
|
|
|
|
|
symlink_force(
|
|
|
|
|
os.path.join(mpi_home, 'include/mpicxx.h'), 'third_party/mpi/mpicxx.h')
|
|
|
|
|
# TODO(gunan): avoid editing files in configure
|
|
|
|
|
sed_in_place('third_party/mpi/mpi.bzl', 'MPI_LIB_IS_OPENMPI=True',
|
|
|
|
|
'MPI_LIB_IS_OPENMPI=False')
|
|
|
|
|
|
|
|
|
|
if os.path.exists(os.path.join(mpi_home, 'lib/libmpi.so')):
|
|
|
|
|
symlink_force(
|
|
|
|
|
os.path.join(mpi_home, 'lib/libmpi.so'), 'third_party/mpi/libmpi.so')
|
|
|
|
|
else:
|
|
|
|
|
raise ValueError('Cannot find the MPI library file in %s/lib' % mpi_home)
|
|
|
|
|
|
|
|
|
|
|
2017-11-13 14:21:04 -08:00
|
|
|
def set_grpc_build_flags():
|
|
|
|
|
write_to_bazelrc('build --define grpc_no_ares=true')
|
|
|
|
|
|
2018-01-05 14:09:41 -08:00
|
|
|
|
2018-08-17 13:53:06 -07:00
|
|
|
def set_system_libs_flag(environ_cp):
|
|
|
|
|
syslibs = environ_cp.get('TF_SYSTEM_LIBS', '')
|
|
|
|
|
syslibs = ','.join(sorted(syslibs.split(',')))
|
|
|
|
|
if syslibs and syslibs != '':
|
|
|
|
|
write_action_env_to_bazelrc('TF_SYSTEM_LIBS', syslibs)
|
|
|
|
|
|
|
|
|
|
|
2018-07-19 13:48:50 -07:00
|
|
|
def set_windows_build_flags(environ_cp):
|
|
|
|
|
"""Set Windows specific build options."""
|
|
|
|
|
# The non-monolithic build is not supported yet
|
|
|
|
|
write_to_bazelrc('build --config monolithic')
|
|
|
|
|
# Suppress warning messages
|
|
|
|
|
write_to_bazelrc('build --copt=-w --host_copt=-w')
|
|
|
|
|
# Output more verbose information when something goes wrong
|
|
|
|
|
write_to_bazelrc('build --verbose_failures')
|
|
|
|
|
# The host and target platforms are the same in Windows build. So we don't
|
|
|
|
|
# have to distinct them. This avoids building the same targets twice.
|
|
|
|
|
write_to_bazelrc('build --distinct_host_configuration=false')
|
|
|
|
|
# Enable short object file path to avoid long path issue on Windows.
|
|
|
|
|
# TODO(pcloudy): Remove this flag when upgrading Bazel to 0.16.0
|
|
|
|
|
# Short object file path will be enabled by default.
|
|
|
|
|
write_to_bazelrc('build --experimental_shortened_obj_file_path=true')
|
|
|
|
|
|
|
|
|
|
if get_var(
|
|
|
|
|
environ_cp, 'TF_OVERRIDE_EIGEN_STRONG_INLINE', 'Eigen strong inline',
|
|
|
|
|
True,
|
|
|
|
|
('Would you like to override eigen strong inline for some C++ '
|
2018-07-20 10:55:31 -07:00
|
|
|
'compilation to reduce the compilation time?'),
|
2018-07-19 13:48:50 -07:00
|
|
|
'Eigen strong inline overridden.',
|
|
|
|
|
'Not overriding eigen strong inline, '
|
|
|
|
|
'some compilations could take more than 20 mins.'):
|
|
|
|
|
# Due to a known MSVC compiler issue
|
|
|
|
|
# https://github.com/tensorflow/tensorflow/issues/10521
|
|
|
|
|
# Overriding eigen strong inline speeds up the compiling of
|
|
|
|
|
# conv_grad_ops_3d.cc and conv_ops_3d.cc by 20 minutes,
|
|
|
|
|
# but this also hurts the performance. Let users decide what they want.
|
|
|
|
|
write_to_bazelrc('build --define=override_eigen_strong_inline=true')
|
2017-12-15 18:15:07 -08:00
|
|
|
|
2017-11-13 14:21:04 -08:00
|
|
|
|
2018-01-05 14:09:41 -08:00
|
|
|
def config_info_line(name, help_text):
|
|
|
|
|
"""Helper function to print formatted help text for Bazel config options."""
|
|
|
|
|
print('\t--config=%-12s\t# %s' % (name, help_text))
|
|
|
|
|
|
|
|
|
|
|
2017-07-25 13:30:03 -07:00
|
|
|
def main():
|
2018-03-12 19:33:52 -07:00
|
|
|
parser = argparse.ArgumentParser()
|
|
|
|
|
parser.add_argument("--workspace",
|
|
|
|
|
type=str,
|
|
|
|
|
default=_TF_WORKSPACE_ROOT,
|
|
|
|
|
help="The absolute path to your active Bazel workspace.")
|
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
|
2017-07-25 13:30:03 -07:00
|
|
|
# Make a copy of os.environ to be clear when functions and getting and setting
|
|
|
|
|
# environment variables.
|
|
|
|
|
environ_cp = dict(os.environ)
|
|
|
|
|
|
2018-07-24 13:12:54 -07:00
|
|
|
check_bazel_version('0.15.0')
|
2017-07-25 13:30:03 -07:00
|
|
|
|
2018-03-12 19:33:52 -07:00
|
|
|
reset_tf_configure_bazelrc(args.workspace)
|
2017-07-25 13:30:03 -07:00
|
|
|
cleanup_makefile()
|
2017-09-19 18:36:26 -07:00
|
|
|
setup_python(environ_cp)
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
if is_windows():
|
2018-07-02 07:41:42 -07:00
|
|
|
environ_cp['TF_NEED_AWS'] = '0'
|
2017-07-25 13:30:03 -07:00
|
|
|
environ_cp['TF_NEED_GCP'] = '0'
|
|
|
|
|
environ_cp['TF_NEED_HDFS'] = '0'
|
|
|
|
|
environ_cp['TF_NEED_JEMALLOC'] = '0'
|
2018-02-07 14:36:00 -08:00
|
|
|
environ_cp['TF_NEED_KAFKA'] = '0'
|
2017-11-22 13:42:21 -08:00
|
|
|
environ_cp['TF_NEED_OPENCL_SYCL'] = '0'
|
|
|
|
|
environ_cp['TF_NEED_COMPUTECPP'] = '0'
|
2017-07-25 13:30:03 -07:00
|
|
|
environ_cp['TF_NEED_OPENCL'] = '0'
|
|
|
|
|
environ_cp['TF_CUDA_CLANG'] = '0'
|
2018-01-25 23:59:19 -08:00
|
|
|
environ_cp['TF_NEED_TENSORRT'] = '0'
|
2018-03-22 05:33:42 -07:00
|
|
|
# TODO(ibiryukov): Investigate using clang as a cpu or cuda compiler on
|
|
|
|
|
# Windows.
|
|
|
|
|
environ_cp['TF_DOWNLOAD_CLANG'] = '0'
|
2018-07-16 14:07:29 -07:00
|
|
|
environ_cp['TF_ENABLE_XLA'] = '0'
|
|
|
|
|
environ_cp['TF_NEED_GDR'] = '0'
|
|
|
|
|
environ_cp['TF_NEED_VERBS'] = '0'
|
|
|
|
|
environ_cp['TF_NEED_MPI'] = '0'
|
|
|
|
|
environ_cp['TF_SET_ANDROID_WORKSPACE'] = '0'
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
if is_macos():
|
|
|
|
|
environ_cp['TF_NEED_JEMALLOC'] = '0'
|
2018-01-25 23:59:19 -08:00
|
|
|
environ_cp['TF_NEED_TENSORRT'] = '0'
|
2017-07-25 13:30:03 -07:00
|
|
|
|
2018-06-27 13:29:53 -05:00
|
|
|
# The numpy package on ppc64le uses OpenBLAS which has multi-threading
|
|
|
|
|
# issues that lead to incorrect answers. Set OMP_NUM_THREADS=1 at
|
|
|
|
|
# runtime to allow the Tensorflow testcases which compare numpy
|
|
|
|
|
# results to Tensorflow results to succeed.
|
|
|
|
|
if is_ppc64le():
|
|
|
|
|
write_action_env_to_bazelrc("OMP_NUM_THREADS", 1)
|
|
|
|
|
|
2017-07-25 13:30:03 -07:00
|
|
|
set_build_var(environ_cp, 'TF_NEED_JEMALLOC', 'jemalloc as malloc',
|
|
|
|
|
'with_jemalloc', True)
|
|
|
|
|
set_build_var(environ_cp, 'TF_NEED_GCP', 'Google Cloud Platform',
|
Merge changes from github.
END_PUBLIC
---
Commit 9f8523640 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 173145770
---
Commit 01b6b0638 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Cut tracing memory cost
PiperOrigin-RevId: 173144626
---
Commit 5e23e0e67 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Erase cloned instructions on the fly when merging fusion nodes.
This avoids the awkward situation where an RNG which is clearly eligible for fusion becomes ineligible mid-fusion because it suddenly has an extra (dead) user.
PiperOrigin-RevId: 173141716
---
Commit 1038927c0 authored by Saurabh Saxena<srbs@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add SerializeIterator op that serializes an IteratorResource into a variant tensor.
Add DeserializeIterator op that builds IteratorResource from a variant tensor.
Move BundleReaderWrapper and BundleWriterWrapper from dataset.h to iterator_ops.cc.
Add generic key-value store interfaces IteratorStateReader and IteratorStateWriter for reading/writing state of iterators.
Get rid of IteratorBundleReader and IteratorBundleWriter.
PiperOrigin-RevId: 173140858
---
Commit 57f3e529d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change
PiperOrigin-RevId: 173136642
---
Commit 0e56ffb7b authored by Shanqing Cai<cais@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix breakages in OSS builds
See example breakages logs at:
http://ci.tensorflow.org/job/tensorflow-cl-cpu-python3-pip/10847/console
http://ci.tensorflow.org/job/tensorflow-cl-gpu/11008/console
1. CL/172477381 added the no_oss tag to tests with oss_serial tags, which broke the logic of OSS_SERIAL tests in pip.sh and run_pip_test.sh. This CL fixes that.
2. The nccl_kernels BUILD target in contrib/nccl/BUILD was missing some dependencies. This CL adds the missing ones.
Fixes: #13918
PiperOrigin-RevId: 173133914
---
Commit 3ed049b67 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Allows calling keras layers in eager mode.
PiperOrigin-RevId: 173129805
---
Commit 4ec6f2b07 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Switching contrib.summaries API to be context-manager-centric
PiperOrigin-RevId: 173129793
---
Commit 03b02ffc9 authored by Justine Tunney<jart@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Put Bazel mirror URLs first
PiperOrigin-RevId: 173127955
---
Commit 46ab25e4d authored by David Majnemer<majnemer@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Add support for convolutions with no spatial dimensions
PiperOrigin-RevId: 173126950
---
Commit fc56349b7 authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.data] Convert dataset arguments to tensors as early as possible.
This change raises a `TypeError` earlier if (for example) the `batch_size`
argument to `Dataset.batch()` has the incorrect type.
PiperOrigin-RevId: 173126678
---
Commit 4f7503a87 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
K-FAC: Support for registering multiple minibatches with register_fully_connected()
PiperOrigin-RevId: 173121735
---
Commit 2845bfcd6 authored by Tim Harley<tharley@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Avoid listing all modified Enter/RefEnter nodes on INFO, use VLOG(1) instead.
Leave a single, simple, message on INFO.
PiperOrigin-RevId: 173121726
---
Commit 434695921 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
K-FAC: _check_registration() supports multiple towers.
PiperOrigin-RevId: 173115870
---
Commit 670dddf4a authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Multi-minibatch support for
tf.contrib.kfac.fisher_blocks.FullyConnectedKFACBasicFB.
PiperOrigin-RevId: 173109677
---
Commit dc13a8e2f authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix import of meta graphs with partitioned variables into a scope.
Saver inspects SliceInfo to decide the variable name when creating a
checkpoint. Before this fix even if a partitioned variable ("weights")
was imported into a scope "a" it would still be checkpointed as ("weights")
instead of ("a/weights") since import_scoped_meta_graph was not adjusting
the SliceInfo.
WARNING: if you use import_meta_graph on graphs with partitioned_variables WITH an import_scope argument AND then create a Saver to write/read checkpoints this change
may break your checkpoint loading.
PiperOrigin-RevId: 173105796
---
Commit eea089bdb authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
K-FAC: Multi-tower support for ConvDiagonalFB.
PiperOrigin-RevId: 173105412
---
Commit 9b9cbbe2a authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Add int64 Tperm type support for `Transpose` (#13909)
* Add int64 Tperm type support for `Transpose`
This fix adds int64 Tperm support for `Transpose`. In
`array_ops.cc`, `Transpose` and `ConjugateTranspose`
have been specified as accepting int32 and int64 perm
types. However, only int32 kernels has been registered.
This fix adds the int64 perm support by removing
the constraint on Tperm, resolve the type at runtime,
and copying the data type accordingly to correctly handle
the int64/int32 types.
Additional tests have been added as well.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test cases for int64 of perm in Transpose.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add namespace to hide PermutationHelper
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Enable use_gpu=True for perm type test.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* extra // namespace annotation
* Adding a comment about int32 casting that should be safe.
Permutations only contain values that refer to dimensions, and the maximum number of dimensions we have is 254, so an int32 is always safe here.
---
Commit ac0004e71 authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Add int64 shape support on GPU for stateless random ops. (#13908)
* Add int64 shape support on GPU for stateless random ops.
This fix adds int64 shape support on GPU for stateless random ops
`StatelessRandomUniform`, `StatelessRandomNormal`, `StatelessTruncatedNormal`.
The int64 shape for stateless random ops is already supported on CPU
with int32/int64 processed properly through `MakeShape`.
However, on GPU a type constraint `.TypeConstraint<int32>("T")`
has been improperly added. Such a type constraint actually prevents
an int64 shape type to run on GPU. (As a comparision, no type constraint
on CPU).
This fix removes the type constraint and allows int64 shape to be run on GPU.
This fix also adds test cases for int64 shape support on stateless random ops.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test cases for int64 shape support for stateless random ops.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add int32 to shape types tested.
---
Commit 0d437c3be authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Add int64 padding support for MirrorPad (#13907)
* Add int64 padding support for MirrorPad
This fix adds int64 padding support for `MirrorPad`.
In the `array_ops.cc` the `MirrorPad`/`MirrorPadGrad`
has been specified as supporting int64 padding. The related
kernels does not have the int64 padding registered though.
This fix adds the int64 padding support. This fix also adds
additional test cases for coverage.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update template for CPU and GPU support of int64 paddings.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add int64 padding support for MirrorPad
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Put eigen header first like before, just in case.
---
Commit 690003cc0 authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Add `int64` type `multiples` support for `tf.tile` (#13884)
* Add `int64` type `multiples` support for `tf.tile`
In the doc of `tf.tile` (tf.tile.__doc__) both `int32`
and `int64` are supported for `multiples`. However, the kernel
for `int64` is not registered yet.
This fix adds the support of `int64` `multiples` so that the
behavior matches the description of the docs.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update functors for int64 multiples support in `tf.tile`
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update test cases for int64 of multiples in `tf.tile`
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add GPU and non GPU tests
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* format with clang-format -i
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Move Tmultiples after T (as it is auxilliary)
And use `use_gpu=True`
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit fd8d517b9 authored by Yunxing Dai<yunxing@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add tests for convolution 1D
RELNOTES: n/a
PiperOrigin-RevId: 173060283
---
Commit 40c475b48 authored by formath<jinpengliu@163.com>
Committed by Vijay Vasudevan<vrv@google.com>:
add segment_reduction_ops to tf_op_files (#13901)
---
Commit bfa4ec194 authored by Tayo Oguntebi<10927929+tayo@users.noreply.github.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Update node_def.proto comments (#13874)
The device field had outdated comments.
Note: We could consider adding tpu as an example here, e.g. "gpu" | "cpu" | "tpu". Thoughts?
---
Commit c9cb5a58d authored by formath<jinpengliu@163.com>
Committed by Vijay Vasudevan<vrv@google.com>:
protobuf lib path bug fix for benckmark on osx (#13878)
---
Commit 1c1dad105 authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Add int64 axis support for reduction ops. (#13891)
* Add int64 axis support for reduction ops.
This fix is a follow up to PR 13863. In PR 13863 the
program crash is fixed if int64 axis is passed to reduction ops,
e.g. reduce_sum, reduce_max, etc. However, 13863 does not
process the case of int64 support, it merely fixes the crash.
This fix adds the support for int64 axis of reduction ops.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add int64 axis support for mean, prod, sum
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add int64 axis support for min and max.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add int64 axis support for reduce_all and reduce_any
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test cases for int64 axis support of reduce_any and reduce_all
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit 17096081e authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Improve resize_bicubic performance by reorganizing loops (#13840)
* Improve resize_bicubic performance by reorganizing loops
This fix tries to address the issue raised in 13693 where
performance of `resize_bicubic` is not on par with opencv.
This fix rearranges the loops so that it is the same for
num_channel=40 and num_channel=3:
Pre-fix:
```
CHANNEL=40
opencv: 145.08ms
tf: 314.26ms
CHANNEL=3
opencv: 11.95ms
tf: 8.95ms
```
Post-fix:
```
CHANNEL=40
opencv: 144.25ms
tf: 214.55ms
CHANNEL=3
opencv: 11.78ms
tf: 14.07ms
```
This fix fixes 13693.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Keep special handling of `num_channels=3` for `resize_bicubic`
This commit keeps special handling of `num_channels=3` for
`resize_bicubic`:
Without special handling:
```
opencv: 11.78ms
tf: 14.07ms
```
With special handling:
```
opencv: 11.74ms
tf: 9.46ms
```
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Expand Benchmark test for resize_bicubic
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update from review feedback.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit b927df57f authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Update protobuf.cmake to b04e5cba356212e4e8c66c61bbe0c3a20537c5b9 (#13893)
This fix tries to address the issue raised in 8187 where
protobuf.cmake used different version as bazel.
The reason for discrepancy was due to the fact that a customerized
protobuf was needed with Windows patch. Since the patch has been
merged in (https://github.com/google/protobuf/pull/2203),
it makes sense to update protobuf.cmake so that the same version
of cmake is used.
This fix fixes 8187.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit d1183ca6a authored by Vijay Vasudevan<vrv@google.com>
Committed by GitHub<noreply@github.com>:
Give each variable a unique name in accumulate_n_v2_eager_test. (#13886)
---
Commit a69945810 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update pin for bazel-toolchains to latest version
PiperOrigin-RevId: 173002530
---
Commit 9d55c249c authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Fix doc in TF_CALL_ when invoked in mobile platform (#13881)
* Fix doc in TF_CALL_ when defined(IS_MOBILE_PLATFORM) && !defined(__ANDROID_TYPES_FULL__)
This is a small doc fix that includes bool as part of the types
that is supported in mobile (IS_MOBILE_PLATFORM && !__ANDROID_TYPES_FULL__),
as bool is clearly invoked in the following define.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Also add bool to android full version.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit ba49d8583 authored by Bjarke Hammersholt Roune<broune@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Slight change to reduce_test to avoid generating inf, which was triggering an inf detector unnecessarily.
PiperOrigin-RevId: 172965466
---
Commit 93e8f3c67 authored by Anna R<annarev@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Adding Python ApiDef overrides.
PiperOrigin-RevId: 172960496
---
Commit 0d6a2e353 authored by Anna R<annarev@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change.
PiperOrigin-RevId: 172960439
---
Commit 62df65c72 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add dtype argument to Mean and Accuracy object-oriented metrics.
PiperOrigin-RevId: 172957714
---
Commit d7409d32b authored by Simone Cirillo<my.accounts@gmx.se>
Committed by Vijay Vasudevan<vrv@google.com>:
Fix import of spatial_softmax from tensorflow.contrib.layers (#13833)
---
Commit df8bce63d authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Fix crash when `int64` axis is passed to `tf.reduce_sum` (#13863)
* Fix crash when `int64` axis is passed to `tf.reduce_sum`
This fix tries to fix the crash triggered by `int64` axis passed
to `tf.reduce_sum`:
```
ubuntu@ubuntu:~/tensorflow2$ (cd && python)
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> v = tf.reduce_sum([1,2,3], tf.constant(0, tf.int64))
2017-10-20 15:55:06.993430: F tensorflow/core/framework/tensor.cc:601] Check failed: dtype() == expected_dtype (9 vs. 3)
ubuntu@ubuntu:~/tensorflow2$
```
The issue is caused by the fact that shape inference in `common_shape_fns.cc`
only assumes int32 without proper handling of diffent types. In `math_ops.cc`
both int32 and int64 are mentioned.
NOTE that this fix does not address the issue that int64 is not supported.
To allow int64 axis it is more than adding a template in `ReductionOp` as the type
of the axis seems to be decided by some other ways in Eigen.
This fix merely fixed the crash so that an error message will return without
exit from the python program "No OpKernel was registered to support Op 'Sum' with these attrs".
Still, I think its worth to at least allow the program to continue in case of unsupported kernel.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update implementation with a template helper function.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit 29c7b4658 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Adding the Stanford Tensorflow class to community resources.
PiperOrigin-RevId: 172956049
---
Commit f758b24a8 authored by Alexandre Passos<apassos@google.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Variable name for the eager test (#13873)
---
Commit a5fe66b15 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Removed some unnecessary broadcasts in binary ops where only one input needs
broadcasting (which is a fairly common case, even in the fallback path).
PiperOrigin-RevId: 172950493
---
Commit c77090a0a authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Fix issues where int64 crops could not be passed to batch_to_space. (#13862)
* Fix issues where int64 crops could not be passed to batch_to_space.
This fix tries to address the issue where int64 `crops` could
not be passed to `batch_to_space` even though both int32 and
int64 are specified as supported in the docs (tf.batch_to_space.__doc__)
The reason is that BatchToSpace kernel puts a constraint of int32 to crops
data types.
This fix removed the constraint so that int64 `crops` could be supported.
NOTE: Just removing the constraint should work and it is not necessary
to add specification to the kernel class template, as `SubtleMustCopyFlat`
called in the class already correctly handled both int32 and int64 cases.
Besides, other data types (e.g., float or double) will not be passed to the
kernel as they are guarded by the specification in `array_ops.cc`.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Also remove int64/int32 type constraints for SpaceToBatch kernels
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test cases for int64 crops of batch_to_space and space_to_batch
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix test failures.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit 494837936 authored by Joshua V. Dillon<jvdillon@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make `tf.contrib.distributions` quadrature family accept a `Tensor` for
`quadrature_grid_and_probs` argument.
PiperOrigin-RevId: 172950094
---
Commit 9c825d32c authored by Jinze Bai<baijinze1994@163.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Merge two GPU kernel launching to one in DiagOp. (#13859)
---
Commit c0ca50a47 authored by Yan Facai (???)<facai.yan@gmail.com>
Committed by Vijay Vasudevan<vrv@google.com>:
ENH: add Relu6GradGrad (#13268)
* ENH: add Relu6GradGrad
* TST: add test case
* CLN: import nn_grad
* TST: add init value
---
Commit 8ff33271e authored by Justin Lebar<jlebar@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Dump the computation's SessionModule as part of the tf_compile rule.
PiperOrigin-RevId: 172946149
---
Commit ebcae4a5e authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add streaming_precision_recall_at_equal_thresholds
This helper method computes streaming tp, fp, tn, fp, precision, and recall for the user in a way that exhibits O(T + N) time and space complexity (instead of O(T * N)), where T is the number of thresholds and N is the size of the predictions tensor.
Thanks to Frank Chu for the efficient algorithm!
PiperOrigin-RevId: 172946073
---
Commit ccfd9c1e5 authored by Sanjoy Das<sanjoy@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Log Hlo IR during AOT compilation
PiperOrigin-RevId: 172944165
---
Commit 985031a10 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Allows tfe.enable_eager_execution(device_policy=tfe.DEVICE_POLICY_WARN).
PiperOrigin-RevId: 172943398
---
Commit 703182d85 authored by Mingxing Tan<tanmingxing@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add performance guide for fused decode_and_crop_jpeg optimization.
PiperOrigin-RevId: 172943116
---
Commit 66b1f4383 authored by Francois Chollet<fchollet@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make Network compatible with eager mode. Currently it only allows to instantiate a Network in eager mode using the regular Keras API, and call it on eager tensors.
PiperOrigin-RevId: 172942569
---
Commit 41df2cec2 authored by ashankar<ashankar@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Testing pending CL: 172939383
---
Commit 37fd95179 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Simplifies capturing code in graph_callable to use recent function improvements.
PiperOrigin-RevId: 172937003
---
Commit d1e7382af authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BEGIN_PUBLIC
Automated g4 rollback of changelist 172924803
PiperOrigin-RevId: 173347587
2017-10-24 19:47:46 -07:00
|
|
|
'with_gcp_support', True, 'gcp')
|
2017-07-25 13:30:03 -07:00
|
|
|
set_build_var(environ_cp, 'TF_NEED_HDFS', 'Hadoop File System',
|
Merge changes from github.
END_PUBLIC
---
Commit 9f8523640 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.
PiperOrigin-RevId: 173145770
---
Commit 01b6b0638 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Cut tracing memory cost
PiperOrigin-RevId: 173144626
---
Commit 5e23e0e67 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Erase cloned instructions on the fly when merging fusion nodes.
This avoids the awkward situation where an RNG which is clearly eligible for fusion becomes ineligible mid-fusion because it suddenly has an extra (dead) user.
PiperOrigin-RevId: 173141716
---
Commit 1038927c0 authored by Saurabh Saxena<srbs@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add SerializeIterator op that serializes an IteratorResource into a variant tensor.
Add DeserializeIterator op that builds IteratorResource from a variant tensor.
Move BundleReaderWrapper and BundleWriterWrapper from dataset.h to iterator_ops.cc.
Add generic key-value store interfaces IteratorStateReader and IteratorStateWriter for reading/writing state of iterators.
Get rid of IteratorBundleReader and IteratorBundleWriter.
PiperOrigin-RevId: 173140858
---
Commit 57f3e529d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change
PiperOrigin-RevId: 173136642
---
Commit 0e56ffb7b authored by Shanqing Cai<cais@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix breakages in OSS builds
See example breakages logs at:
http://ci.tensorflow.org/job/tensorflow-cl-cpu-python3-pip/10847/console
http://ci.tensorflow.org/job/tensorflow-cl-gpu/11008/console
1. CL/172477381 added the no_oss tag to tests with oss_serial tags, which broke the logic of OSS_SERIAL tests in pip.sh and run_pip_test.sh. This CL fixes that.
2. The nccl_kernels BUILD target in contrib/nccl/BUILD was missing some dependencies. This CL adds the missing ones.
Fixes: #13918
PiperOrigin-RevId: 173133914
---
Commit 3ed049b67 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Allows calling keras layers in eager mode.
PiperOrigin-RevId: 173129805
---
Commit 4ec6f2b07 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Switching contrib.summaries API to be context-manager-centric
PiperOrigin-RevId: 173129793
---
Commit 03b02ffc9 authored by Justine Tunney<jart@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Put Bazel mirror URLs first
PiperOrigin-RevId: 173127955
---
Commit 46ab25e4d authored by David Majnemer<majnemer@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Add support for convolutions with no spatial dimensions
PiperOrigin-RevId: 173126950
---
Commit fc56349b7 authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.data] Convert dataset arguments to tensors as early as possible.
This change raises a `TypeError` earlier if (for example) the `batch_size`
argument to `Dataset.batch()` has the incorrect type.
PiperOrigin-RevId: 173126678
---
Commit 4f7503a87 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
K-FAC: Support for registering multiple minibatches with register_fully_connected()
PiperOrigin-RevId: 173121735
---
Commit 2845bfcd6 authored by Tim Harley<tharley@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Avoid listing all modified Enter/RefEnter nodes on INFO, use VLOG(1) instead.
Leave a single, simple, message on INFO.
PiperOrigin-RevId: 173121726
---
Commit 434695921 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
K-FAC: _check_registration() supports multiple towers.
PiperOrigin-RevId: 173115870
---
Commit 670dddf4a authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Multi-minibatch support for
tf.contrib.kfac.fisher_blocks.FullyConnectedKFACBasicFB.
PiperOrigin-RevId: 173109677
---
Commit dc13a8e2f authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix import of meta graphs with partitioned variables into a scope.
Saver inspects SliceInfo to decide the variable name when creating a
checkpoint. Before this fix even if a partitioned variable ("weights")
was imported into a scope "a" it would still be checkpointed as ("weights")
instead of ("a/weights") since import_scoped_meta_graph was not adjusting
the SliceInfo.
WARNING: if you use import_meta_graph on graphs with partitioned_variables WITH an import_scope argument AND then create a Saver to write/read checkpoints this change
may break your checkpoint loading.
PiperOrigin-RevId: 173105796
---
Commit eea089bdb authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
K-FAC: Multi-tower support for ConvDiagonalFB.
PiperOrigin-RevId: 173105412
---
Commit 9b9cbbe2a authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Add int64 Tperm type support for `Transpose` (#13909)
* Add int64 Tperm type support for `Transpose`
This fix adds int64 Tperm support for `Transpose`. In
`array_ops.cc`, `Transpose` and `ConjugateTranspose`
have been specified as accepting int32 and int64 perm
types. However, only int32 kernels has been registered.
This fix adds the int64 perm support by removing
the constraint on Tperm, resolve the type at runtime,
and copying the data type accordingly to correctly handle
the int64/int32 types.
Additional tests have been added as well.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test cases for int64 of perm in Transpose.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add namespace to hide PermutationHelper
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Enable use_gpu=True for perm type test.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* extra // namespace annotation
* Adding a comment about int32 casting that should be safe.
Permutations only contain values that refer to dimensions, and the maximum number of dimensions we have is 254, so an int32 is always safe here.
---
Commit ac0004e71 authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Add int64 shape support on GPU for stateless random ops. (#13908)
* Add int64 shape support on GPU for stateless random ops.
This fix adds int64 shape support on GPU for stateless random ops
`StatelessRandomUniform`, `StatelessRandomNormal`, `StatelessTruncatedNormal`.
The int64 shape for stateless random ops is already supported on CPU
with int32/int64 processed properly through `MakeShape`.
However, on GPU a type constraint `.TypeConstraint<int32>("T")`
has been improperly added. Such a type constraint actually prevents
an int64 shape type to run on GPU. (As a comparision, no type constraint
on CPU).
This fix removes the type constraint and allows int64 shape to be run on GPU.
This fix also adds test cases for int64 shape support on stateless random ops.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test cases for int64 shape support for stateless random ops.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add int32 to shape types tested.
---
Commit 0d437c3be authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Add int64 padding support for MirrorPad (#13907)
* Add int64 padding support for MirrorPad
This fix adds int64 padding support for `MirrorPad`.
In the `array_ops.cc` the `MirrorPad`/`MirrorPadGrad`
has been specified as supporting int64 padding. The related
kernels does not have the int64 padding registered though.
This fix adds the int64 padding support. This fix also adds
additional test cases for coverage.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update template for CPU and GPU support of int64 paddings.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add int64 padding support for MirrorPad
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Put eigen header first like before, just in case.
---
Commit 690003cc0 authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Add `int64` type `multiples` support for `tf.tile` (#13884)
* Add `int64` type `multiples` support for `tf.tile`
In the doc of `tf.tile` (tf.tile.__doc__) both `int32`
and `int64` are supported for `multiples`. However, the kernel
for `int64` is not registered yet.
This fix adds the support of `int64` `multiples` so that the
behavior matches the description of the docs.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update functors for int64 multiples support in `tf.tile`
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update test cases for int64 of multiples in `tf.tile`
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add GPU and non GPU tests
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* format with clang-format -i
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Move Tmultiples after T (as it is auxilliary)
And use `use_gpu=True`
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit fd8d517b9 authored by Yunxing Dai<yunxing@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add tests for convolution 1D
RELNOTES: n/a
PiperOrigin-RevId: 173060283
---
Commit 40c475b48 authored by formath<jinpengliu@163.com>
Committed by Vijay Vasudevan<vrv@google.com>:
add segment_reduction_ops to tf_op_files (#13901)
---
Commit bfa4ec194 authored by Tayo Oguntebi<10927929+tayo@users.noreply.github.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Update node_def.proto comments (#13874)
The device field had outdated comments.
Note: We could consider adding tpu as an example here, e.g. "gpu" | "cpu" | "tpu". Thoughts?
---
Commit c9cb5a58d authored by formath<jinpengliu@163.com>
Committed by Vijay Vasudevan<vrv@google.com>:
protobuf lib path bug fix for benckmark on osx (#13878)
---
Commit 1c1dad105 authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Add int64 axis support for reduction ops. (#13891)
* Add int64 axis support for reduction ops.
This fix is a follow up to PR 13863. In PR 13863 the
program crash is fixed if int64 axis is passed to reduction ops,
e.g. reduce_sum, reduce_max, etc. However, 13863 does not
process the case of int64 support, it merely fixes the crash.
This fix adds the support for int64 axis of reduction ops.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add int64 axis support for mean, prod, sum
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add int64 axis support for min and max.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add int64 axis support for reduce_all and reduce_any
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test cases for int64 axis support of reduce_any and reduce_all
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit 17096081e authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Improve resize_bicubic performance by reorganizing loops (#13840)
* Improve resize_bicubic performance by reorganizing loops
This fix tries to address the issue raised in 13693 where
performance of `resize_bicubic` is not on par with opencv.
This fix rearranges the loops so that it is the same for
num_channel=40 and num_channel=3:
Pre-fix:
```
CHANNEL=40
opencv: 145.08ms
tf: 314.26ms
CHANNEL=3
opencv: 11.95ms
tf: 8.95ms
```
Post-fix:
```
CHANNEL=40
opencv: 144.25ms
tf: 214.55ms
CHANNEL=3
opencv: 11.78ms
tf: 14.07ms
```
This fix fixes 13693.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Keep special handling of `num_channels=3` for `resize_bicubic`
This commit keeps special handling of `num_channels=3` for
`resize_bicubic`:
Without special handling:
```
opencv: 11.78ms
tf: 14.07ms
```
With special handling:
```
opencv: 11.74ms
tf: 9.46ms
```
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Expand Benchmark test for resize_bicubic
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update from review feedback.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit b927df57f authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Update protobuf.cmake to b04e5cba356212e4e8c66c61bbe0c3a20537c5b9 (#13893)
This fix tries to address the issue raised in 8187 where
protobuf.cmake used different version as bazel.
The reason for discrepancy was due to the fact that a customerized
protobuf was needed with Windows patch. Since the patch has been
merged in (https://github.com/google/protobuf/pull/2203),
it makes sense to update protobuf.cmake so that the same version
of cmake is used.
This fix fixes 8187.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit d1183ca6a authored by Vijay Vasudevan<vrv@google.com>
Committed by GitHub<noreply@github.com>:
Give each variable a unique name in accumulate_n_v2_eager_test. (#13886)
---
Commit a69945810 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update pin for bazel-toolchains to latest version
PiperOrigin-RevId: 173002530
---
Commit 9d55c249c authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Fix doc in TF_CALL_ when invoked in mobile platform (#13881)
* Fix doc in TF_CALL_ when defined(IS_MOBILE_PLATFORM) && !defined(__ANDROID_TYPES_FULL__)
This is a small doc fix that includes bool as part of the types
that is supported in mobile (IS_MOBILE_PLATFORM && !__ANDROID_TYPES_FULL__),
as bool is clearly invoked in the following define.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Also add bool to android full version.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit ba49d8583 authored by Bjarke Hammersholt Roune<broune@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Slight change to reduce_test to avoid generating inf, which was triggering an inf detector unnecessarily.
PiperOrigin-RevId: 172965466
---
Commit 93e8f3c67 authored by Anna R<annarev@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Adding Python ApiDef overrides.
PiperOrigin-RevId: 172960496
---
Commit 0d6a2e353 authored by Anna R<annarev@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change.
PiperOrigin-RevId: 172960439
---
Commit 62df65c72 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add dtype argument to Mean and Accuracy object-oriented metrics.
PiperOrigin-RevId: 172957714
---
Commit d7409d32b authored by Simone Cirillo<my.accounts@gmx.se>
Committed by Vijay Vasudevan<vrv@google.com>:
Fix import of spatial_softmax from tensorflow.contrib.layers (#13833)
---
Commit df8bce63d authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Fix crash when `int64` axis is passed to `tf.reduce_sum` (#13863)
* Fix crash when `int64` axis is passed to `tf.reduce_sum`
This fix tries to fix the crash triggered by `int64` axis passed
to `tf.reduce_sum`:
```
ubuntu@ubuntu:~/tensorflow2$ (cd && python)
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> v = tf.reduce_sum([1,2,3], tf.constant(0, tf.int64))
2017-10-20 15:55:06.993430: F tensorflow/core/framework/tensor.cc:601] Check failed: dtype() == expected_dtype (9 vs. 3)
ubuntu@ubuntu:~/tensorflow2$
```
The issue is caused by the fact that shape inference in `common_shape_fns.cc`
only assumes int32 without proper handling of diffent types. In `math_ops.cc`
both int32 and int64 are mentioned.
NOTE that this fix does not address the issue that int64 is not supported.
To allow int64 axis it is more than adding a template in `ReductionOp` as the type
of the axis seems to be decided by some other ways in Eigen.
This fix merely fixed the crash so that an error message will return without
exit from the python program "No OpKernel was registered to support Op 'Sum' with these attrs".
Still, I think its worth to at least allow the program to continue in case of unsupported kernel.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update implementation with a template helper function.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit 29c7b4658 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Adding the Stanford Tensorflow class to community resources.
PiperOrigin-RevId: 172956049
---
Commit f758b24a8 authored by Alexandre Passos<apassos@google.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Variable name for the eager test (#13873)
---
Commit a5fe66b15 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Removed some unnecessary broadcasts in binary ops where only one input needs
broadcasting (which is a fairly common case, even in the fallback path).
PiperOrigin-RevId: 172950493
---
Commit c77090a0a authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Fix issues where int64 crops could not be passed to batch_to_space. (#13862)
* Fix issues where int64 crops could not be passed to batch_to_space.
This fix tries to address the issue where int64 `crops` could
not be passed to `batch_to_space` even though both int32 and
int64 are specified as supported in the docs (tf.batch_to_space.__doc__)
The reason is that BatchToSpace kernel puts a constraint of int32 to crops
data types.
This fix removed the constraint so that int64 `crops` could be supported.
NOTE: Just removing the constraint should work and it is not necessary
to add specification to the kernel class template, as `SubtleMustCopyFlat`
called in the class already correctly handled both int32 and int64 cases.
Besides, other data types (e.g., float or double) will not be passed to the
kernel as they are guarded by the specification in `array_ops.cc`.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Also remove int64/int32 type constraints for SpaceToBatch kernels
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test cases for int64 crops of batch_to_space and space_to_batch
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix test failures.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit 494837936 authored by Joshua V. Dillon<jvdillon@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make `tf.contrib.distributions` quadrature family accept a `Tensor` for
`quadrature_grid_and_probs` argument.
PiperOrigin-RevId: 172950094
---
Commit 9c825d32c authored by Jinze Bai<baijinze1994@163.com>
Committed by Vijay Vasudevan<vrv@google.com>:
Merge two GPU kernel launching to one in DiagOp. (#13859)
---
Commit c0ca50a47 authored by Yan Facai (???)<facai.yan@gmail.com>
Committed by Vijay Vasudevan<vrv@google.com>:
ENH: add Relu6GradGrad (#13268)
* ENH: add Relu6GradGrad
* TST: add test case
* CLN: import nn_grad
* TST: add init value
---
Commit 8ff33271e authored by Justin Lebar<jlebar@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Dump the computation's SessionModule as part of the tf_compile rule.
PiperOrigin-RevId: 172946149
---
Commit ebcae4a5e authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add streaming_precision_recall_at_equal_thresholds
This helper method computes streaming tp, fp, tn, fp, precision, and recall for the user in a way that exhibits O(T + N) time and space complexity (instead of O(T * N)), where T is the number of thresholds and N is the size of the predictions tensor.
Thanks to Frank Chu for the efficient algorithm!
PiperOrigin-RevId: 172946073
---
Commit ccfd9c1e5 authored by Sanjoy Das<sanjoy@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Log Hlo IR during AOT compilation
PiperOrigin-RevId: 172944165
---
Commit 985031a10 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Allows tfe.enable_eager_execution(device_policy=tfe.DEVICE_POLICY_WARN).
PiperOrigin-RevId: 172943398
---
Commit 703182d85 authored by Mingxing Tan<tanmingxing@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add performance guide for fused decode_and_crop_jpeg optimization.
PiperOrigin-RevId: 172943116
---
Commit 66b1f4383 authored by Francois Chollet<fchollet@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make Network compatible with eager mode. Currently it only allows to instantiate a Network in eager mode using the regular Keras API, and call it on eager tensors.
PiperOrigin-RevId: 172942569
---
Commit 41df2cec2 authored by ashankar<ashankar@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Testing pending CL: 172939383
---
Commit 37fd95179 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Simplifies capturing code in graph_callable to use recent function improvements.
PiperOrigin-RevId: 172937003
---
Commit d1e7382af authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BEGIN_PUBLIC
Automated g4 rollback of changelist 172924803
PiperOrigin-RevId: 173347587
2017-10-24 19:47:46 -07:00
|
|
|
'with_hdfs_support', True, 'hdfs')
|
2018-07-02 07:41:42 -07:00
|
|
|
set_build_var(environ_cp, 'TF_NEED_AWS', 'Amazon AWS Platform',
|
|
|
|
|
'with_aws_support', True, 'aws')
|
2018-02-07 14:36:00 -08:00
|
|
|
set_build_var(environ_cp, 'TF_NEED_KAFKA', 'Apache Kafka Platform',
|
2018-03-29 10:50:46 -07:00
|
|
|
'with_kafka_support', True, 'kafka')
|
2017-07-25 13:30:03 -07:00
|
|
|
set_build_var(environ_cp, 'TF_ENABLE_XLA', 'XLA JIT', 'with_xla_support',
|
2017-09-14 13:35:57 -07:00
|
|
|
False, 'xla')
|
Merge changes from github.
END_PUBLIC
---
Commit 9f81374c3 authored by raymondxyang<zihao.yang@microsoft.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Add option for build more python tests in Cmake (#11853)
* Ignore Windows built project
* Fix deprecated methods in tf.contrib.python
* Fix regex match for Windows build in contrib.keras
* Fix Regex match for Windows build in session_bundle
* * Fix deprecated methods
* Fix regex match for Windows
* Fix compatibility issue with Python 3.x
* Add missing ops into Windows build for test
* Enabled more testcases for Windows build
* Clean code and fix typo
* Add conditional cmake mode for enabling more unit testcase
* Add Cmake mode for major Contrib packages
* Add supplementary info in RAEDME for new cmake option
* * Update tf_tests after testing with TF 1.3
* Clean code and resolve conflicts
* Fix unsafe regex matches and format code
* Update exclude list after testing with latest master branch
* Fix missing module
---
Commit 98f0e1efe authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Dynamic ksize and strides with MaxPool (#11875)
* Dynamic ksize with max_pool
This fix tries to fix the issue raised in 4746 where ksize
is static (attr) with max_pool.
This fix changes ksize to input tensor so that it is dynamic now.
This fix fixes 4746.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add dynamic ksize to MaxPoolGrad and MaxPoolGradGrad
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test cases for max_pool_v2
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix GPU Jenkins issue.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Enable MaxPoolV2 in GPU
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Hide MaxPoolV2 and other fixes.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit 02d6bc185 authored by Bairen Yi<byronyi@users.noreply.github.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
remove useless variable (#12212)
---
Commit ed6b0d905 authored by namrata-ibm<bhavenamrata@gmail.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Adding support for s390x in calculation of cpu_frequency (#12201)
---
Commit 627dfc9dd authored by Taehoon Lee<taehoonlee@snu.ac.kr>
Committed by Taehoon Lee<taehoonlee@snu.ac.kr>:
Fix typos
---
Commit c0f9b0a91 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
In fast-math mode emit a tanh that has a faster min/max.
PiperOrigin-RevId: 164943597
---
Commit 87605f3d6 authored by Kay Zhu<kayzhu@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[TF:XLA] Use HloEvaluator for ComputeConstant, remove the need of a dedicated
compute constant backend.
PiperOrigin-RevId: 164940970
---
Commit 881de45c2 authored by Taehoon Lee<me@taehoonlee.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Add bool type supports for GPU kernels (#11927)
* Add bool type supports for GPU kernels
* Add bool type test codes for GPU kernels
---
Commit eeacdcdb1 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add missing "CPU" suffix in registrations.
PiperOrigin-RevId: 164939527
---
Commit de01be952 authored by namrata-ibm<bhavenamrata@gmail.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Adding support for Big Endian in graph_constructor_test and wav_io (#12179)
---
Commit 26719d29f authored by QingYing Chen<pkudysj@126.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Implement CRF decode (Viterbi decode) for tensor (#12056)
* Implement CRF decoding for tensors
* add test code for tensor version's CRF decoding
* made modifications according to pylint
* add some comments for crf decode
* remove useless code
* add comments at the top comment of crf module and add more comments in crf_test
* capitalize first char of first word in comments
* replace crf_decode test code with a deterministic example
---
Commit f9a81ca2f authored by Pete Warden<pete@petewarden.com>
Committed by gunan<gunan@google.com>:
Create CI build script for Raspberry Pi (#12190)
* Create CI build script for Raspberry Pi
* Moved location of Pi build script
---
Commit e2a163a90 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Merge code from PR #11940 with internal changes from cl/164796436, and update Python tests to also run on GPU.
PiperOrigin-RevId: 164929133
---
Commit 08bbfa187 authored by Taehoon Lee<me@taehoonlee.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Fix typos (#12195)
---
Commit ab96f41fb authored by Luke Iwanski<luke@codeplay.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
[OpenCL] Extends matmul_benchmark.py to cover SYCL (#11697)
* [OpenCL] Extends matmul_benchmark.py to cover SYCL
* Fixed typo
* /gpu:0 -> /device:GPU:0
* Fixes control_flow_ops_py_test
* /gpu: -> /device:GPU:
* Fixes //tensorflow/python/profiler/internal:run_metadata_test
* gpu: -> GPU:
* Fixes tfprof_node
* [OpenCL] Fixes device path to name with many colons (#123)
The device path is constructed from a device name by replacing all
colons with underscores. Some device names contain more than one colon,
for example 'device:SYCL:0' which gives a path 'device_SYCL_0'. The
previous code would not convert this back to the original device name,
but rather to 'device:SYCL_0'.
An alternative fix would be to convert all underscores to colons in the
device name (i.e. remove the restriction inside `replace("_", ":", 1)`),
however I'm not sure if there are any device names which contain
underscores.
* If no gpu device aviable fake one
* gpu: -> device:GPU
* Fixes profiler test
* /gpu:x -> /device:GPU:x
* Fixes debug_io_utils_test.cc test
* Fixes device_name_utils_test.cc
---
Commit 35e7a3665 authored by Yong Tang<yong.tang.github@outlook.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
Remove unneeded casting of int64 for reverse_sequence (#12192)
This fix remove unneeded cast of int64 for reverse_sequence:
```
lengths = math_ops.to_int64(lengths)
```
as int32 has already been enabled for reverse_sequence.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
---
Commit 9fba8c185 authored by Anna R<annarev@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add benchmark dashboard link to benchmarks doc. Also, I added a link and
description for Benchmarks page to Community index page.
PiperOrigin-RevId: 164924906
---
Commit bb6f32fa7 authored by Mark Heffernan<meheff@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make HloAliasAnalysis updatable after changes to the HLO graph.
As part of this change make HloAliasAnalysis a thinner layer which
basically only holds a map from HloValue to HloBuffer and vice versa.
PiperOrigin-RevId: 164923041
---
Commit 9103096c1 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by Thomas K?ppe<tkoeppe@google.com>:
Merged commit includes the following changes:
164923041 by meheff:
Make HloAliasAnalysis updatable after changes to the HLO graph.
As part of this change make HloAliasAnalysis a thinner layer which
basically only holds a map from HloValue to HloBuffer and vice versa.
--
PiperOrigin-RevId: 164923041
---
Commit 822603aed authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Merging sibling fusion instruction using multi_output_fusion
PiperOrigin-RevId: 164920220
---
Commit c035aa2a8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 164917891
---
Commit e1e81d9ba authored by Luke Iwanski<luke@codeplay.com>
Committed by Rasmus Munk Larsen<rmlarsen@google.com>:
[OpenCL] Fixes double memcpy bug (#151) (#12173)
* [OpenCL] Fixes double memcpy bug (#151)
As the debg CopyOp is called on a Tensor without type, we need to use
the DataType enum to get type information, and use this to pass the type
on to Eigen. This is a workaround Eigen's need to have a type when
calling memcpy. If the Eigen memcpy can be provided without a type
requirement, then the memcpy in sycl_util is unnecessary.
* Acts on feedback from: #12173/files/32cb12a9001b672425867b5a3110fd98e737a20b#r132496277
---
Commit d9ca2d86d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change
PiperOrigin-RevId: 164916465
---
Commit b8d13d218 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove more parts of DCASGD missed in the first pass. (47949b)
PiperOrigin-RevId: 164914552
---
Commit 73b3d52c7 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
cmake fix
PiperOrigin-RevId: 164911656
---
Commit 2173b5b0a authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Allow TFE_TensorHandleCopyToDevice to have the same device as src and
destination. It will reuse the same underlying buffer in those cases.
PiperOrigin-RevId: 164909906
---
Commit 13eb3b90e authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Experimental C and Python APIs to invoke TensorFlow kernels on concrete values.
PiperOrigin-RevId: 164902588
---
Commit 7dfabcc01 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Initialize ExecutionOptions in ComputeConstant to default values.
PiperOrigin-RevId: 164894867
---
Commit c8897e9bc authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Static required time computation
PiperOrigin-RevId: 164894645
---
Commit 076158f9b authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Enable implicit->explicit conversion by default.
PiperOrigin-RevId: 164890915
---
Commit 58c4a4cb1 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Bugfix: number of input channels is not necessarily in the last dimension, after introduction of data_format param.
PiperOrigin-RevId: 164889729
---
Commit 8f9b1af8a authored by Igor Saprykin<isaprykin@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Recover MonitoredSession when the Coordinator is requested to stop with one of the _PREEMPTION_ERRORS.
When SyncReplicasOptimizer is used, a preemption in the Coordinator may result in two cases:
Case 1) the session gets silently marked as complete
Case 2) the session gets stuck
This CL aims to solve and verify solutions for both of these problems. Fix 1 changes the should_stop logic. Fix 2 changes the CoordinatedSession.run() logic.
SyncReplicasOptimizer runs a separate set of threads using a Coordinator instance. Those threads do FIFOQueue.enqueue; the main thread does a blocking FIFOQueue.dequeue.
`sync_token_q` FIFOQueue is on parameter-servers. When one of the PS instances gets preempted, an AbortedError causes the Coordinator to stop via request_stop(ex). That by itself changes the state of MonitoredSession.should_stop() to True (Fix 1).
Results of the blocking Dequeue operation are sent to the chief worker via Recv. What happens next depends on the amount of tokens in `sync_token_q`. If there are enough for the next call to Dequeue to return, then the low-level "tf session run() call" returns. The next iteration of the `while not MonitoredSession.should_stop()` loop decides that the training is complete (Case 1).
If there are not enough tokens in `sync_token_q`, then the blocking Dequeue is going to keep waiting for them. This results in the graph execution getting stuck and the whole session getting garbage collected after 10 minutes (Case 2).
We decided to fix that by re-creating a session after it gets garbage collected (Fix 2). An alternative was to try to cancel the pending Dequeue operation, but it's not clear that it is the right thing to do and it is also not easy.
PiperOrigin-RevId: 164888390
---
Commit 46e4de6e5 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Undo loop fusion changes for now as they seem to be altering a few results.
END_PUBLIC
RELNOTES: n/a
BEGIN_PUBLIC
BEGIN_PUBLIC
Automated g4 rollback of changelist 164825735
PiperOrigin-RevId: 165340331
2017-08-15 12:08:29 -07:00
|
|
|
set_build_var(environ_cp, 'TF_NEED_GDR', 'GDR', 'with_gdr_support',
|
2017-09-14 13:35:57 -07:00
|
|
|
False, 'gdr')
|
2017-07-25 13:30:03 -07:00
|
|
|
set_build_var(environ_cp, 'TF_NEED_VERBS', 'VERBS', 'with_verbs_support',
|
2017-09-14 13:35:57 -07:00
|
|
|
False, 'verbs')
|
2018-07-24 23:58:58 -07:00
|
|
|
set_build_var(environ_cp, 'TF_NEED_NGRAPH', 'nGraph',
|
|
|
|
|
'with_ngraph_support', False, 'ngraph')
|
2017-07-25 13:30:03 -07:00
|
|
|
|
2017-11-22 13:42:21 -08:00
|
|
|
set_action_env_var(environ_cp, 'TF_NEED_OPENCL_SYCL', 'OpenCL SYCL', False)
|
|
|
|
|
if environ_cp.get('TF_NEED_OPENCL_SYCL') == '1':
|
2017-07-25 13:30:03 -07:00
|
|
|
set_host_cxx_compiler(environ_cp)
|
|
|
|
|
set_host_c_compiler(environ_cp)
|
2017-11-22 13:42:21 -08:00
|
|
|
set_action_env_var(environ_cp, 'TF_NEED_COMPUTECPP', 'ComputeCPP', True)
|
|
|
|
|
if environ_cp.get('TF_NEED_COMPUTECPP') == '1':
|
|
|
|
|
set_computecpp_toolkit_path(environ_cp)
|
|
|
|
|
else:
|
|
|
|
|
set_trisycl_include_dir(environ_cp)
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
set_action_env_var(environ_cp, 'TF_NEED_CUDA', 'CUDA', False)
|
2017-09-08 07:45:44 -07:00
|
|
|
if (environ_cp.get('TF_NEED_CUDA') == '1' and
|
|
|
|
|
'TF_CUDA_CONFIG_REPO' not in environ_cp):
|
2017-07-25 13:30:03 -07:00
|
|
|
set_tf_cuda_version(environ_cp)
|
2017-11-22 13:42:21 -08:00
|
|
|
set_tf_cudnn_version(environ_cp)
|
2018-01-25 23:59:19 -08:00
|
|
|
if is_linux():
|
|
|
|
|
set_tf_tensorrt_install_path(environ_cp)
|
2018-04-11 09:34:44 -07:00
|
|
|
set_tf_nccl_install_path(environ_cp)
|
|
|
|
|
|
2017-07-25 13:30:03 -07:00
|
|
|
set_tf_cuda_compute_capabilities(environ_cp)
|
2018-02-16 18:22:55 -08:00
|
|
|
if 'LD_LIBRARY_PATH' in environ_cp and environ_cp.get(
|
|
|
|
|
'LD_LIBRARY_PATH') != '1':
|
|
|
|
|
write_action_env_to_bazelrc('LD_LIBRARY_PATH',
|
|
|
|
|
environ_cp.get('LD_LIBRARY_PATH'))
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
set_tf_cuda_clang(environ_cp)
|
|
|
|
|
if environ_cp.get('TF_CUDA_CLANG') == '1':
|
2018-03-22 05:33:42 -07:00
|
|
|
# Ask whether we should download the clang toolchain.
|
|
|
|
|
set_tf_download_clang(environ_cp)
|
2017-12-22 03:07:51 -08:00
|
|
|
if environ_cp.get('TF_DOWNLOAD_CLANG') != '1':
|
|
|
|
|
# Set up which clang we should use as the cuda / host compiler.
|
|
|
|
|
set_clang_cuda_compiler_path(environ_cp)
|
2018-09-04 03:09:52 -07:00
|
|
|
else:
|
|
|
|
|
# Use downloaded LLD for linking.
|
|
|
|
|
write_to_bazelrc('build:cuda_clang --config=download_clang_use_lld')
|
|
|
|
|
write_to_bazelrc('test:cuda_clang --config=download_clang_use_lld')
|
2017-07-25 13:30:03 -07:00
|
|
|
else:
|
|
|
|
|
# Set up which gcc nvcc should use as the host compiler
|
|
|
|
|
# No need to set this on Windows
|
|
|
|
|
if not is_windows():
|
|
|
|
|
set_gcc_host_compiler_path(environ_cp)
|
|
|
|
|
set_other_cuda_vars(environ_cp)
|
2018-03-22 05:33:42 -07:00
|
|
|
else:
|
|
|
|
|
# CUDA not required. Ask whether we should download the clang toolchain and
|
|
|
|
|
# use it for the CPU build.
|
|
|
|
|
set_tf_download_clang(environ_cp)
|
|
|
|
|
if environ_cp.get('TF_DOWNLOAD_CLANG') == '1':
|
|
|
|
|
write_to_bazelrc('build --config=download_clang')
|
|
|
|
|
write_to_bazelrc('test --config=download_clang')
|
2017-07-25 13:30:03 -07:00
|
|
|
|
|
|
|
|
set_build_var(environ_cp, 'TF_NEED_MPI', 'MPI', 'with_mpi_support', False)
|
|
|
|
|
if environ_cp.get('TF_NEED_MPI') == '1':
|
|
|
|
|
set_mpi_home(environ_cp)
|
|
|
|
|
set_other_mpi_vars(environ_cp)
|
|
|
|
|
|
2017-11-13 14:21:04 -08:00
|
|
|
set_grpc_build_flags()
|
2017-07-25 13:30:03 -07:00
|
|
|
set_cc_opt_flags(environ_cp)
|
2018-08-17 13:53:06 -07:00
|
|
|
set_system_libs_flag(environ_cp)
|
2018-07-19 13:48:50 -07:00
|
|
|
if is_windows():
|
|
|
|
|
set_windows_build_flags(environ_cp)
|
2017-07-25 13:30:03 -07:00
|
|
|
|
2018-06-05 17:47:19 -07:00
|
|
|
if get_var(
|
|
|
|
|
environ_cp, 'TF_SET_ANDROID_WORKSPACE', 'android workspace',
|
|
|
|
|
False,
|
|
|
|
|
('Would you like to interactively configure ./WORKSPACE for '
|
|
|
|
|
'Android builds?'),
|
|
|
|
|
'Searching for NDK and SDK installations.',
|
|
|
|
|
'Not configuring the WORKSPACE for Android builds.'):
|
|
|
|
|
create_android_ndk_rule(environ_cp)
|
|
|
|
|
create_android_sdk_rule(environ_cp)
|
2017-12-05 11:59:17 -08:00
|
|
|
|
2018-07-19 13:48:50 -07:00
|
|
|
# On Windows, we don't have MKL support and the build is always monolithic.
|
|
|
|
|
# So no need to print the following message.
|
|
|
|
|
# TODO(pcloudy): remove the following if check when they make sense on Windows
|
|
|
|
|
if not is_windows():
|
|
|
|
|
print('Preconfigured Bazel build configs. You can use any of the below by '
|
|
|
|
|
'adding "--config=<>" to your build command. See tools/bazel.rc for '
|
|
|
|
|
'more details.')
|
|
|
|
|
config_info_line('mkl', 'Build with MKL support.')
|
|
|
|
|
config_info_line('monolithic', 'Config for mostly static monolithic build.')
|
2017-12-05 11:59:17 -08:00
|
|
|
|
2017-07-25 13:30:03 -07:00
|
|
|
if __name__ == '__main__':
|
|
|
|
|
main()
|