Repository navigation
Conversation
See #11788 PiperOrigin-RevId: 163287731
…ly fails with the GPU backend. PiperOrigin-RevId: 163287986
PiperOrigin-RevId: 163291947
PiperOrigin-RevId: 163292777
PiperOrigin-RevId: 163295986
PiperOrigin-RevId: 163299121
- 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
legacy form. This makes DeviceSet behaves the same as DeviceMgr's FindDevice method. PiperOrigin-RevId: 163300346
…ory. PiperOrigin-RevId: 163318992
PiperOrigin-RevId: 163332598
PiperOrigin-RevId: 163344629
PiperOrigin-RevId: 163349457
…ded. PiperOrigin-RevId: 163353430
PiperOrigin-RevId: 163354724
Fixes #11786 PiperOrigin-RevId: 163359134
PiperOrigin-RevId: 163360375
PiperOrigin-RevId: 163360750
PiperOrigin-RevId: 163361071
PiperOrigin-RevId: 163364341
PiperOrigin-RevId: 163378484
PiperOrigin-RevId: 163384927
…tion. PiperOrigin-RevId: 163386941
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
PiperOrigin-RevId: 163390862
…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
into one place. Previously, Partition() and MasterSession::RegisterPartition() both fills in the partitioned graph's function library. PiperOrigin-RevId: 163400992
PiperOrigin-RevId: 163405986
PiperOrigin-RevId: 163407824
Collaborator
|
FAILURE |
Owner
Author
|
Jenkins test this please. |
Fix #11803: Force CUPTI to flush GPU activity buffers when stopping tracing.
Improve docstrings involving package structure
Owner
Author
|
Jenkins, test this please. |
PiperOrigin-RevId: 163900441
END_PUBLIC --- Commit e62de3f authored by Kay Zhu<[email protected]> Committed by TensorFlower Gardener<[email protected]>: [XLA] Handle Reverse in HloEvaluator. Also move HandleCopy to outer visitor instead, since it can be implemented as a type-agnostic copy instead. PiperOrigin-RevId: 163866499 --- Commit 9667595 authored by Asim Shankar<[email protected]> Committed by TensorFlower Gardener<[email protected]>: C API: Avoid converting uninitialized tensorflow::Tensor to TF_Tensor* And return error messages instead of CHECK failing when the conversion fails. PiperOrigin-RevId: 163863981 --- Commit 9593704 authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Fix framework import function dependency. PiperOrigin-RevId: 163863883 --- Commit 66f1485 authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Improve performance of compilation by ~8% by speeding up the hlo rematerialization pass. Changes: . Wrap each HloInstruction* inside an Item structure that keeps associated data. This allows us to get rid of a bunch of hash tables indexed by HloInstruction*. * Switch to an intrusive linked list (instead of std::list) so that we can avoid a hash table that maps to std::list::iterator. * Use inlined vector in a few places. PiperOrigin-RevId: 163848365 --- Commit 6d77a01 authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Hide NonMaxSuppression and NonMaxSuppressionV2 ops and add a python wrapper that sets a backwards compatible default value for iou_threshold. PiperOrigin-RevId: 163844703 --- Commit 1a44996 authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Fix: add GDN to __init__. Also put it in alphabetical order. PiperOrigin-RevId: 163842410 --- Commit db0e1c6 authored by Benoit Steiner<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Don't force inlining of functions marked no-inline PiperOrigin-RevId: 163842238 --- Commit 18718b6 authored by Benoit Steiner<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Misc grappler improvements: * Avoid copying optimized graphs since that takes time. * Avoid optimizing a pruned graph, since it's already been pruned there isn't much to gain PiperOrigin-RevId: 163842122 --- Commit 90abbf6 authored by Benoit Steiner<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Use OP_REQUIRES instead of an assertion to validate op arguments PiperOrigin-RevId: 163841759 --- Commit 203c3f5 authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Infer unknown shapes for functions in C++ As we are implementing function support through C API, the new code path runs shape inference of Operations representing functions, but we don't yet support shape inference for functions. Before this change, adding a function NodeDef would result in error. This change pairs all functions with a shape inference function that sets all output shapes to unknown. PiperOrigin-RevId: 163830793 --- Commit 3cc5fc0 authored by Chris Leary<[email protected]> Committed by TensorFlower Gardener<[email protected]>: [XLA] Implement MirrorPad op. Addresses #11890 * Improves the shape inference error message for concatenate. * Adds a helper to Literal that gets an integral value converted to int64. PiperOrigin-RevId: 163829437 --- Commit c7b674f authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: flatten_up_to should return values, not keys PiperOrigin-RevId: 163809688 --- Commit 6209b4b authored by Asim Shankar<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Minor refactoring the TF_Tensor <-> PyArray conversion functions. PiperOrigin-RevId: 163802822 --- Commit 618f913 authored by Yao Zhang<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Speed up topological sort by avoiding copies. The speedup is about 10-20%. PiperOrigin-RevId: 163800134 --- Commit 6446895 authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Remove and replace broken giflib download link PiperOrigin-RevId: 163796393 --- Commit 9d56130 authored by Chris Leary<[email protected]> Committed by TensorFlower Gardener<[email protected]>: [XLA:CPU] Atomically enqueue tuple buffers for outfeed. Previously it was possible that a distinct thread could hop in between the buffer enqueues done by a tuple-outfeeding thread. This changes the sequence to enqueue all the tuple buffers as an atomic unit. PiperOrigin-RevId: 163781804 --- Commit b882d68 authored by Bjarke Hammersholt Roune<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Allow cost estimates to differ per backend and include the estimates into the HLO profile. Add a summary table for what categories have the most opportunity for optimization left in them. PiperOrigin-RevId: 163780413 --- Commit 14b7367 authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Pass stats_collector when using SymbolicGradientOp. PiperOrigin-RevId: 163773897 --- Commit 5202a5b authored by RJ Ryan<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Fix some typos in StreamExecutor's cuFFT support. PiperOrigin-RevId: 163771825 --- Commit edac90c authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Add support to generate pprof results to tf.profiler A fun thing is, it can not only profile time,memory but also parameters, etc. PiperOrigin-RevId: 163767517 --- Commit 78a9037 authored by Eli Bendersky<[email protected]> Committed by TensorFlower Gardener<[email protected]>: [XLA] Refactor CreateModuleConfig to share code between multiple call-sites. Previously Service, LocalService and CompileOnlyService had their own code to create a new HloModuleConfig, with much repetition (and some ommissions); collect all these uses in a single method. PiperOrigin-RevId: 163766869 --- Commit 6150611 authored by Anna R<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Internal change. PiperOrigin-RevId: 163765028 --- Commit 9e78754 authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Add the option of including Shape, ShapeN, Size and Rank in the standard TensorFlow constant propagation pass, when the inputs to those Ops have sufficiently known static shape. PiperOrigin-RevId: 163762750 --- Commit 8b1365b authored by Yuefeng Zhou<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Infer output shape for restore op. PiperOrigin-RevId: 163762216 --- Commit 2e2a853 authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Update WorkerCacheLogger::RecordDataTransfer to not modify the details if provided. PiperOrigin-RevId: 163761089 --- Commit d03ba54 authored by Yangzihao Wang<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Use BlasGemv() when autotune is not set. PiperOrigin-RevId: 163754092 --- Commit 724884f authored by Justin Lebar<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Show layouts in HLO graph dump. Layouts are displayed as e.g. "f32[100,200]{0,1}". But constants used to be displayed as e.g. "f32[]{42}". To avoid ambiguity, constants are now displayed as e.g. "42 (f32[])". Also gets rid of the xla_hlo_graph_layout flag, which is no longer necessary since we're now showing layouts unconditionally. PiperOrigin-RevId: 163753637 --- Commit 84c2757 authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Move Grappler test GraphDefs to separate files PiperOrigin-RevId: 163751948 --- Commit 0b3a25d authored by Asim Shankar<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Make TF_RESOURCE memory handling consistent with other types. TF_Tensor's are backed by a contiguous memory region for all but TF_RESOURCE tensors. The memory management of TF_RESOURCE tensors required keeping a backing tensorflow::ResourceHandle* object alive for the lifetime of the TF_Tensor object. This change removes that discrepancy, making the memory backing TF_RESOURCE tensors self-contained. This simplifies use of TF_RESOURCE tensors in the C API (as users of the C API do not need to worry about a tensorflow::ResourceHandle object and its lifetime). In doing so, this moves a string memory copy from the TF_Tensor <-> Numpy conversion to the C API from the Python session helper. Unfortunately, I couldn't figure out how to add a simple unittest in c_api_test.cc. The more comprehensive tensorflow/python/kernel_tests/session_ops_test.py does cover the changed lines though. Additionally, avoid an unnecessary copy when creating TF_STRING or TF_RESOURCE tensors (as eigen alignment is not a requirement for them). PiperOrigin-RevId: 163751880 --- Commit 1333e77 authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Allow one tensor to be the input to the estimator. PiperOrigin-RevId: 163747076 --- Commit 104f349 authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Update Conv2DShape function to handle filters that have data NCHW_VECT_C layout. PiperOrigin-RevId: 163746769 --- Commit efb7fb8 authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Use XLA_VLOG_LINES() in literal_test_util to avoid truncation of large tensors. PiperOrigin-RevId: 163745522 --- Commit 043505a authored by Suharsh Sivakumar<[email protected]> Committed by TensorFlower Gardener<[email protected]>: MasterSession should throw error if use_per_session_threads or session_inter_op_thread_pool is set. PiperOrigin-RevId: 163743936 --- Commit 6ba02f0 authored by Artem Belevich<[email protected]> Committed by TensorFlower Gardener<[email protected]>: [XLA] Added HasAllocationAt() helper function. PiperOrigin-RevId: 163742985 --- Commit 1830468 authored by Justine Tunney<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Pin tensorflow to tensorflow-tensorboard 0.1.x This change will be cherry-picked into the 1.3.0 release. PiperOrigin-RevId: 163742463 --- Commit 3445dd0 authored by Justine Tunney<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Make 'import tensorflow' go faster It now takes about 400ms rather than 800ms, if the file system cache is warm. Most of the latency was due to parsing text_format OpList protocol buffers in our generated sources. We now use a binary representation, while preserving the text proto as a comment for readability. Note: This change does not improve the latency of dereferencing tf.contrib, which takes about 340ms. PiperOrigin-RevId: 163739355 --- Commit c215c55 authored by Neal Wu<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Add missing py_binary for mnist_deep.py PiperOrigin-RevId: 163737503 --- Commit b663c98 authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Make non-iterable input to `stratified_sample` produce better error message. PiperOrigin-RevId: 163735979 --- Commit 122750a authored by Peter Hawkins<[email protected]> Committed by TensorFlower Gardener<[email protected]>: [SE] Make ExecutorCache thread-safe, change ExecutorCache::Insert to ExecutorCache::GetOrCreate. Add support for creating Executors for different device ordinals in parallel. [XLA] Create Executors in parallel. PiperOrigin-RevId: 163734988 --- Commit 7ebed66 authored by Frank Chen<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Add __init__.py to the contrib/cluster_resolver directory so that the Cluster Resolver classes within this are visible to open source TensorFlow users. PiperOrigin-RevId: 163733781 --- Commit 21faf19 authored by Shanqing Cai<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Upgrade pip version to 9.0.1; Prettier format of log text * Upgrade pip version used in virtualenv created by the test-on-install to latest (9.0.1). * Highlight step titles of pip builds with bold font. PiperOrigin-RevId: 163732825 --- Commit 5887cc1 authored by Kay Zhu<[email protected]> Committed by TensorFlower Gardener<[email protected]>: [XLA] In LiteralUtil::StridedConfig: choose the larger dimension between the source and destination shapes' minor-most dimension index. PiperOrigin-RevId: 163732014 --- Commit f9c6446 authored by Peter Hawkins<[email protected]> Committed by TensorFlower Gardener<[email protected]>: [TF:XLA] Disable sanitizers for depthwise conv test to fix test flakiness. PiperOrigin-RevId: 163727765 --- Commit 6263539 authored by Allen Lavoie<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Grappler memory optimization: allow inputs to gradients with non-standard names to be recomputed Includes Python tests for name-scoped gradients. PiperOrigin-RevId: 163720208 --- Commit 4ac1956 authored by Benoit Steiner<[email protected]> Committed by GitHub<[email protected]>: Branch 163695881 (#11913) * Prevent ctc_loss op from segfaulting when given empty batch. PiperOrigin-RevId: 163663460 * New "SavedModel: Practical Uses" and "SavedModel: Architecture" documents. PiperOrigin-RevId: 163669809 * Minor cleanup PiperOrigin-RevId: 163685423 * Add regression variance over individual trees to TensorForest inference. PiperOrigin-RevId: 163695881 --- Commit b876065 authored by Alexandre Passos<[email protected]> Committed by TensorFlower Gardener<[email protected]>: graph_to_function_def gets its own file PiperOrigin-RevId: 163709410 --- Commit 2955076 authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Fixes unit tests for inverse hyperbolic functions that were failing because numeric gradients were computed too close to a branch cut (for complex arguments) or singularity (for real arguments) where the function is not differentiable (See, e.g., http://mathworld.wolfram.com/BranchCut.html). This change moves the test points away from the branch cut/singularity. Improves precision of double precision numerical gradients by using a smaller step size delta (the optimal for symmetric difference approximation with functions computed with O(epsilon) error is epsilon^(1/3), so for double64 it is ~1e-5). PiperOrigin-RevId: 163706297 --- Commit 99b190a authored by Peter Hawkins<[email protected]> Committed by TensorFlower Gardener<[email protected]>: [TF:XLA] Add implementation of depthwise convolution. This implementation expands the depthwise convolution kernels into a regular convolution kernel, which may not scale to large feature depths. PiperOrigin-RevId: 163705408 --- Commit f6f07b0 authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Allow kernel unit tests to run on GPU PiperOrigin-RevId: 163705027 --- Commit 4ec29c5 authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Avoid direct access to Node::def() where some other method works. PiperOrigin-RevId: 163704839 --- Commit 153be4d authored by Luke Iwanski<[email protected]> Committed by Benoit Steiner<[email protected]>: [OpenCL] Stats tracking (#11523) * Adds stat tracking to the SYCL allocator The SYCLAllocator will now find the max allocation size on construction, and keep track of the allocation stats, as given in AllocationStats. * [OpenCL] Adds buffer size tracking to SYCL allocator (#114) The SYCL buffers underlying tensors already keep track of their sizes, so we can easily provide this tracking information for debugging purposes. --- Commit 8d64267 authored by Amit Patankar<[email protected]> Committed by Amit Patankar<[email protected]>: Disabling gmm_test.py on Windows builds as it's flaky on GPU nightly builds. --- Commit 1560c55 authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Add regression variance over individual trees to TensorForest inference. PiperOrigin-RevId: 163695881 --- Commit 15e928d authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Minor cleanup PiperOrigin-RevId: 163685423 --- Commit f9c7587 authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: New "SavedModel: Practical Uses" and "SavedModel: Architecture" documents. PiperOrigin-RevId: 163669809 --- Commit f19bb3b authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Prevent ctc_loss op from segfaulting when given empty batch. PiperOrigin-RevId: 163663460 --- Commit 454fe93 authored by Taehoon Lee<[email protected]> Committed by Taehoon Lee<[email protected]>: Fix typos --- Commit e17650b authored by Frank Chen<[email protected]> Committed by TensorFlower Gardener<[email protected]>: This adds the cluster_resolver module to contrib/__init__.py so that it is actually visible to open source TensorFlow users. PiperOrigin-RevId: 163636676 --- Commit 926c0f6 authored by ??<[email protected]> Committed by GitHub<[email protected]>: fix minor typo --- Commit 00d3126 authored by Yao Zhang<[email protected]> Committed by TensorFlower Gardener<[email protected]>: Change const nodes to variables in the test, so that they are not optimized away by the grappler constant folding pass. PiperOrigin-RevId: 163602405 --- Commit 1c7c9c7 authored by Aditya Dhulipala<[email protected]> Committed by Vijay Vasudevan<[email protected]>: Minor typo correction (#11874) --- Commit f91a354 authored by Sergii Khomenko<[email protected]> Committed by Vijay Vasudevan<[email protected]>: Fix a minor typo (#11873) --- Commit adf5d1b authored by A. Unique TensorFlower<[email protected]> Committed by TensorFlower Gardener<[email protected]>: BEGIN_PUBLIC Automated g4 rollback of changelist 163510186 PiperOrigin-RevId: 163902859
Expand BatchNormGrad into smaller ops and use multi-output fusion to speed them up. RELNOTES: n/a PiperOrigin-RevId: 163903421
163914294 by annarev:
Refactors build target for gradients_impl to allow code to depend on the gradient generation but not the gradients themselves.
--
1639130 by A. Unique TensorFlower:
Use an LLVM-IR version of vector hyperbolic tangent.
This lets us:
- Inline routine where it is called, eliminated call overhead.
- Use AVX instructions in JITed code even if Tensorflow was not built with -mavx.
--
163909534 by A. Unique TensorFlower:
Add tensorflow-android to standard TF maven artifacts.
--
163908704 by A. Unique TensorFlower:
Go: Update generated wrapper functions for TensorFlow ops.
--
163907709 by A. Unique TensorFlower:
Update ops-related pbtxt files.
--
163907497 by A. Unique TensorFlower:
Remove old TensorFlow Serving landing page in prepartion for new TF
Serving landing page. Fix bad leftnav.
--
163906225 by alive:
Refactors build target for gradients_impl to allow code to depend on the gradient generation but not the gradients themselves.
--
PiperOrigin-RevId: 163914294
* Save/restore bidi-Cudnn params in canonical format. (Note support for save/restore in TF RNN cell format will come later.) * Split CudnnRNNTest into multiple test classes. Move common utils out of class scope. PiperOrigin-RevId: 163921182
Fix missing const-analysis annotation for AvgPool3DGrad found by randomized tests. PiperOrigin-RevId: 163922076
PiperOrigin-RevId: 163924726
PiperOrigin-RevId: 163926384
Because all stats are from the leaf, if we trim the leaf, the parents by themselves have no stats. PiperOrigin-RevId: 163929193
…e of algorithm (between with scratch or without scratch). Remove valid_ and set_is_valid() in dnn::ProfileResult, instead use (algorithm_ != kDefaultAlgorithm) to see if the result is valid. PiperOrigin-RevId: 163931258
This allows it to be iterated over by a for-loop. PiperOrigin-RevId: 163950729
PiperOrigin-RevId: 163956516
PiperOrigin-RevId: 163962743
PiperOrigin-RevId: 163982579
the parent field is currently null. PiperOrigin-RevId: 163983198
Branch 163983198
av8ramit
pushed a commit
that referenced
this pull request
Sep 18, 2017
…rflow#12299) * Allreduce: Rebase to TF 1.3-rc1 (#3) * Introduce MPI allreduce in a new contrib project. This commit adds the tensorflow.contrib.mpi namespace and contrib project, which has a variety of ops that work with MPI. The MPI system works by starting a background thread which communicates between the different processes at a regular interval and schedules asynchronous reductions. At every tick, every rank will notify rank zero of the tensors it is ready to reduce, signifying completion with an empty DONE message. Rank zero will count how many ranks are ready to reduce every tensor, and, whenever a tensor is ready to reduce (that is, every rank is ready to reduce it), rank zero will issue a message to all other ranks directing them to reduce that tensor. This repeats for all the tensors that are ready to reduce, after which rank zero sends all other ranks a DONE message indicating that the tick is complete. Reviewed-by: Joel Hestness <[email protected]> * Allreduce/Allgather: Major changes and fixes (#2) This commit constitutes many major updates to the TF MPI allreduce and allgather ops. Specifically, the following changes are included in this commit: 1) The allreduce and allgather ops had race conditions, which this commit fixes. Specifically, the BackgroundThreadLoop previously allocated temporary and output tensors after the main graph traversal thread has completed its call to MPIAll*::ComputeAsync(). Unfortunately, the ops kernel context's memory allocator is only guaranteed to be valid during the ComputeAsync call. This constraint requires ComputeAsync to allocate all tensors before returning; Otherwise, the memory allocator state may reflect allocations and deallocations from further ops that can cause races for the memory locations. To fix this, hoist the memory allocations to ComputeAsync. In this process, introduce a collective op record, which tracks the parameters of the op (e.g. input, output, and configurations). 2) Many models require capability to allreduce or allgather int64 tensors. We add functionality to handle long long data type (64-bit ints). 3) Eliminate the thread sleep. A major to-do item is to eliminate the need for polling between coordinator threads and other ranks. This change will require the coordinator rank to be able to wake up all other ranks when a collective is ready to be performed, but also for all ranks (i.e. background threads) to be woken up by graph traversal threads. In the meantime, remove the thread sleep, because it introduces significant run time overhead (e.g. >20%) for models with quick-running layers (e.g. few recurrent time-steps or few hidden nodes per layer). * mpi_ops.cc: Move toward more TF nature This commit changes a few bits and pieces to align more closely with Tensorflow structures and organization: 1) Use TF mutexes. TF mutexes provide nice scoping and management around std::mutex, and using them is consistent with other TF code. 2) Remove thread sleep at MPI initialization time. Thread sleep should not be used for polling activity. Instead, this commit replaces sleep-polling with a condition variable: The compute graph traversal thread waits on the condition variable until the background thread has completed initialization and signals the graph traversal thread that initialization is complete. 3) Slim MPI initialization check: Since TF permits many threads to be traversing the compute graph concurrently (e.g. with inter_op_parallelism_threads > 1), some graph traversal threads may not have set their GPU device ID. If such a thread executes an MPI op, it would fail the check in InitializedMPIOnSameDevice, because the background thread would be controlling a GPU with ID other than the default (0). Since graph traversal threads do not perform GPU activity, this GPU ID check was unnecessary. Remove it and refactor to just check whether MPI is initialized (IsMPIInitialized). * Rebase to TF 1.3.0-rc1 complete and tested * Allreduce: Rebase to TF 1.3-rc1 (#3) * Introduce MPI allreduce in a new contrib project. This commit adds the tensorflow.contrib.mpi namespace and contrib project, which has a variety of ops that work with MPI. The MPI system works by starting a background thread which communicates between the different processes at a regular interval and schedules asynchronous reductions. At every tick, every rank will notify rank zero of the tensors it is ready to reduce, signifying completion with an empty DONE message. Rank zero will count how many ranks are ready to reduce every tensor, and, whenever a tensor is ready to reduce (that is, every rank is ready to reduce it), rank zero will issue a message to all other ranks directing them to reduce that tensor. This repeats for all the tensors that are ready to reduce, after which rank zero sends all other ranks a DONE message indicating that the tick is complete. Reviewed-by: Joel Hestness <[email protected]> * Allreduce/Allgather: Major changes and fixes (#2) This commit constitutes many major updates to the TF MPI allreduce and allgather ops. Specifically, the following changes are included in this commit: 1) The allreduce and allgather ops had race conditions, which this commit fixes. Specifically, the BackgroundThreadLoop previously allocated temporary and output tensors after the main graph traversal thread has completed its call to MPIAll*::ComputeAsync(). Unfortunately, the ops kernel context's memory allocator is only guaranteed to be valid during the ComputeAsync call. This constraint requires ComputeAsync to allocate all tensors before returning; Otherwise, the memory allocator state may reflect allocations and deallocations from further ops that can cause races for the memory locations. To fix this, hoist the memory allocations to ComputeAsync. In this process, introduce a collective op record, which tracks the parameters of the op (e.g. input, output, and configurations). 2) Many models require capability to allreduce or allgather int64 tensors. We add functionality to handle long long data type (64-bit ints). 3) Eliminate the thread sleep. A major to-do item is to eliminate the need for polling between coordinator threads and other ranks. This change will require the coordinator rank to be able to wake up all other ranks when a collective is ready to be performed, but also for all ranks (i.e. background threads) to be woken up by graph traversal threads. In the meantime, remove the thread sleep, because it introduces significant run time overhead (e.g. >20%) for models with quick-running layers (e.g. few recurrent time-steps or few hidden nodes per layer). * mpi_ops.cc: Move toward more TF nature This commit changes a few bits and pieces to align more closely with Tensorflow structures and organization: 1) Use TF mutexes. TF mutexes provide nice scoping and management around std::mutex, and using them is consistent with other TF code. 2) Remove thread sleep at MPI initialization time. Thread sleep should not be used for polling activity. Instead, this commit replaces sleep-polling with a condition variable: The compute graph traversal thread waits on the condition variable until the background thread has completed initialization and signals the graph traversal thread that initialization is complete. 3) Slim MPI initialization check: Since TF permits many threads to be traversing the compute graph concurrently (e.g. with inter_op_parallelism_threads > 1), some graph traversal threads may not have set their GPU device ID. If such a thread executes an MPI op, it would fail the check in InitializedMPIOnSameDevice, because the background thread would be controlling a GPU with ID other than the default (0). Since graph traversal threads do not perform GPU activity, this GPU ID check was unnecessary. Remove it and refactor to just check whether MPI is initialized (IsMPIInitialized). * Rebase to TF 1.3.0-rc1 complete and tested * Minor fixes * Point MPI message proto at contrib/mpi package * MPI Session: Fix graph handling * Pylint fixes * More pylint fixes * Python 2 pylint fix * MPI Collectives Ops: Fix coordinator shut down * Update copyrights to 2017 * Remove MPIDataType and switch to TF DataType * Add Allgather test, fix Allreduce test config * Fix BUILD file for TF sanity checks * Try guarding MPI collectives C++ files with TENSORFLOW_USE_MPI The TF build system on Github tries to build C++ source files in tensorflow/contrib/mpi_collectives even when configured with TF_NEED_MPI=0. This leads to a build failure when the mpi_collectives C++ files try to link against MPI third party headers, which are not set up. Unable to reproduce in contributor's build environment, we try guarding the MPI collectives C++ code with defines for TENSORFLOW_USE_MPI, similar to tensorflow/contrib/mpi. * Comment formatting Hopefully, this will trigger googlebot.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.