aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tools
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <bsteiner@google.com>2017-10-24 19:47:46 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-10-24 19:52:37 -0700
commit355e25ebcab64e833dfc987638c3e6c79d838266 (patch)
tree6c6beafb7e5c7eb3cccbe900d7594eacac6f4481 /tensorflow/tools
parente384e28a97bc9f1da1402c93087e0394e5a0168c (diff)
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
Diffstat (limited to 'tensorflow/tools')
-rw-r--r--tensorflow/tools/api/golden/tensorflow.losses.pbtxt2
-rw-r--r--tensorflow/tools/ci_build/Dockerfile.pi3
-rw-r--r--tensorflow/tools/ci_build/Dockerfile.pi-python323
-rw-r--r--tensorflow/tools/ci_build/README.md143
-rwxr-xr-xtensorflow/tools/ci_build/builds/android_full.sh4
-rwxr-xr-xtensorflow/tools/ci_build/builds/libtensorflow.sh45
-rwxr-xr-xtensorflow/tools/ci_build/install/install_golang.sh2
-rwxr-xr-xtensorflow/tools/ci_build/install/install_pi_python3_toolchain.sh29
-rwxr-xr-xtensorflow/tools/ci_build/install/install_pi_toolchain.sh2
-rwxr-xr-xtensorflow/tools/ci_build/linux/cpu/run_mkl.sh36
-rw-r--r--tensorflow/tools/docker/Dockerfile2
-rw-r--r--tensorflow/tools/docker/Dockerfile.devel4
-rw-r--r--tensorflow/tools/docker/Dockerfile.devel-gpu15
-rw-r--r--tensorflow/tools/docker/Dockerfile.devel-gpu-cuda9-cudnn733
-rw-r--r--tensorflow/tools/docker/Dockerfile.gpu2
-rw-r--r--tensorflow/tools/docker/README.md1
-rw-r--r--tensorflow/tools/pip_package/setup.py5
17 files changed, 231 insertions, 120 deletions
diff --git a/tensorflow/tools/api/golden/tensorflow.losses.pbtxt b/tensorflow/tools/api/golden/tensorflow.losses.pbtxt
index 79443839b9..c1d190ae11 100644
--- a/tensorflow/tools/api/golden/tensorflow.losses.pbtxt
+++ b/tensorflow/tools/api/golden/tensorflow.losses.pbtxt
@@ -18,7 +18,7 @@ tf_module {
}
member_method {
name: "cosine_distance"
- argspec: "args=[\'labels\', \'predictions\', \'dim\', \'weights\', \'scope\', \'loss_collection\', \'reduction\'], varargs=None, keywords=None, defaults=[\'None\', \'1.0\', \'None\', \'losses\', \'weighted_sum_by_nonzero_weights\'], "
+ argspec: "args=[\'labels\', \'predictions\', \'axis\', \'weights\', \'scope\', \'loss_collection\', \'reduction\', \'dim\'], varargs=None, keywords=None, defaults=[\'None\', \'1.0\', \'None\', \'losses\', \'weighted_sum_by_nonzero_weights\', \'None\'], "
}
member_method {
name: "get_losses"
diff --git a/tensorflow/tools/ci_build/Dockerfile.pi b/tensorflow/tools/ci_build/Dockerfile.pi
index 9d12ededb8..2fddd6a2c0 100644
--- a/tensorflow/tools/ci_build/Dockerfile.pi
+++ b/tensorflow/tools/ci_build/Dockerfile.pi
@@ -14,6 +14,9 @@ RUN /install/install_proto3.sh
RUN /install/install_buildifier.sh
RUN /install/install_auditwheel.sh
RUN /install/install_golang.sh
+
+# The following line installs the Python cross-compilation toolchain. All the
+# preceding dependencies should be kept in sync with the main CPU docker file.
RUN /install/install_pi_toolchain.sh
# Set up the master bazelrc configuration file.
diff --git a/tensorflow/tools/ci_build/Dockerfile.pi-python3 b/tensorflow/tools/ci_build/Dockerfile.pi-python3
new file mode 100644
index 0000000000..18b131ea19
--- /dev/null
+++ b/tensorflow/tools/ci_build/Dockerfile.pi-python3
@@ -0,0 +1,23 @@
+FROM ubuntu:14.04
+
+MAINTAINER Jan Prach <jendap@google.com>
+
+# Copy and run the install scripts.
+COPY install/*.sh /install/
+RUN /install/install_bootstrap_deb_packages.sh
+RUN add-apt-repository -y ppa:openjdk-r/ppa && \
+ add-apt-repository -y ppa:george-edison55/cmake-3.x
+RUN /install/install_deb_packages.sh
+RUN /install/install_pip_packages.sh
+RUN /install/install_bazel.sh
+RUN /install/install_proto3.sh
+RUN /install/install_buildifier.sh
+RUN /install/install_auditwheel.sh
+RUN /install/install_golang.sh
+
+# The following line installs the Python cross-compilation toolchain. All the
+# preceding dependencies should be kept in sync with the main CPU docker file.
+RUN /install/install_pi_python3_toolchain.sh
+
+# Set up the master bazelrc configuration file.
+COPY install/.bazelrc /etc/bazel.bazelrc
diff --git a/tensorflow/tools/ci_build/README.md b/tensorflow/tools/ci_build/README.md
index ad83669950..acef833909 100644
--- a/tensorflow/tools/ci_build/README.md
+++ b/tensorflow/tools/ci_build/README.md
@@ -1,115 +1,76 @@
# TensorFlow Builds
-This directory contains all the files and setup instructions to run all
-the important builds and tests. **You can trivially run it yourself!** It also
-run continuous integration [ci.tensorflow.org](https://ci.tensorflow.org).
-
-
+This directory contains all the files and setup instructions to run all the
+important builds and tests. You can run it yourself!
## Run It Yourself
-1. Install [Docker](http://www.docker.com/). Follow instructions
- [on the Docker site](https://docs.docker.com/installation/).
-
- You can run all the jobs **without docker** if you are on mac or on linux
- and you just don't want docker. Just install all the dependencies from
- [Installing TensorFlow](https://www.tensorflow.org/install/).
- Then run any of the one liners below without the
- `tensorflow/tools/ci_build/ci_build.sh` in them.
-
-2. Clone tensorflow repository.
-
- ```bash
- git clone https://github.com/tensorflow/tensorflow.git
- ```
-
-3. Go to tensorflow directory
-
- ```bash
- cd tensorflow
- ```
-
-4. Build what you want, for example
-
- ```bash
- tensorflow/tools/ci_build/ci_build.sh CPU bazel test //tensorflow/...
- ```
- If you are using the Docker image on Windows or OS X, the Docker VM's default
- memory limit may be too low to build TensorFlow. This can result in
- strange-looking errors, e.g. the compilation may fail with `gcc: internal
- compiler error: Killed (program cc1plus)`. Try increasing the memory limit in
- the Docker preferences.
-
-
-## Jobs
-
-The jobs run by [ci.tensorflow.org](https://ci.tensorflow.org) include following:
-
-```bash
-# Note: You can run the following one-liners yourself if you have Docker. Run
-# without `tensorflow/tools/ci_build/ci_build.sh` on mac or linux without Docker.
-
-# build and run cpu tests
-tensorflow/tools/ci_build/ci_build.sh CPU bazel test //tensorflow/...
+You have two options when running TensorFlow tests locally on your
+machine. First, using docker, you can run our Continuous Integration
+(CI) scripts on tensorflow devel images. The other option is to install
+all TensorFlow dependencies on your machine and run the scripts
+natively on your system.
-# build and run gpu tests (note if you get unstable results you may be running
-# out of gpu memory - if so add "--jobs=1" argument)
-tensorflow/tools/ci_build/ci_build.sh GPU bazel test -c opt --config=cuda //tensorflow/...
+### Run TensorFlow CI Scripts using Docker
-# build pip with gpu support
-tensorflow/tools/ci_build/ci_build.sh GPU tensorflow/tools/ci_build/builds/pip.sh GPU -c opt --config=cuda
+1. Install Docker following the [instructions on the docker website](https://docs.docker.com/engine/installation/).
-# build and run gpu tests using python 3
-CI_DOCKER_EXTRA_PARAMS="-e CI_BUILD_PYTHON=python3" tensorflow/tools/ci_build/ci_build.sh GPU tensorflow/tools/ci_build/builds/pip.sh GPU -c opt --config=cuda
+2. Start a container with one of the devel images here:
+ https://hub.docker.com/r/tensorflow/tensorflow/tags/.
-# build android example app
-tensorflow/tools/ci_build/ci_build.sh ANDROID tensorflow/tools/ci_build/builds/android.sh
+3. Based on your choice of the image, pick one of the scripts under
+ https://github.com/tensorflow/tensorflow/tree/master/tensorflow/tools/ci_build/linux
+ and run them from the TensorFlow repository root.
-# cmake cpu build and test
-tensorflow/tools/ci_build/ci_build.sh CPU tensorflow/tools/ci_build/builds/cmake.sh
+### Run TensorFlow CI Scripts Natively on your Machine
-# run bash inside the container
-CI_DOCKER_EXTRA_PARAMS='-it --rm' tensorflow/tools/ci_build/ci_build.sh CPU /bin/bash
-```
+1. Follow the instructions at https://www.tensorflow.org/install/install_sources,
+ but stop when you get to the section "Configure the installation". You do not
+ need to configure the installation to run the CI scripts.
-**Note**: The set of jobs and how they are triggered is still evolving.
-There are builds for master branch on cpu, gpu and android. There is a build
-for incoming gerrit changes. Gpu tests and benchmark are coming soon. Check
-[ci.tensorflow.org](https://ci.tensorflow.org) for current jobs.
+2. Pick the appropriate OS and python version you have installed,
+ and run the script under tensorflow/tools/ci_build/<OS>.
+## TensorFlow Continuous Integration
+To verify that new changes don’t break TensorFlow, we run builds and
+tests on either [Jenkins](https://jenkins-ci.org/) or a CI system
+internal to Google.
-## How Does TensorFlow Continuous Integration Work
+We can trigger builds and tests on updates to master or on each pull
+request. Contact one of the repository maintainers to trigger builds
+on your pull request.
-We use [jenkins](https://jenkins-ci.org/) as our continuous integration.
-It is running at [ci.tensorflow.org](https://ci.tensorflow.org).
-All the jobs are run within [docker](http://www.docker.com/) containers.
+### View CI Results
-Builds can be triggered by push to master, push a change set or manually.
-The build started in jenkins will first pull the git tree. Then jenkins builds
-a docker container (using one of those Dockerfile.* files in this directory).
-The build itself is run within the container itself.
+The Pull Request will show if the change passed or failed the checks.
-Source tree lives in jenkins job workspace. Docker container for jenkins
-are transient - deleted after the build. Containers build very fast thanks
-to docker caching. Individual builds are fast thanks to bazel caching.
+From the pull request, click **Show all checks** to see the list of builds
+and tests. Click on **Details** to see the results from Jenkins or the internal
+CI system.
+Results from Jenkins are displayed in the Jenkins UI. For more information,
+see the [Jenkns documentation](https://jenkins.io/doc/).
+Results from the internal CI system are displayed in the Build Status UI. In
+this UI, to see the logs for a failed build:
-## Implementation Details
+* Click on the **INVOCATION LOG** tab to see the invocation log.
-* The ci_build.sh script create and run docker container with all dependencies.
- The builds/with_the_same_user together with ci_build.sh creates an environment
- which is the same inside the container as it is outside. The same user, group,
- path, so that docker symlinks work inside and outside the container. You can
- use it for your development. Edit files in your git clone directory. If you
- run the ci_build.sh it gets this directory mapped inside the container and
- build your tree.
+* Click on the **ARTIFACTS** tab to see a list of all artifacts, including logs.
-* The unusual `bazel-ci_build-cache` directory is mapped to docker container
- performing the build using docker's --volume parameter. This way we cache
- bazel output between builds.
+* Individual test logs may be available. To see these logs, from the **TARGETS**
+ tab, click on the failed target. Then, click on the **TARGET LOG** tab to see
+ its test log.
-* The `builds` directory within this folder contains shell scripts to run within
- the container. They essentially contains workarounds for current limitations
- of bazel.
+ If you’re looking at target that is sharded or a test that is flaky, then
+ the build tool divided the target into multiple shards or ran the test
+ multiple times. Each test log is specific to the shard, run, and attempt.
+ To see a specific log:
+
+ 1. Click on the log icon that is on the right next to the shard, run,
+ and attempt number.
+
+ 2. In the grid that appears on the right, click on the specific shard,
+ run, and attempt to view its log. You can also type the desired shard,
+ run, or attempt number in the field above its grid.
diff --git a/tensorflow/tools/ci_build/builds/android_full.sh b/tensorflow/tools/ci_build/builds/android_full.sh
index 63250e0a4d..9d449241e8 100755
--- a/tensorflow/tools/ci_build/builds/android_full.sh
+++ b/tensorflow/tools/ci_build/builds/android_full.sh
@@ -40,7 +40,7 @@ rm -rf ${AAR_LIB_TMP}
for CPU in ${CPUS//,/ }
do
echo "========== Building native libs for Android ${CPU} =========="
- bazel build -c opt --cpu=${CPU} \
+ bazel build -c opt --config=monolithic --cpu=${CPU} \
--crosstool_top=//external:android/crosstool \
--host_crosstool_top=@bazel_tools//tools/cpp:toolchain \
//tensorflow/core:android_tensorflow_lib \
@@ -62,7 +62,7 @@ done
# in assets/ dir (see https://github.com/bazelbuild/bazel/issues/2334)
# TODO(gunan): remove extra flags once sandboxing is enabled for all builds.
echo "========== Building TensorFlow Android Jar and Demo =========="
-bazel --bazelrc=/dev/null build -c opt --fat_apk_cpu=${CPUS} \
+bazel --bazelrc=/dev/null build -c opt --config=monolithic --fat_apk_cpu=${CPUS} \
--spawn_strategy=sandboxed --genrule_strategy=sandboxed \
//tensorflow/contrib/android:android_tensorflow_inference_java \
//tensorflow/contrib/android:android_tensorflow_inference_java.aar \
diff --git a/tensorflow/tools/ci_build/builds/libtensorflow.sh b/tensorflow/tools/ci_build/builds/libtensorflow.sh
index 5052d3626c..26713dded8 100755
--- a/tensorflow/tools/ci_build/builds/libtensorflow.sh
+++ b/tensorflow/tools/ci_build/builds/libtensorflow.sh
@@ -78,9 +78,52 @@ function build_libtensorflow_tarball() {
//tensorflow/tools/lib_package:libtensorflow_proto.zip
mkdir -p ${DIR}
+
cp bazel-bin/tensorflow/tools/lib_package/libtensorflow.tar.gz ${DIR}/libtensorflow${TARBALL_SUFFIX}.tar.gz
cp bazel-bin/tensorflow/tools/lib_package/libtensorflow_jni.tar.gz ${DIR}/libtensorflow_jni${TARBALL_SUFFIX}.tar.gz
- cp bazel-bin/tensorflow/java/libtensorflow.jar bazel-bin/tensorflow/java/libtensorflow-src.jar ${DIR}
+ cp bazel-bin/tensorflow/java/libtensorflow.jar ${DIR}
+ cp_normalized_srcjar bazel-bin/tensorflow/java/libtensorflow-src.jar ${DIR}/libtensorflow-src.jar
cp bazel-genfiles/tensorflow/tools/lib_package/libtensorflow_proto.zip ${DIR}
chmod -x ${DIR}/*
}
+
+# Helper function to copy a srcjar after moving any source files
+# directly under the root to the "maven-style" src/main/java layout
+#
+# Source files generated by annotation processors appear directly
+# under the root of srcjars jars created by bazel, rather than under
+# the maven-style src/main/java subdirectory.
+#
+# Bazel manages annotation generated source as follows: First, it
+# calls javac with options that create generated files under a
+# bazel-out directory. Next, it archives the generated source files
+# into a srcjar directly under the root. There doesn't appear to be a
+# simple way to parameterize this from bazel, hence this helper to
+# "normalize" the srcjar layout.
+#
+# Arguments:
+# src_jar - path to the original srcjar
+# dest_jar - path to the destination
+# Returns:
+# None
+function cp_normalized_srcjar() {
+ local src_jar="$1"
+ local dest_jar="$2"
+ if [[ -z "${src_jar}" || -z "${dest_jar}" ]]; then
+ echo "Unexpected: missing arguments" >&2
+ exit 2
+ fi
+ local tmp_dir
+ tmp_dir=$(mktemp -d)
+ cp "${src_jar}" "${tmp_dir}/orig.jar"
+ pushd "${tmp_dir}"
+ # Extract any src/ files
+ jar -xf "${tmp_dir}/orig.jar" src/
+ # Extract any org/ files under src/main/java
+ (mkdir -p src/main/java && cd src/main/java && jar -xf "${tmp_dir}/orig.jar" org/)
+ # Repackage src/
+ jar -cMf "${tmp_dir}/new.jar" src
+ popd
+ cp "${tmp_dir}/new.jar" "${dest_jar}"
+ rm -rf "${tmp_dir}"
+}
diff --git a/tensorflow/tools/ci_build/install/install_golang.sh b/tensorflow/tools/ci_build/install/install_golang.sh
index 596265b069..55c1674495 100755
--- a/tensorflow/tools/ci_build/install/install_golang.sh
+++ b/tensorflow/tools/ci_build/install/install_golang.sh
@@ -16,7 +16,7 @@
set -ex
-GOLANG_URL="https://storage.googleapis.com/golang/go1.9.linux-amd64.tar.gz"
+GOLANG_URL="https://storage.googleapis.com/golang/go1.9.1.linux-amd64.tar.gz"
sudo mkdir -p /usr/local
wget -q -O - "${GOLANG_URL}" | sudo tar -C /usr/local -xz
diff --git a/tensorflow/tools/ci_build/install/install_pi_python3_toolchain.sh b/tensorflow/tools/ci_build/install/install_pi_python3_toolchain.sh
new file mode 100755
index 0000000000..9d8e3df3b5
--- /dev/null
+++ b/tensorflow/tools/ci_build/install/install_pi_python3_toolchain.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+# 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.
+# ==============================================================================
+
+dpkg --add-architecture armhf
+echo 'deb [arch=armhf] http://ports.ubuntu.com/ trusty main restricted universe multiverse' >> /etc/apt/sources.list.d/armhf.list
+echo 'deb [arch=armhf] http://ports.ubuntu.com/ trusty-updates main restricted universe multiverse' >> /etc/apt/sources.list.d/armhf.list
+echo 'deb [arch=armhf] http://ports.ubuntu.com/ trusty-security main restricted universe multiverse' >> /etc/apt/sources.list.d/armhf.list
+echo 'deb [arch=armhf] http://ports.ubuntu.com/ trusty-backports main restricted universe multiverse' >> /etc/apt/sources.list.d/armhf.list
+sed -i 's#deb http://archive.ubuntu.com/ubuntu/#deb [arch=amd64] http://archive.ubuntu.com/ubuntu/#g' /etc/apt/sources.list
+apt-get update
+apt-get install -y libpython3-all-dev:armhf
+echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
+curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
+apt-get update
+rm -rf /usr/local/bin/bazel
+apt-get install -y bazel python3 python3-numpy python3-dev python3-pip
diff --git a/tensorflow/tools/ci_build/install/install_pi_toolchain.sh b/tensorflow/tools/ci_build/install/install_pi_toolchain.sh
index ef30ba58c2..03c43cc838 100755
--- a/tensorflow/tools/ci_build/install/install_pi_toolchain.sh
+++ b/tensorflow/tools/ci_build/install/install_pi_toolchain.sh
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
-# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
+# 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.
diff --git a/tensorflow/tools/ci_build/linux/cpu/run_mkl.sh b/tensorflow/tools/ci_build/linux/cpu/run_mkl.sh
new file mode 100755
index 0000000000..dbf376be6f
--- /dev/null
+++ b/tensorflow/tools/ci_build/linux/cpu/run_mkl.sh
@@ -0,0 +1,36 @@
+#!/usr/bin/env bash
+# Copyright 2016 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.
+#
+# ==============================================================================
+
+set -e
+set -x
+
+N_JOBS=$(grep -c ^processor /proc/cpuinfo)
+
+echo ""
+echo "Bazel will use ${N_JOBS} concurrent job(s)."
+echo ""
+
+# Run configure.
+export TF_NEED_CUDA=0
+export PYTHON_BIN_PATH=`which python2`
+yes "" | $PYTHON_BIN_PATH configure.py
+
+# Run bazel test command. Double test timeouts to avoid flakes.
+bazel test --test_tag_filters=-no_oss,-oss_serial,-gpu,-benchmark-test --test_lang_filters=py -k \
+ --jobs=${N_JOBS} --test_timeout 300,450,1200,3600 --build_tests_only \
+ --config=mkl --config=opt --test_output=errors -- \
+ //tensorflow/... -//tensorflow/compiler/... -//tensorflow/contrib/...
diff --git a/tensorflow/tools/docker/Dockerfile b/tensorflow/tools/docker/Dockerfile
index 07a972400d..024cb40eb4 100644
--- a/tensorflow/tools/docker/Dockerfile
+++ b/tensorflow/tools/docker/Dockerfile
@@ -1,6 +1,6 @@
FROM ubuntu:16.04
-MAINTAINER Craig Citro <craigcitro@google.com>
+LABEL maintainer="Craig Citro <craigcitro@google.com>"
# Pick up some TF dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
diff --git a/tensorflow/tools/docker/Dockerfile.devel b/tensorflow/tools/docker/Dockerfile.devel
index 60a94504b7..20e1dcd085 100644
--- a/tensorflow/tools/docker/Dockerfile.devel
+++ b/tensorflow/tools/docker/Dockerfile.devel
@@ -1,6 +1,6 @@
FROM ubuntu:16.04
-MAINTAINER Craig Citro <craigcitro@google.com>
+LABEL maintainer="Craig Citro <craigcitro@google.com>"
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
@@ -72,7 +72,7 @@ RUN mkdir /bazel && \
RUN git clone https://github.com/tensorflow/tensorflow.git && \
cd tensorflow && \
- git checkout r1.3
+ git checkout r1.4
WORKDIR /tensorflow
# TODO(craigcitro): Don't install the pip package, since it makes it
diff --git a/tensorflow/tools/docker/Dockerfile.devel-gpu b/tensorflow/tools/docker/Dockerfile.devel-gpu
index 04773376e9..21a44ee404 100644
--- a/tensorflow/tools/docker/Dockerfile.devel-gpu
+++ b/tensorflow/tools/docker/Dockerfile.devel-gpu
@@ -1,6 +1,6 @@
FROM nvidia/cuda:8.0-cudnn6-devel-ubuntu16.04
-MAINTAINER Craig Citro <craigcitro@google.com>
+LABEL maintainer="Craig Citro <craigcitro@google.com>"
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
@@ -73,20 +73,23 @@ RUN mkdir /bazel && \
RUN git clone https://github.com/tensorflow/tensorflow.git && \
cd tensorflow && \
- git checkout r1.3
+ git checkout r1.4
WORKDIR /tensorflow
# Configure the build for our CUDA configuration.
ENV CI_BUILD_PYTHON python
-ENV LD_LIBRARY_PATH /usr/local/cuda/lib64/stubs:/usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH
+ENV LD_LIBRARY_PATH /usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH
ENV TF_NEED_CUDA 1
ENV TF_CUDA_COMPUTE_CAPABILITIES=3.0,3.5,5.2,6.0,6.1
-RUN ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1
-RUN tensorflow/tools/ci_build/builds/configured GPU \
- bazel build -c opt --config=cuda --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" \
+RUN ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1 && \
+ LD_LIBRARY_PATH=/usr/local/cuda/lib64/stubs:${LD_LIBRARY_PATH} \
+ tensorflow/tools/ci_build/builds/configured GPU \
+ bazel build -c opt --config=cuda \
+ --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" \
tensorflow/tools/pip_package:build_pip_package && \
+ rm /usr/local/cuda/lib64/stubs/libcuda.so.1 && \
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/pip && \
pip --no-cache-dir install --upgrade /tmp/pip/tensorflow-*.whl && \
rm -rf /tmp/pip && \
diff --git a/tensorflow/tools/docker/Dockerfile.devel-gpu-cuda9-cudnn7 b/tensorflow/tools/docker/Dockerfile.devel-gpu-cuda9-cudnn7
index ac1a437031..4558bc5293 100644
--- a/tensorflow/tools/docker/Dockerfile.devel-gpu-cuda9-cudnn7
+++ b/tensorflow/tools/docker/Dockerfile.devel-gpu-cuda9-cudnn7
@@ -42,6 +42,7 @@ RUN pip --no-cache-dir install \
scipy \
sklearn \
pandas \
+ wheel \
&& \
python -m ipykernel.kernelspec
@@ -80,22 +81,32 @@ RUN git clone https://github.com/tensorflow/tensorflow.git && \
WORKDIR /tensorflow
# Configure the build for our CUDA configuration.
-ENV CI_BUILD_PYTHON python
-ENV LD_LIBRARY_PATH /usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH
-ENV TF_NEED_CUDA 1
-ENV TF_CUDA_COMPUTE_CAPABILITIES 3.0,3.5,5.2,6.0,6.1
-ENV TF_CUDA_VERSION 9.0
-ENV TF_CUDNN_VERSION 7.0
+ENV CI_BUILD_PYTHON=python \
+ LD_LIBRARY_PATH=/usr/local/cuda/extras/CUPTI/lib64:${LD_LIBRARY_PATH} \
+ CUDNN_INSTALL_PATH=/usr/lib/x86_64-linux-gnu \
+ PYTHON_BIN_PATH=/usr/bin/python \
+ PYTHON_LIB_PATH=/usr/local/lib/python2.7/dist-packages \
+ TF_NEED_CUDA=1 \
+ TF_CUDA_VERSION=9.0 \
+ TF_CUDA_COMPUTE_CAPABILITIES=3.0,3.5,5.2,6.0,6.1,7.0 \
+ TF_CUDNN_VERSION=7
RUN ./configure
-RUN LD_LIBRARY_PATH=/usr/local/cuda/lib64/stubs:${LD_LIBRARY_PATH} \
- bazel build -c opt --config=cuda --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" \
- --jobs=${TF_AVAILABLE_CPUS} \
- tensorflow/tools/pip_package:build_pip_package && \
- mkdir -p /pip_pkg && \
+# Build and Install TensorFlow.
+RUN ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1 && \
+ LD_LIBRARY_PATH=/usr/local/cuda/lib64/stubs:${LD_LIBRARY_PATH} \
+ bazel build -c opt \
+ --config=cuda \
+ --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" \
+ --jobs=${TF_AVAILABLE_CPUS} \
+ tensorflow/tools/pip_package:build_pip_package && \
+ mkdir /pip_pkg && \
bazel-bin/tensorflow/tools/pip_package/build_pip_package /pip_pkg
+# Clean up pip wheel and Bazel cache when done.
RUN pip --no-cache-dir install --upgrade /pip_pkg/tensorflow-*.whl && \
+ rm -rf /pip_pkg && \
+ rm -rf /root/.cache
WORKDIR /root
diff --git a/tensorflow/tools/docker/Dockerfile.gpu b/tensorflow/tools/docker/Dockerfile.gpu
index da83a30058..0571dd7391 100644
--- a/tensorflow/tools/docker/Dockerfile.gpu
+++ b/tensorflow/tools/docker/Dockerfile.gpu
@@ -1,6 +1,6 @@
FROM nvidia/cuda:8.0-cudnn6-devel-ubuntu16.04
-MAINTAINER Craig Citro <craigcitro@google.com>
+LABEL maintainer="Craig Citro <craigcitro@google.com>"
# Pick up some TF dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
diff --git a/tensorflow/tools/docker/README.md b/tensorflow/tools/docker/README.md
index 3780bde2be..2e5a0038ed 100644
--- a/tensorflow/tools/docker/README.md
+++ b/tensorflow/tools/docker/README.md
@@ -41,6 +41,7 @@ Note: If you would have a problem running nvidia-docker you may try the old meth
we have used. But it is not recommended. If you find a bug in nvidia-docker, please report
it there and try using nvidia-docker as described above.
+ $ # The old, not recommended way to run docker with gpu support:
$ export CUDA_SO=$(\ls /usr/lib/x86_64-linux-gnu/libcuda.* | xargs -I{} echo '-v {}:{}')
$ export DEVICES=$(\ls /dev/nvidia* | xargs -I{} echo '--device {}:{}')
$ docker run -it -p 8888:8888 $CUDA_SO $DEVICES gcr.io/tensorflow/tensorflow:latest-gpu
diff --git a/tensorflow/tools/pip_package/setup.py b/tensorflow/tools/pip_package/setup.py
index c05d39e942..4f0de8f768 100644
--- a/tensorflow/tools/pip_package/setup.py
+++ b/tensorflow/tools/pip_package/setup.py
@@ -29,14 +29,14 @@ from setuptools.dist import Distribution
# This version string is semver compatible, but incompatible with pip.
# For pip, we will remove all '-' characters from this string, and use the
# result for pip.
-_VERSION = '1.3.0'
+_VERSION = '1.4.0-rc0'
REQUIRED_PACKAGES = [
'enum34 >= 1.1.6',
'numpy >= 1.12.1',
'six >= 1.10.0',
'protobuf >= 3.4.0',
- 'tensorflow-tensorboard >= 0.1.0, < 0.2.0',
+ 'tensorflow-tensorboard >= 0.4.0rc1, < 0.5.0',
]
project_name = 'tensorflow'
@@ -67,6 +67,7 @@ if sys.version_info < (3, 4):
# pylint: disable=line-too-long
CONSOLE_SCRIPTS = [
+ 'freeze_graph = tensorflow.python.tools.freeze_graph:main',
'saved_model_cli = tensorflow.python.tools.saved_model_cli:main',
# We need to keep the TensorBoard command, even though the console script
# is now declared by the tensorboard pip package. If we remove the