| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
| |
https://github.com/tensorflow/community/pull/16.
In addition to the changes in the doc, I made the following updates (these changes make sense to me and I didn't notice them when compiling the doc):
* deprecate saved_model.builder.SavedModelBuilder - replaced with saved_model.SavedModelBuilder
* deprecate python_io.tf_record_iterator - replaced with io.tf_record_iterator
* deprecate python_io.TFRecordWriter - replaced with io.TFRecordWriter
* move reduce_join to tf.string
PiperOrigin-RevId: 215253944
|
|
|
|
|
|
| |
Plumb these through to RecordWriterOptions
PiperOrigin-RevId: 211894734
|
|
|
|
|
|
| |
This still defaults to float32 for all normal floats.
PiperOrigin-RevId: 211704918
|
|
|
|
|
|
|
|
| |
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: 209806694
|
|
|
|
| |
PiperOrigin-RevId: 209679086
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Throw in TFRecordWriter.write() if write fails
PiperOrigin-RevId: 209030158
|
|
|
|
|
|
|
|
|
|
| |
This change contains no code changes. Only doc-strings.
We can't use relative links in code files, so we don't have much choice but to link to tensorflow.org/
The deleted links were to docs that no longer exist.
PiperOrigin-RevId: 209019572
|
|\
| |
| |
| | |
PiperOrigin-RevId: 208075630
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In PR 19993 the build issues on macOS with python2.7.10 and clang-9.1.0
were fixed. However, later on it looks like the order of `<locale>`
and `<Python.h>` has been changed in
https://github.com/tensorflow/tensorflow/commit/1e7b0e4ad6d0f57f3241fe0b80a65f2c2a7f11b0
possibly caused by `clang-format -i --style=`.
This caused the build break of macOS with python-2.7.10 and clang 9.1.0
again.
This fix updates the impacted files, and, adds an empty line
in between so that future `clang-format -i --style` will
not cuase build breaks.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
|
| |
| |
| |
| | |
PiperOrigin-RevId: 207596283
|
| |
| |
| |
| |
| |
| | |
writing when writer_ destructor is called
PiperOrigin-RevId: 207355721
|
| |
| |
| |
| |
| |
| | |
abb903df7a5998b33547c02e95f9fa47c00f31f4
PiperOrigin-RevId: 207145802
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
instead of a "char*".
(See https://docs.python.org/3/whatsnew/3.7.html#c-api-changes)
There are additional changes needed for Python 3.7 compatibility,
this change just pulls out one of them
(and subsumes a related attempt in #21202 and #20766)
Helps with #20517
PiperOrigin-RevId: 207008013
|
|/
|
| |
Attempting to acquire the GIL in a destructor when the process is terminating can fail, leading to a hang. Fixes #21277.
|
|
|
|
| |
PiperOrigin-RevId: 204429340
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specifically, fix a segmentation fault when converting objects that implement
the Python sequence protocol (i.e., __getitem__, __len__, and __iter__) but
which do not have contiguous keys.
Fixes #20347
However, there are still some discrepancies possible between
tf.convert_to_tensor(o) (or tf.constant(o)) with and without eager execution
enabled. Fixing those is left as a follow up excercise.
Sample differences:
(1) Empty sequences that have numpy conversions defined.
import pandas as pd
import tensorflow as tf
s = pd.Series([]) # Empty series
t = tf.constant(s)
With eager execution enabled, t.dtype ends up with a dtype of float32 (as
py_seq_tensor.cc considers empty lists to be float32)
With graph construction, t.dtype ends up with a dtype of float64 (as
make_tensor_proto() converts 's' to a numpy array and uses its dtype).
(2) Objects that implement __getitem__, __len__, and __iter__, but are not
convertible to numpy arrays (e.g., do not implement __array__):
- With eager execution enabled, these can be converted to a tensor
- For graph construction, the conversion fails.
PiperOrigin-RevId: 203019624
|
|
|
|
| |
PiperOrigin-RevId: 202585094
|
|
|
|
| |
PiperOrigin-RevId: 201071448
|
|
|
|
|
|
|
|
| |
Merge XLA-specific operator registrations into a single file rather than having many tiny files.
In passing, register a fill function for bfloat16 numpy type; needed for the np.arange() call in the sort unit test.
PiperOrigin-RevId: 201005718
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* EagerPyFunc now validates its assumption that returned tensors are backed by memory on the same device that the EagerPyFunc kernel executed on.
* Make the Python trampolining mechanism ensure that this requirement of the kernel is met.
* Allow tf.contrib.eager.py_func to execute correctly on devices other than CPU and GPU:0.
Prior to this change, tf.contrib.eager.py_func() would copy data from CPU to GPU:0 if necessary, but not the other way around. As a result, the assumptions made by the EagerPyFunc kernel implementation about the placement of returned tensors would be violated.
The test added in py_func_test.py, when executed on a machine with a GPU will:
- Fail with a segmentation fault (dereferencing GPU memory) without the changes to py_func.cc and script_ops.py
- Fail with an error message with the change to py_func.cc but without the change to script_ops.py
- Pass with changes to py_func.cc and script_ops.py
PiperOrigin-RevId: 200792057
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix for: #17315
If numpy array is read-only, calling PyArray_FromAny with NPY_ARRAY_CARRAY
flags introduce extra memory copy.
Before:
feed_cpu_variable_read_only: 5.6 GB/sec, min: 17.99, median: 19.54, mean: 19.76
After:
feed_cpu_variable_read_only: 13.2 GB/sec, min: 7.60, median: 7.78, mean: 8.13
PiperOrigin-RevId: 199835695
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue: #17246
~1.7x speedup for fetching a variable
Before:
fetch_cpu_variable : 5.5 GB/sec, min: 14.56, median: 15.05, mean: 15.14
fetch_cpu_variable_add: 11.0 GB/sec, min: 7.29, median: 12.03, mean: 12.56
fetch_cpu_variable_concat: 11.6 GB/sec, min: 6.92, median: 13.78, mean: 14.76
After:
fetch_cpu_variable : 9.2 GB/sec, min: 8.71, median: 8.79, mean: 8.80
fetch_cpu_variable_add: 12.5 GB/sec, min: 6.41, median: 7.20, mean: 7.51
fetch_cpu_variable_concat: 12.7 GB/sec, min: 6.32, median: 6.54
PiperOrigin-RevId: 199497691
|
|
|
|
|
|
|
|
|
| |
becomes a float64 tensor.
Earlier py_seq_tensor would fall back to a float32 if not explicitly requesting
a float64 (which would not happen if we had no other information).
PiperOrigin-RevId: 197977260
|
|
|
|
|
|
| |
point to distinct files.
PiperOrigin-RevId: 197835288
|
|
|
|
| |
PiperOrigin-RevId: 197817738
|
|
|
|
|
|
|
|
|
|
| |
* unused using-declarations
* redundant string conversions
* C-style casts
* redundant get() call on smart pointer
* the 'empty' method should be used to check for emptiness instead of 'size'
PiperOrigin-RevId: 196585984
|
|
|
|
|
|
| |
calling a function through a pointer of the wrong type, and also removes a C-style cast.
PiperOrigin-RevId: 196428430
|
|
|
|
|
|
| |
exporting symbols to the TensorFlow API.
PiperOrigin-RevId: 194426855
|
|
|
|
| |
PiperOrigin-RevId: 194274698
|
|
|
|
| |
PiperOrigin-RevId: 194031845
|
|
|
|
| |
PiperOrigin-RevId: 193717872
|
|
|
|
|
|
| |
improve performance.
PiperOrigin-RevId: 193685521
|
|
|
|
|
|
| |
Minor fixes to make this work.
PiperOrigin-RevId: 191457070
|
|
|
|
|
|
|
|
| |
tensorflow::str_util equivalents.
This will allow the deprecated methods to be removed.
PiperOrigin-RevId: 191350894
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change provides an alternative mechanism to
tf.raise_exception_on_not_ok_status(), which is inefficient and
error-prone (people often use the status multiple times in the with
block, but it's only checked when the context manager exits). Instead,
it uses SWIG to automatically raise an exception when a C API method
fails. Note that this removes the status argument from affected
methods.
For now, I've only applied this typemap to C API methods. It would be
good to expand this to all uses of raise_exception_on_not_ok_status.
PiperOrigin-RevId: 191121016
|
|
|
|
| |
PiperOrigin-RevId: 190273682
|
|
|
|
| |
PiperOrigin-RevId: 190265301
|
|
|
|
| |
PiperOrigin-RevId: 189945839
|
|
|
|
| |
PiperOrigin-RevId: 189258641
|
|
|
|
| |
PiperOrigin-RevId: 189231636
|
|
|
|
|
|
| |
Shockingly this one was also due to PySequence_GetItem.
PiperOrigin-RevId: 188765548
|
|
|
|
| |
PiperOrigin-RevId: 188763442
|
|
|
|
|
|
| |
This should help debugging errors that occur inside a py_func.
PiperOrigin-RevId: 188238495
|
|
|
|
|
|
| |
resources with the resources.
PiperOrigin-RevId: 187488175
|
|
|
|
| |
PiperOrigin-RevId: 186073337
|
|
|
|
| |
PiperOrigin-RevId: 184020524
|
|
|
|
| |
PiperOrigin-RevId: 183765122
|
|
|
|
|
|
| |
They don't make sense in the open source repository.
PiperOrigin-RevId: 183140889
|