aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/c/c_api.cc
Commit message (Collapse)AuthorAge
* [TF] Variant improvements.Gravatar Eugene Brevdo2018-09-11
| | | | | | | | | | | | | | | | | | 1. Change Variant Decode to accept VariantTensorData (non-ref). This should allow some optimization in the future. In the meantime it means removing the variant.h include from tensor.h, since variant_encode_decode.h now relies on tensor.h and variant.h now relies on that. It also means we found a bunch of places where tensor.proto.h, variant.h, and mutex.h were being imported through tensor.h (along with a bunch of other crap); so now we directly import them in order to compile. 2. Move Variant registry to use TypeIndex instead of a TypeName string; this should speed up registry lookups. PiperOrigin-RevId: 212478896
* Removed redundant std::string -> string conversions.Gravatar A. Unique TensorFlower2018-08-28
| | | | PiperOrigin-RevId: 210596417
* EIGEN_MAX_ALIGN_BYTES can be zero when vectorization is disabled. In that ↵Gravatar A. Unique TensorFlower2018-08-20
| | | | | | case, checking for alignment boundaries breaks due to division by zero. But in these cases the check itself is redundant, so replace EIGEN_MAX_ALIGN_BYTES with std::max(1, EIGEN_MAX_ALIGN_BYTES). PiperOrigin-RevId: 209513729
* Merge pull request #20609 from karllessard:java-add-gradients-with-nameGravatar TensorFlower Gardener2018-07-31
|\ | | | | | | PiperOrigin-RevId: 206779913
| * 2nd review: Cover more prefix conflict casesGravatar karl@kubx.ca2018-07-27
| |
| * Enforce uniqueness of custom prefixes for gradientsGravatar karl@kubx.ca2018-07-25
| |
| * 1st code review: rename 'scope_name' to 'prefix', etc.Gravatar karl@kubx.ca2018-07-25
| |
| * Add scope name to TF_AddGradientsGravatar karl@kubx.ca2018-07-25
|/
* Update TF_ApiDefMapGet to return nullptr if there is an error.Gravatar James Keeling2018-07-24
| | | | | | | | Previously it would return an allocated buffer, even if there was an error and the buffer was not usable. This could cause memory leaks if the caller did not manually delete the buffer. Because TF_DeleteBuffer has been updated to be safe to call on nullptr, it's still OK if callers attempt to delete this nullptr. PiperOrigin-RevId: 205858542
* Allow TF_Delete* functions to accept nullptrGravatar James Keeling2018-07-24
| | | | | | The TF_Delete* functions in TensorFlow's C API now safely do nothing when asked to delete a null pointer. This mirrors the behaviour of free in C and delete in C++. PiperOrigin-RevId: 205844191
* Add C API for kernel infoGravatar James Keeling2018-07-23
| | | | | | 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. PiperOrigin-RevId: 205660862
* Expose each device's incarnation via `Session.list_devices()`.Gravatar Derek Murray2018-07-19
| | | | PiperOrigin-RevId: 205273020
* Merge changes from github.Gravatar Mingxing Tan2018-06-28
| | | | PiperOrigin-RevId: 202585094
* [C API]: Bugfix for TF_AddGradients.Gravatar Asim Shankar2018-06-26
| | | | | | | | | | | | | | | | | | | | TF_AddGradients could create nodes in the graph with names that conflicted with other nodes in the graph. This would most clearly happen if TF_AddGradients() was called twice on the same graph, and could also happen if there were other nodes in the graph that happened to have "gradients" as a prefix of their name. Fix that. The added test in c_api_test.cc would fail in the call to TF_SessionRun() with Node 'gradients/OnesLike' is not unique without the changes to c_api.cc and c_api_internal.h While at it, also fixed a possible name collision bug when using the C++ API to constructor graphs (using Scope). Thanks @karllessard for pointing this out. PiperOrigin-RevId: 202087996
* Move cycle detection helper function from c/c_api to core/graph/validate.Gravatar A. Unique TensorFlower2018-06-22
| | | | PiperOrigin-RevId: 201766085
* C API: Fail gracefully if the serialized graph would be too large.Gravatar Asim Shankar2018-06-07
| | | | | | | | | | | See #19657 for some motivation. Without this explicit check, a large graph would trigger an assertion failure in the protobuf codebase (https://github.com/google/protobuf/blob/0456e269ee6505766474aa8d7b8bba7ac047f457/src/google/protobuf/message_lite.cc#L68) Pull Request for google/protobuf: https://github.com/google/protobuf/pull/4739 PiperOrigin-RevId: 199719082
* Replaced calls to tensorflow::StringPiece::ToString with std::string ↵Gravatar Peter Hawkins2018-05-02
| | | | | | | | | | conversions. That is, instances of sp.ToString() are replaced with std::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: 195162126
* Downgrade run-after-mutation error to a log warning.Gravatar Skye Wanderman-Milne2018-03-16
| | | | | | | | | This is to ease the transition to the C API. Some tests currently mutate the graph after running it but currently pass. This error was meant to guard against existing behavior, so it's not a regression to make it a warning instead for now. PiperOrigin-RevId: 189395472
* Fix race in C API.Gravatar Skye Wanderman-Milne2018-03-12
| | | | | | | | | | | RecordMutation could race with ExtendSessionGraphHelper, which would release the graph lock and only keep the session lock when extending the session. Also makes sure thread annotations are on declarations, not definitions (otherwise they have no effect). PiperOrigin-RevId: 188747158
* TFE_Context gets its local devices from the source instead of a session.Gravatar Alexandre Passos2018-03-07
| | | | PiperOrigin-RevId: 188216178
* Make graph construction work while graph is being concurrently run.Gravatar Skye Wanderman-Milne2018-03-06
| | | | | | The overall approach is to use Graph._lock to synchronize Session.run calls and construction methods that rely on graph mutation. We don't want to synchronize the actual running of the graph, only the Extend call, so this change exposes an ExtendSession method to the Python API and disables extending automatically in TF_SessionRun. PiperOrigin-RevId: 188106818
* Add TF_TryEvaluateConstant to the C API and have smart_cond call it.Gravatar Skye Wanderman-Milne2018-03-06
| | | | | | | This effectively plumbs EvaluateConstantTensor to smart_cond. This makes smart_cond even smarter by trying to evaluate the predicate if it can't statically infer it. PiperOrigin-RevId: 188073244
* C API: Fixes #7394Gravatar Asim Shankar2018-02-08
| | | | | | | | Ideally, when TF_NewTensor is provided with invalid arguments it would provide a detailed error message. However, for now, to keep the existing API, signal failure by returning nullptr. PiperOrigin-RevId: 185040858
* Make TFE_Py_FastpathExecute work for all types of opsGravatar Akshay Modi2018-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | MatMul benchmarks: entry { name: "MicroBenchmarks.benchmark_gen_math_ops_matmul_2_by_2_CPU" iters: 30000 wall_time: 11.580435435 extras { key: "examples_per_sec" value { double_value: 86352.538781 } } } entry { name: "MicroBenchmarks.benchmark_tfe_py_fastpath_execute_matmul_2_by_2_CPU" iters: 30000 wall_time: 7.02576637268 extras { key: "examples_per_sec" value { double_value: 142333.227004 } } } PiperOrigin-RevId: 184734289
* When a device list API such as TF_DeviceListName() succeeds, set the output ↵Gravatar A. Unique TensorFlower2018-01-24
| | | | | | status to OK. PiperOrigin-RevId: 183148319
* C API: don't return source/sink control edges.Gravatar Skye Wanderman-Milne2018-01-23
| | | | PiperOrigin-RevId: 182989157
* Rename the newly introduced TF_SetAttrFunc function to make it clear that it isGravatar A. Unique TensorFlower2018-01-17
| | | | | | | setting the attribute to a function name. This permits future patches to add things like TF_SetAttrFuncAttrList if necessary later. PiperOrigin-RevId: 182216098
* Introduce a new C API entrypoint to set a 'func' attribute on an opGravatar A. Unique TensorFlower2018-01-16
| | | | | | description. PiperOrigin-RevId: 182146876
* This change adds a mechanism to the internal C API for updating an output ↵Gravatar Akshay Agrawal2017-12-21
| | | | | | | handle's shapes and types after its source operation has been created. Context: framework/ops.py was recently updated to use the C API when setting shapes for an op's outputs. This update broke shape inference for graph functions that captured resource handles; this, in turn, made it impossible to create graph functions from Python methods that required fully defined shapes (e.g., like MNIST's `call` method). In particular, the C API computes shapes for ops when they are created and does not update them thereafter; this is problematic because when a resource handle is captured while building a function, we need to update the captured operation's output handle in order to propagate its outputs shapes and dtypes. PiperOrigin-RevId: 179837104
* Read ApiDef from TensorFlow Go API.Gravatar Anna R2017-12-20
| | | | PiperOrigin-RevId: 179625412
* Automated g4 rollback of changelist 179260538Gravatar Dandelion Man?2017-12-15
| | | | PiperOrigin-RevId: 179263865
* Automated g4 rollback of changelist 179258973Gravatar A. Unique TensorFlower2017-12-15
| | | | PiperOrigin-RevId: 179260538
* Merge changes from github.Gravatar Dandelion Man?2017-12-15
| | | | PiperOrigin-RevId: 179258973
* Raise exception on missing unused input_map keys with C API enabled.Gravatar Skye Wanderman-Milne2017-12-12
| | | | | | | | | | | | | | | | | Without this change, the C++ ImportGraphDef API returns unused input_map keys (which are plumbed through to the C API as well). However, the Python import_graph_def API requires slightly different semantics: it throws an error for unused input_map keys that are missing from the GraphDef. This change modifies the C and C++ APIs to limit the returned keys to those missing from the GraphDef, and plumbs this through to the C API-enabled import_graph_def implementation. Note that this is a change to the existing C API. Luckily the modified method hasn't been released yet, so it's ok to change it. PiperOrigin-RevId: 178783957
* Uniquify names and prefixes in import_graph_def with C API enabled.Gravatar Skye Wanderman-Milne2017-12-06
| | | | | | This makes the C API-enabled behavior the same as the current behavior. PiperOrigin-RevId: 178133381
* Check when session cannot run because its graph was modifiedGravatar Igor Ganichev2017-11-29
| | | | | | | | | | | | | With current tensorflow code, if user modifies some operation after session.run() was called, this modification will never make it to the C++ runtime and no errors will be raised leading to silent wrong results. This change adds checks for such cases when C API is enabled. We don't change the code path for C API being disabled because C API should be enabled by default soon. PiperOrigin-RevId: 177359630
* C API: fix bug in ValidateNoCycles().Gravatar Skye Wanderman-Milne2017-11-28
| | | | | | | This change makes ValidateNoCycles() work when the graph has unused node ids (i.e. when Graph::num_nodes() < Graph::num_node_ids()). PiperOrigin-RevId: 177234002
* fix bug in c_api TF_GraphSetTensorShape to be able to handle unknown shapes ↵Gravatar Olivia Nordquist2017-11-20
| | | | | | as per the documentation. PiperOrigin-RevId: 176399293
* Allow Operation._get_attr() to work with all attr types with C API enabledGravatar Skye Wanderman-Milne2017-11-10
| | | | | | | | | | | | | | | | | | This is achieved by accessing the AttrValue directly and using the existing Python code instead of dispatching to the specific C API attr getter for every type. I started going down the dispatch path, but it turns out to be a lot of code (spread across Python, C, and SWIG), and this is likely good enough from a performance standpoint. We can optimize in the future if necessary. In addition, changes the colocation group logic to use _set_attr() and get_attr(), and makes _set_attr() work with the C API disabled. This allows the colocation tests to pass with both the C API enabled and disabled. Without these additional changes, the "_class" attribute would be set on the C NodeDef, and then it would try to retrieve it from the Python NodeDef. PiperOrigin-RevId: 175050473
* Add TF_GraphVersions() to C API and use in Graph.graph_def_versions()Gravatar Skye Wanderman-Milne2017-10-30
| | | | PiperOrigin-RevId: 173902666
* Add ability to fetch return nodes and unused input mappings from C API ↵Gravatar Skye Wanderman-Milne2017-10-30
| | | | | | | | | | | | | GraphDef import This change introduces yet another ImportGraphDef function to the C API (TF_GraphImportGraphDefWithResults), but this one has extensible return values so we shouldn't have to add more in the future. This change also modifies the ImportGraphDef C interface to manage all string data for the user. PiperOrigin-RevId: 173894710
* Add TF_GraphGetOpDef() to C API and use in Operation.op_def()Gravatar Skye Wanderman-Milne2017-10-18
| | | | | | | | | Note that this creates a small change in behavior with the C API enabled, since previously not all Python Operations had an OpDef (op_def() returns None). With the C API enabled, op_def() always returns an OpDef. PiperOrigin-RevId: 172634411
* Add return_nodes option to ImportGraphDefGravatar Skye Wanderman-Milne2017-10-16
| | | | | | | | | | | | The is similar to the return_tensors option. return_tensors cannot be used to fetch nodes with no outputs, so return_nodes is necessary. In addition, this change also refactors the ImportGraphDef signature to return all optional return values in a single struct. This is to keep the ImportGraphDef signature from getting too long, and also makes the call sites simpler. PiperOrigin-RevId: 172388270
* detecting cycles when users add a control edge to a graphGravatar Olivia Nordquist2017-09-06
| | | | PiperOrigin-RevId: 167773598
* Add function support to Tensorflow C APIGravatar Igor Ganichev2017-08-30
| | | | | | | | This change adds minimal functionality. Support for FunctionOptions, attributes, output name rewriting, function name generation, etc is comming next. PiperOrigin-RevId: 167091238
* Introduce C++ API while loop builder methodGravatar Skye Wanderman-Milne2017-08-29
| | | | | | | | | | | | | | | | | | This change adds a new function, BuildWhileLoop(), that constructs a while loop. BuildWhileLoop() takes functions that build the cond and body graphs, similar to the Python while_loop function. It also switches the C API to use this new function in order to reduce code duplication. This is in preparation for while loop gradients, which are also implemented in the C++ API (along with the other gradient code). I didn't write unit tests for BuildWhileLoop, instead relying on the current C API while loop tests. This change also disables while loop creation on Android to avoid pulling in extra C++ dependencies. PiperOrigin-RevId: 166849829
* Don't create cond_input and body_input nodes when finishing while loopGravatar Igor Ganichev2017-08-19
| | | | | | | | These nodes are not needed, but they caused failures in functions with while loops because functions currently execute all ops in their bodies and these ops are placeholders without feeds. PiperOrigin-RevId: 165814802
* Merge changes from github.Gravatar A. Unique TensorFlower2017-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | END_PUBLIC --- Commit 9f81374c3 authored by raymondxyang<zihao.yang@microsoft.com> Committed by Rasmus Munk Larsen<rmlarsen@google.com>: Add option for build more python tests in Cmake (#11853) * Ignore Windows built project * Fix deprecated methods in tf.contrib.python * Fix regex match for Windows build in contrib.keras * Fix Regex match for Windows build in session_bundle * * Fix deprecated methods * Fix regex match for Windows * Fix compatibility issue with Python 3.x * Add missing ops into Windows build for test * Enabled more testcases for Windows build * Clean code and fix typo * Add conditional cmake mode for enabling more unit testcase * Add Cmake mode for major Contrib packages * Add supplementary info in RAEDME for new cmake option * * Update tf_tests after testing with TF 1.3 * Clean code and resolve conflicts * Fix unsafe regex matches and format code * Update exclude list after testing with latest master branch * Fix missing module --- Commit 98f0e1efe authored by Yong Tang<yong.tang.github@outlook.com> Committed by Rasmus Munk Larsen<rmlarsen@google.com>: Dynamic ksize and strides with MaxPool (#11875) * Dynamic ksize with max_pool This fix tries to fix the issue raised in 4746 where ksize is static (attr) with max_pool. This fix changes ksize to input tensor so that it is dynamic now. This fix fixes 4746. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Add dynamic ksize to MaxPoolGrad and MaxPoolGradGrad Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Add test cases for max_pool_v2 Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Fix GPU Jenkins issue. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Enable MaxPoolV2 in GPU Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Hide MaxPoolV2 and other fixes. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> --- Commit 02d6bc185 authored by Bairen Yi<byronyi@users.noreply.github.com> Committed by Rasmus Munk Larsen<rmlarsen@google.com>: remove useless variable (#12212) --- Commit ed6b0d905 authored by namrata-ibm<bhavenamrata@gmail.com> Committed by Rasmus Munk Larsen<rmlarsen@google.com>: Adding support for s390x in calculation of cpu_frequency (#12201) --- Commit 627dfc9dd authored by Taehoon Lee<taehoonlee@snu.ac.kr> Committed by Taehoon Lee<taehoonlee@snu.ac.kr>: Fix typos --- Commit c0f9b0a91 authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: In fast-math mode emit a tanh that has a faster min/max. PiperOrigin-RevId: 164943597 --- Commit 87605f3d6 authored by Kay Zhu<kayzhu@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: [TF:XLA] Use HloEvaluator for ComputeConstant, remove the need of a dedicated compute constant backend. PiperOrigin-RevId: 164940970 --- Commit 881de45c2 authored by Taehoon Lee<me@taehoonlee.com> Committed by Rasmus Munk Larsen<rmlarsen@google.com>: Add bool type supports for GPU kernels (#11927) * Add bool type supports for GPU kernels * Add bool type test codes for GPU kernels --- Commit eeacdcdb1 authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Add missing "CPU" suffix in registrations. PiperOrigin-RevId: 164939527 --- Commit de01be952 authored by namrata-ibm<bhavenamrata@gmail.com> Committed by Rasmus Munk Larsen<rmlarsen@google.com>: Adding support for Big Endian in graph_constructor_test and wav_io (#12179) --- Commit 26719d29f authored by QingYing Chen<pkudysj@126.com> Committed by Rasmus Munk Larsen<rmlarsen@google.com>: Implement CRF decode (Viterbi decode) for tensor (#12056) * Implement CRF decoding for tensors * add test code for tensor version's CRF decoding * made modifications according to pylint * add some comments for crf decode * remove useless code * add comments at the top comment of crf module and add more comments in crf_test * capitalize first char of first word in comments * replace crf_decode test code with a deterministic example --- Commit f9a81ca2f authored by Pete Warden<pete@petewarden.com> Committed by gunan<gunan@google.com>: Create CI build script for Raspberry Pi (#12190) * Create CI build script for Raspberry Pi * Moved location of Pi build script --- Commit e2a163a90 authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Merge code from PR #11940 with internal changes from cl/164796436, and update Python tests to also run on GPU. PiperOrigin-RevId: 164929133 --- Commit 08bbfa187 authored by Taehoon Lee<me@taehoonlee.com> Committed by Rasmus Munk Larsen<rmlarsen@google.com>: Fix typos (#12195) --- Commit ab96f41fb authored by Luke Iwanski<luke@codeplay.com> Committed by Rasmus Munk Larsen<rmlarsen@google.com>: [OpenCL] Extends matmul_benchmark.py to cover SYCL (#11697) * [OpenCL] Extends matmul_benchmark.py to cover SYCL * Fixed typo * /gpu:0 -> /device:GPU:0 * Fixes control_flow_ops_py_test * /gpu: -> /device:GPU: * Fixes //tensorflow/python/profiler/internal:run_metadata_test * gpu: -> GPU: * Fixes tfprof_node * [OpenCL] Fixes device path to name with many colons (#123) The device path is constructed from a device name by replacing all colons with underscores. Some device names contain more than one colon, for example 'device:SYCL:0' which gives a path 'device_SYCL_0'. The previous code would not convert this back to the original device name, but rather to 'device:SYCL_0'. An alternative fix would be to convert all underscores to colons in the device name (i.e. remove the restriction inside `replace("_", ":", 1)`), however I'm not sure if there are any device names which contain underscores. * If no gpu device aviable fake one * gpu: -> device:GPU * Fixes profiler test * /gpu:x -> /device:GPU:x * Fixes debug_io_utils_test.cc test * Fixes device_name_utils_test.cc --- Commit 35e7a3665 authored by Yong Tang<yong.tang.github@outlook.com> Committed by Rasmus Munk Larsen<rmlarsen@google.com>: Remove unneeded casting of int64 for reverse_sequence (#12192) This fix remove unneeded cast of int64 for reverse_sequence: ``` lengths = math_ops.to_int64(lengths) ``` as int32 has already been enabled for reverse_sequence. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> --- Commit 9fba8c185 authored by Anna R<annarev@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Add benchmark dashboard link to benchmarks doc. Also, I added a link and description for Benchmarks page to Community index page. PiperOrigin-RevId: 164924906 --- Commit bb6f32fa7 authored by Mark Heffernan<meheff@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Make HloAliasAnalysis updatable after changes to the HLO graph. As part of this change make HloAliasAnalysis a thinner layer which basically only holds a map from HloValue to HloBuffer and vice versa. PiperOrigin-RevId: 164923041 --- Commit 9103096c1 authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by Thomas K?ppe<tkoeppe@google.com>: Merged commit includes the following changes: 164923041 by meheff: Make HloAliasAnalysis updatable after changes to the HLO graph. As part of this change make HloAliasAnalysis a thinner layer which basically only holds a map from HloValue to HloBuffer and vice versa. -- PiperOrigin-RevId: 164923041 --- Commit 822603aed authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Merging sibling fusion instruction using multi_output_fusion PiperOrigin-RevId: 164920220 --- Commit c035aa2a8 authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Go: Update generated wrapper functions for TensorFlow ops. PiperOrigin-RevId: 164917891 --- Commit e1e81d9ba authored by Luke Iwanski<luke@codeplay.com> Committed by Rasmus Munk Larsen<rmlarsen@google.com>: [OpenCL] Fixes double memcpy bug (#151) (#12173) * [OpenCL] Fixes double memcpy bug (#151) As the debg CopyOp is called on a Tensor without type, we need to use the DataType enum to get type information, and use this to pass the type on to Eigen. This is a workaround Eigen's need to have a type when calling memcpy. If the Eigen memcpy can be provided without a type requirement, then the memcpy in sycl_util is unnecessary. * Acts on feedback from: #12173/files/32cb12a9001b672425867b5a3110fd98e737a20b#r132496277 --- Commit d9ca2d86d authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Internal change PiperOrigin-RevId: 164916465 --- Commit b8d13d218 authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Remove more parts of DCASGD missed in the first pass. (47949b) PiperOrigin-RevId: 164914552 --- Commit 73b3d52c7 authored by Alexandre Passos<apassos@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: cmake fix PiperOrigin-RevId: 164911656 --- Commit 2173b5b0a authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Allow TFE_TensorHandleCopyToDevice to have the same device as src and destination. It will reuse the same underlying buffer in those cases. PiperOrigin-RevId: 164909906 --- Commit 13eb3b90e authored by Alexandre Passos<apassos@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Experimental C and Python APIs to invoke TensorFlow kernels on concrete values. PiperOrigin-RevId: 164902588 --- Commit 7dfabcc01 authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Initialize ExecutionOptions in ComputeConstant to default values. PiperOrigin-RevId: 164894867 --- Commit c8897e9bc authored by Benoit Steiner<bsteiner@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Static required time computation PiperOrigin-RevId: 164894645 --- Commit 076158f9b authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Enable implicit->explicit conversion by default. PiperOrigin-RevId: 164890915 --- Commit 58c4a4cb1 authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Bugfix: number of input channels is not necessarily in the last dimension, after introduction of data_format param. PiperOrigin-RevId: 164889729 --- Commit 8f9b1af8a authored by Igor Saprykin<isaprykin@google.com> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Recover MonitoredSession when the Coordinator is requested to stop with one of the _PREEMPTION_ERRORS. When SyncReplicasOptimizer is used, a preemption in the Coordinator may result in two cases: Case 1) the session gets silently marked as complete Case 2) the session gets stuck This CL aims to solve and verify solutions for both of these problems. Fix 1 changes the should_stop logic. Fix 2 changes the CoordinatedSession.run() logic. SyncReplicasOptimizer runs a separate set of threads using a Coordinator instance. Those threads do FIFOQueue.enqueue; the main thread does a blocking FIFOQueue.dequeue. `sync_token_q` FIFOQueue is on parameter-servers. When one of the PS instances gets preempted, an AbortedError causes the Coordinator to stop via request_stop(ex). That by itself changes the state of MonitoredSession.should_stop() to True (Fix 1). Results of the blocking Dequeue operation are sent to the chief worker via Recv. What happens next depends on the amount of tokens in `sync_token_q`. If there are enough for the next call to Dequeue to return, then the low-level "tf session run() call" returns. The next iteration of the `while not MonitoredSession.should_stop()` loop decides that the training is complete (Case 1). If there are not enough tokens in `sync_token_q`, then the blocking Dequeue is going to keep waiting for them. This results in the graph execution getting stuck and the whole session getting garbage collected after 10 minutes (Case 2). We decided to fix that by re-creating a session after it gets garbage collected (Fix 2). An alternative was to try to cancel the pending Dequeue operation, but it's not clear that it is the right thing to do and it is also not easy. PiperOrigin-RevId: 164888390 --- Commit 46e4de6e5 authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by TensorFlower Gardener<gardener@tensorflow.org>: Undo loop fusion changes for now as they seem to be altering a few results. END_PUBLIC RELNOTES: n/a BEGIN_PUBLIC BEGIN_PUBLIC Automated g4 rollback of changelist 164825735 PiperOrigin-RevId: 165340331
* Allow specifying colocation constraints through TF_SetAttr*Gravatar A. Unique TensorFlower2017-08-03
| | | | | | | | | | | | | Before this change, colocation constraint semantics were not well-defined when they were set using TF_ColocateWith and TF_SetAttrStringList and/or TF_SetAttrValueProto. One could get an exception if multiple methods were used. After this change all changes to colocation attribute (i.e. _class) are executed on TF_OperationDescription.colocation_constraints leading to consistent semantics. PiperOrigin-RevId: 164202666
* C API: Make TF_TensorFromTensor return an error instead of just logging it.Gravatar Asim Shankar2017-08-03
| | | | PiperOrigin-RevId: 164167582