aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/framework
Commit message (Collapse)AuthorAge
...
* Replaced calls to tensorflow::StringPiece::ToString with std::string ↵Gravatar A. Unique TensorFlower2018-08-27
| | | | | | | | | | conversions. That is, instances of sp.ToString() are replaced with string(sp). This will allow tensorflow::StringPiece::ToString to be removed, which is necessary before it can be replaced with absl::string_view. PiperOrigin-RevId: 210394878
* Fix compiler warning about unused variableGravatar A. Unique TensorFlower2018-08-27
| | | | PiperOrigin-RevId: 210368536
* Merge pull request #21283 from johschmitz:patch-1Gravatar TensorFlower Gardener2018-08-24
|\ | | | | | | PiperOrigin-RevId: 210184219
* | Add ThenExecute() method to DeviceContext interface.Gravatar A. Unique TensorFlower2018-08-23
| | | | | | | | | | | | | | | | | | This basically exposes the GPU EventMgr::ThenExecute function to code that can be compiled without explicitly depending on StreamExecutor and similar. It allows some corner cases in GPU memory use to be handled in code that is not just GPU-specific. PiperOrigin-RevId: 210010480
* | fix C++ header guards.Gravatar A. Unique TensorFlower2018-08-21
| | | | | | | | PiperOrigin-RevId: 209679086
* | [tf.data] Move captured function instantiation to iterator initialization time.Gravatar Derek Murray2018-08-21
| | | | | | | | | | | | | | | | | | | | Previously, a function instantiation error (e.g. in `Dataset.map()`) would lead to an error in each GetNext() call that attempted to use the function. Moving this to iterator instantiation time has the benefit that the error will be reported once when the initialization op is executed, which has a more helpful stack trace, since it should not be conflated with other potential op failures. PiperOrigin-RevId: 209633511
* | Remove int kernel registrations for tf.nn.softplus and tf.nn.softsign.Gravatar Skye Wanderman-Milne2018-08-21
| | | | | | | | PiperOrigin-RevId: 209606318
* | Fix a typo in docstringGravatar A. Unique TensorFlower2018-08-20
| | | | | | | | PiperOrigin-RevId: 209411916
* | Move FindInputArg() for ApiDef::Arg to op_def_util.cc and cleanup Python/c++ ↵Gravatar Nick Kreeger2018-08-17
| | | | | | | | | | | | | | | | references. This method is currently duplicated in Python code and will be used for TypeScript generation. PiperOrigin-RevId: 209207139
* | Add a virtual interface for the executor side of stats collection.Gravatar Derek Murray2018-08-15
| | | | | | | | | | | | | | | | This will enable switching out the default stats collection mechanism (based on strings and protocol buffers) for a lighter-weight implementation that can be used in other settings. PiperOrigin-RevId: 208851452
* | Modifies NonMaxSuppressionV4 output shape to be static.Gravatar Tayo Oguntebi2018-08-13
| | | | | | | | PiperOrigin-RevId: 208600876
* | [tf.data] Internal refactoring of C++ classes and APIs.Gravatar Jiri Simsa2018-08-13
| | | | | | | | | | | | | | | | | | | | - replacing `OpKernelContext` with newly introduced `DatasetContext` in `DatasetBase` constructor to make it possible to instantiate `DatasetBase` in places where an instance of `OpKernelContext` is not available - replacing `dataset::MakeIteratorContext(OpKernelContext* ctx)` factory with `IteratorContext(OpKernelContext *ctx)` constructor. - folding `GraphDatasetBase` into `DataseBase` and removing the default implementation of `AsGraphDefInternal`, making it the responsibility of the derived class to implement it to encourage/hint developers to provide serialization logic PiperOrigin-RevId: 208560010
* | [tf.data] Optimization checkpointing improvements.Gravatar Jiri Simsa2018-08-10
| | | | | | | | | | | | | | | | This CL: - changes the `OptimizeDataset` checkpointing logic to checkpoint the optimized dataset (as opposed to the original dataset + the optimizations, re-running optimization every time a checkpoint is restored) - replaces `OpKernelContext` with newly introduced `SerializationContext` in the signature of `AsGraphDefInternal` to reduce the scope of the context and also simplify the logic for overriding the `FunctionLibraryDefinition` when optimizations take place PiperOrigin-RevId: 208282562
* | [tf.data] Minor API refactoring.Gravatar Jiri Simsa2018-08-10
| | | | | | | | | | | | Renaming `AddParentDataset`, `SaveParent`, and `RestoreParent` to `AddInputDataset`, `SaveInput`, and `RestoreInput`. PiperOrigin-RevId: 208272695
* | Make FunctionLibraryDefinition thread-safe.Gravatar Akshay Agrawal2018-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The eager runtime mutates the FunctionLibraryRuntime's FunctionLibraryDefinition, which is shared across threads; at the same time, OpKernels might read the FunctionLibraryDefinition. This is not thread-safe unless FunctionLibraryDefinition is thread-safe. This change makes FunctionLibraryDefinition, which is basically a map from function names to FunctionDefs, thread-safe. This is almost entirely accomplished by guarding the map with a mutex. There is however one complication: Find and RemoveFunction cannot be made thread-safe in a straightforward way (Find returns a raw pointer to a FunctionDef while Remove can delete the corresponding FunctionDef). In light of the fact that clients only ever call RemoveFunction when they in fact want to replace an existing function with a new one, we make the following modifications to FunctionLibraryDefinition's API: 1. A Contains method is added to check for the existence of a function. 2. A ReplaceFunction method is added. 3. RemoveFunction and RemoveGradient are made private. We also update clients of the FunctionLibraryDefinition to use Contains & ReplaceFunction instead of Find and RemoveFunction. PiperOrigin-RevId: 208271076
* | Merge pull request #20768 from yongtang:20751-tf.PrintGravatar TensorFlower Gardener2018-08-09
|\ \ | | | | | | | | | PiperOrigin-RevId: 208133320
* \ \ Merge pull request #21086 from taehoonlee:fix_typosGravatar TensorFlower Gardener2018-08-08
|\ \ \ | | | | | | | | | | | | PiperOrigin-RevId: 207988541
* | | | Making PrefetchToDevice work on XLA Compile on Demand mode. Also adds a ↵Gravatar Rohan Jain2018-08-07
| | | | | | | | | | | | | | | | | | | | | | | | bunch of dataset / iterator kernel registrations for XLA. PiperOrigin-RevId: 207802858
* | | | Map and filter fusionGravatar Piotr Padlewski2018-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces MapAndFilterFusion optimization, e.g: map(map_fun).filter(filter_fun) It moves computation of filter_fun to the map_fun, which returns the computed element and computed predicate. Filter is replaced with FilterByLastComponentDataset, which filters by the boolean, resulting in: map(fused_fun).FilterByLastComponent() where: fused_fun(x): r = map_function(x) return (r, filter_fun(r)) The micro benchmark shows around 68% improvement (chain of 50 map-filter) PiperOrigin-RevId: 207624667
* | | | [tf.data] Add support for copying `Optional` variants to/from GPU.Gravatar Derek Murray2018-08-05
| | | | | | | | | | | | | | | | PiperOrigin-RevId: 207490563
* | | | Delete unused memberGravatar Alexandre Passos2018-08-03
| | | | | | | | | | | | | | | | PiperOrigin-RevId: 207284323
* | | | Added a testcase back to ExpectTensorCloseHalf.Gravatar A. Unique TensorFlower2018-08-01
| | | | | | | | | | | | | | | | PiperOrigin-RevId: 206973087
* | | | Adding support for collecting op statistics at nano-second granularity.Gravatar Jiri Simsa2018-08-01
| | | | | | | | | | | | | | | | PiperOrigin-RevId: 206938428
* | | | [tf.data] Refactor the parallel execution logic out of ParallelMapDatasetOp.Gravatar Derek Murray2018-07-31
| | | | | | | | | | | | | | | | | | | | | | | | This change will enable the definition of specialized datasets that map a C++ function across their inputs. In addition, this change refactors the `DatasetIterator<DatasetType>` template class to create a non-templated base class that contains the non-`DatasetType`-specific portions of the class. PiperOrigin-RevId: 206869786
* | | | Add DT_HALF support in ExpectClose, choose the default tolerance according ↵Gravatar A. Unique TensorFlower2018-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to the data type, add test cases, and put Intel's changes from pull request #20196 back. (ExpectClose wouldn't compile without DT_HALF support.) #20196 PiperOrigin-RevId: 206795382
| | | * Improve readability of Tensor::CheckType error outputGravatar Johannes Schmitz2018-07-31
| |_|/ |/| |
* | | Prevent deadlocks when OP_REQUIRES is used in AsyncOpKernel::ComputeAsync().Gravatar Derek Murray2018-07-27
| | | | | | | | | | | | | | | | | | If OP_REQUIRES or OP_REQUIRES_OK are used in an override of AsyncOpKernel::ComputeAsync() and the condition does not hold, the process will deadlock because the `done` callback is never called. This change raises a fatal error with an actionable error message in this case. PiperOrigin-RevId: 206373312
* | | Adding NodeDef names to error messages for better debuggability.Gravatar A. Unique TensorFlower2018-07-27
| | | | | | | | | | | | | | | | | | | | | The format used is as follows: {{node <node_name>}} PiperOrigin-RevId: 206370355
* | | MutableGraphView and other graph utilsGravatar Piotr Padlewski2018-07-25
| | | | | | | | | | | | | | | | | | MutableGraphView was implemented so that the view could be updated when new nodes are added or connections changed. The current passes do not require it only because they do not do any optimization on already optimized nodes, but optimizations like MapFusion require it. PiperOrigin-RevId: 206046420
* | | This change started with an intention of adding an attribute to cast ops to ↵Gravatar A. Unique TensorFlower2018-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | decide whether bfloat16 casts should use truncation or rounding. This is a preparatory change before we switch the default float ==> bfloat16 cast to use rounding instead of truncation. The attribute added can then be specified on casts that rely on the truncation, e.g., the TensorFlow send/receive operations. It later emerged that the choice of doing truncation is useful more generally. Therefore, this change allows the new attribute to be used by all relevant casts to use truncation instead of rounding. PiperOrigin-RevId: 205996367
* | | Merge pull request #20159 from luk-ai:cast-quantizedGravatar TensorFlower Gardener2018-07-24
|\ \ \ | | | | | | | | | | | | PiperOrigin-RevId: 205881436
| | * | Fix typosGravatar Taehoon Lee2018-07-24
| |/ / |/| |
* | | Allow differentiating tfe.defun functions which contain conds.Gravatar Alexandre Passos2018-07-23
| | | | | | | | | | | | PiperOrigin-RevId: 205732423
* | | Fix meaningless "const" on return type.Gravatar James Keeling2018-07-23
| | | | | | | | | | | | | | | | | | Because this file is included in lots of places, this generates a large number of warnings during compilation. PiperOrigin-RevId: 205673744
* | | Add GetFilteredRegisteredKernels and refactorGravatar James Keeling2018-07-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GetFilteredRegisteredKernels makes it easier for users to query at runtime which kernels are available which match some predicate. The most common usage will be querying which kernels are available for a given op, so we add the specialized GetRegisteredKernelsForOp. This is part of the work to make available kernels possible to query, to support Swift For TensorFlow. There are also a number of github issues asking for the functionality. I will add C API and Python API support in upcoming changes. PiperOrigin-RevId: 205656251
* | | Modify AllocatorRegistry to be an AllocatorFactoryRegistryGravatar A. Unique TensorFlower2018-07-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | in preparation for using NUMA node specific allocators. Also, add stub NUMA functions on the platform interface to platform/windows/port.cc. PiperOrigin-RevId: 205413998
* | | Adding rationale for not including uint32 and uint64 as part of ↵Gravatar Jiri Simsa2018-07-18
| | | | | | | | | | | | | | | | | | TF_CALL_INTEGRAL_TYPES. PiperOrigin-RevId: 205165086
| | * Format with clang-format -i --style=GoogleGravatar Yong Tang2018-07-13
| | | | | | | | | | | | Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
| | * Add test caseGravatar Yong Tang2018-07-13
| | | | | | | | | | | | Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
| | * Fix build breaksGravatar Yong Tang2018-07-13
| | | | | | | | | | | | Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
| | * Remove extra `...` from the tf.PrintGravatar Yong Tang2018-07-13
| | | | | | | | | | | | Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
| | * Format tensor.cc with clang-foramtGravatar Yong Tang2018-07-13
| | | | | | | | | | | | Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
| | * Fix tf.Print summarized format bugGravatar Yong Tang2018-07-13
| |/ |/| | | | | | | | | | | | | | | This fix fixes the issue raised in 20751 where tf.Print may miss `...` at the end with `summarize`. This fix fixes 20751 Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* | Delete OpKernelContext::is_output_deadGravatar Sanjoy Das2018-07-12
| | | | | | | | | | | | | | | | It seems to me that OpKernelContext::is_output_dead is not necessary. We only set it for Recv nodes and in those cases the output tensor is unset as well. PiperOrigin-RevId: 204325763
* | Change "deprecation_message" to "deprecated: true" in api_def_*.pbtxt files.Gravatar Anna R2018-07-09
| | | | | | | | PiperOrigin-RevId: 203871388
* | Reduce overhead of constructing an `OpKernelContext` on non-GPU devices.Gravatar Derek Murray2018-07-07
| | | | | | | | | | | | The current `OpKernelContext` constructor unconditionally makes a virtual call to get an allocator that is only used when the kernel is running on a GPU device. Since we can tell if this is necessary after the call to `params_->ensure_eigen_gpu_device()`, we can avoid the call, plus the virtual call to `ReinitializeGpuDevice()`, when we know that it is not a GPU device. PiperOrigin-RevId: 203523500
| * Cast: support casting to and from quantized typesGravatar Tristan Rice2018-07-06
| |
* | Add a utility function so broadcasting can be done over arbitrary ↵Gravatar A. Unique TensorFlower2018-07-05
|/ | | | | | ShapeHandle objects. PiperOrigin-RevId: 203354718
* Make functions defined with tfe.defun respect devices when executing.Gravatar Akshay Agrawal2018-07-03
| | | | | | | | | | | | | | | | | | | Modifies GraphModeFunction to emit PartitionedCall ops instead of Call ops so that the created functions can execute across devices. This should strictly increase the set of functions that tfe.defun can faithfully execute. Previous to this change, functions executed through tfe.defun would ignore device annotations and only run on a single device. It is not yet possible to execute a function across multiple processes. Specifically, this CL: (1) Adds a stateful version of PartitionedCall, (2) Modifies `defun` to emit PartitionedCall or StatefulPartitionedCall by default, (3) Makes `tf.gradients` aware of the existence of `(Stateful)PartitionedCall`, (4) Fixes bugs in PartitionedCallOp related to the placement of resource-touching ops / which args and retvals are always on host memory, and also removes the requirement for args/retvals to be passed through the host. PiperOrigin-RevId: 203164388
* Change the way we set endpoints deprecated in api_def.proto.Gravatar Anna R2018-07-02
| | | | PiperOrigin-RevId: 203004822