Commit Graph

110200 Commits

Author SHA1 Message Date
Sanjay Kumar.C
126f3d7ae9
Update stale.yml
Test PR
2021-05-10 16:22:50 -07:00
A. Unique TensorFlower
d979527634 Update TFRT dependency to use revision
94fbcf6224.

PiperOrigin-RevId: 373032943
Change-Id: I544d1aea37e6a632f5e2e7753d5d6b6e5712111f
2021-05-10 16:15:28 -07:00
Austin Anderson
99ab0d0c52 Print Python version and specific environment in ci_build.sh
This is useful to determine exactly which packages are installed in the ci_sanity environment.

PiperOrigin-RevId: 373029910
Change-Id: I2912a02f5eb9a02dcec1765bc68245070a93312d
2021-05-10 16:03:42 -07:00
Reed Wanderman-Milne
3b9add9e3b Remove unused function declaration in executor.h.
PiperOrigin-RevId: 373029898
Change-Id: Ide702bed2e5cb9a2e13f1373b4202188dee8dfed
2021-05-10 15:58:09 -07:00
A. Unique TensorFlower
d49ff428c7 Integrate LLVM at llvm/llvm-project@5c7b43aa82
Updates LLVM usage to match
[5c7b43aa8298](https://github.com/llvm/llvm-project/commit/5c7b43aa8298)

PiperOrigin-RevId: 373028739
Change-Id: I00d859c5ba799aa962aaa4d8e4b12f7594f1b0e6
2021-05-10 15:52:23 -07:00
Yash Katariya
f24f8ca288 Enable doctests for multiple python packages in TF.
PiperOrigin-RevId: 373027711
Change-Id: Ib9867614a4079052b1b7b9de4c752a002b33c64e
2021-05-10 15:43:44 -07:00
Advait Jain
e79e01412b Drop ContextHelper and bind TfLiteContext APIs to MicroInterpreter.
PiperOrigin-RevId: 373024389
Change-Id: Ibc6ddd246ae52ce86523a1330798fcb01d68ebd1
2021-05-10 15:30:38 -07:00
Scott Zhu
f0718c7cdc Change keras to use tf.logging instead of absl logging.
PiperOrigin-RevId: 373023766
Change-Id: I7eeb0dc6611066cc819065c57d8ec736e014df56
2021-05-10 15:25:43 -07:00
Stefan Dierauf
547ea7fe83 Add TakeWhileDataset to tf-mobile build
PiperOrigin-RevId: 373022418
Change-Id: Ib45aa5faa61642acf1ec2cdb01d64b7450ebd49f
2021-05-10 15:19:51 -07:00
A. Unique TensorFlower
90fd69520f Internal change
PiperOrigin-RevId: 373018252
Change-Id: I81cc4188b092746e510eda32750c1fc796c03a0e
2021-05-10 14:58:46 -07:00
Rick Chao
1555fec94e PSv2/cfit: Remove the workaround in PS' dataset creation as the underlying issue has been fixed by 04f654efc6
PiperOrigin-RevId: 373014461
Change-Id: Idab643ad1dcd918cf138e8b83450ccf9f0e7b3dd
2021-05-10 14:43:17 -07:00
Saurabh Saxena
58bce30a18 Provide API for building a Function from traces (FunctionDefs or MLIR functions) and executing it.
Currently only single input / single output functions are supported.
Introduce TaggedValue::TENSOR_SPEC type which is a (shape, dtype) tuple for defining signatures.

PiperOrigin-RevId: 373013661
Change-Id: I66cd6683e104b00245616ea20a7699de771e7963
2021-05-10 14:37:17 -07:00
Skye Wanderman-Milne
a33a0e8524 [XLA:tpu_driver] Initialize bfloat16 numpy extension in tpu_client_extension.
This was causing segfaults: https://github.com/google/flax/issues/1287

I'm not sure why the bfloat16 tests in xla_client_test.py didn't catch
this, but I'm guessing it was somehow using the type registered by the
regular xla_client.

PiperOrigin-RevId: 373008160
Change-Id: I0793a465677308199f2537f015ef98718f7b643d
2021-05-10 14:18:58 -07:00
Russell Power
d2534c1670 Exclude grpc kernels from single threaded execution.
PiperOrigin-RevId: 372995965
Change-Id: Icadcd7aca42fb1056f019770cb4dbea27c861bca
2021-05-10 13:22:00 -07:00
Saurabh Saxena
9ac438fe4b Add a utility for managing refcounts, equivalent to shared_ptr.
PiperOrigin-RevId: 372995476
Change-Id: Id3271f467287b6d7264729e2553ad409c89c041e
2021-05-10 13:16:18 -07:00
A. Unique TensorFlower
b47be308c4 Fix integer div/mod overflow issues for Eigen, XLA, MLIR.
The original implementations of `google_floor_div`, XLA `FloorDiv` and
MLIR `TF_FloorDivOp` all suffered from overflows for
`abs(x) + abs(y) > INT_MAX`. The new implementation addresses this.

Also fixed FPE issues for the Eigen backend when trying to divide
`INT_MIN / -1`. This previously caused TF to crash. Here we decide to
overflow so that `INT_MIN / -1 = INT_MIN`.  This is consistent with
`int16` and `int8` types (which already overflow without crashing in C++),
and maintains the equality
```
 x = div(x, y) * y + mod(x, y)
```

Also added tests for these edge cases.

Fixes #46887, #45771.

PiperOrigin-RevId: 372993714
Change-Id: If38fdd9e53d562011e529c58b415786ba015a0be
2021-05-10 13:08:05 -07:00
Qiao Zhang
bf5b1056fc Fix build failure with CUDA 11.0.0.
undefined cusparseSparseToDenseAlg_t and cusparseDenseToSparseAlg_t

PiperOrigin-RevId: 372993274
Change-Id: I7ddea28644732ef6d5541644c27fe7f2abff7c0e
2021-05-10 13:02:24 -07:00
HanBin Yoon
b362c92fcc Add preprocessor flag BEF_THUNKS (=1) when using BefThunk.
PiperOrigin-RevId: 372992531
Change-Id: Ibaa8f5dc10900ff83f8741ddfb679438fb00c17f
2021-05-10 12:56:45 -07:00
Scott Zhu
a51cf7b3c0 Fix docstring format and typo in metrics.py.
PiperOrigin-RevId: 372988670
Change-Id: I30df91f220b7ebb4fc195152742c7f258f9a13a9
2021-05-10 12:41:48 -07:00
Jiri Simsa
b0a448ef77 [tf.data] Minor tweaks to legacy ModelDatasetOp implementation.
This CL removes some unused code and also changes the implementation of `ModelDatasetOp::Dataset::Iterator` to avoid overriding the `model` parameters of `IteratorContext`.

PiperOrigin-RevId: 372988027
Change-Id: I107d0fcfdc22f399038a83522faf4c83f0be50d8
2021-05-10 12:36:57 -07:00
Juhyun Lee
6458d34647 TFLite GPU: Remove TransformationReporter.
PiperOrigin-RevId: 372986018
Change-Id: I107b25c92f409dad7b3964fc243b84b3ff09786a
2021-05-10 12:32:30 -07:00
A. Unique TensorFlower
9860e16a79 The Clang compiler has added an optimization transform which may change:
printf("%s", tf_cpu_option);

into a put/putchar call, making tf_cpu_option unused.  The transform matches
on exactly "%s" as the format string.  Change the format string to "%s%s"
with an empty string will keep the compiler from removing tf_cpu_option.

The Clang 5f5974aeacac979de81713332ff80e5928e408b7 contains this optimization.

PiperOrigin-RevId: 372985813
Change-Id: I4ca608e72e67e61de75b09b21effe627e81e2b73
2021-05-10 12:28:23 -07:00
Raman Sarokin
32be9f20e2 Renamed weights layouts to support 2d and 3d operations.
PiperOrigin-RevId: 372979358
Change-Id: I7e1c1834128f666ae73594abbe4357bb3d7d80d8
2021-05-10 12:14:38 -07:00
A. Unique TensorFlower
7d3e55e509 Allow space-to-batch propagation on forward window dilated convolutions
PiperOrigin-RevId: 372979298
Change-Id: Ic287c7437b08afab1488eb94bb16620d30e8a0c4
2021-05-10 12:10:06 -07:00
A. Unique TensorFlower
3f9a1e5acd Update layout for tiling verification.
PiperOrigin-RevId: 372978901
Change-Id: I2632876dea032453899e1b56a20da09a6624cf2d
2021-05-10 12:04:27 -07:00
A. Unique TensorFlower
3e6a36332f Currently a shape mismatch for update_state will print "Shapes {y_pred.shape} and {y_true} are incompatible" which is confusingly the opposite order of the method parameters.
PiperOrigin-RevId: 372978089
Change-Id: Ibfeac1ac1f9efff31c0dafc44ef21ddf94b48929
2021-05-10 11:56:53 -07:00
Scott Zhu
2c3575146b Fix keras docstring format and typo for activations.py
PiperOrigin-RevId: 372976744
Change-Id: I8e854d954ad808afe7e9fb8e7831ea8f8cbea039
2021-05-10 11:50:08 -07:00
Rajkumar Samuel
752ea9ac32 Add support in collective_rma_distributed for worker interfaces that directly populate the pointer provided in the RecvBuf request with the remote tensor, rather than populating transport_options with a serialized proto containing the remote tensor. This allows for more efficient implementation that avoids extra serialization / de-serialization costs from transport format into protos and finally to tensor buffer.
PiperOrigin-RevId: 372976144
Change-Id: I2f46d9c6b7dd30ea7003de7587703dc8666e7c27
2021-05-10 11:43:45 -07:00
A. Unique TensorFlower
dc324cef09 Update TFRT dependency to use revision
76d68d3f48.

PiperOrigin-RevId: 372972308
Change-Id: I5c15cddb2d4530e2b072214971d6c64522974444
2021-05-10 11:33:14 -07:00
TensorFlower Gardener
88314613b2 Merge pull request #41595 from fhennecker:fix-binary-crossentropy-double-epsilon
PiperOrigin-RevId: 372972049
Change-Id: I3207179be95cbbe5682d6d8f531c4b2321575397
2021-05-10 11:26:11 -07:00
Gaurav Agrawal
8a5e9a19eb [XLA] Update cross-program-prefetch heuristic to break tie between equal-sized candidates.
In case of tie, prefer a buffer whose consumer instructions produces larger buffer.

PiperOrigin-RevId: 372970160
Change-Id: I99701e01534b108fd1109cbcf158db5036510ced
2021-05-10 11:18:19 -07:00
Peter Hawkins
d746bb4c7d [PJRT] Improve error message for holds on deleted/donated buffers.
End-users won't know about holds, and this is the error message they see when passing a deleted buffer to, say, Execute(). It's probably best just to say less here.

PiperOrigin-RevId: 372960010
Change-Id: Ib5252367a7f944fae4bbb2379e4bc2de579c7791
2021-05-10 10:38:03 -07:00
Eugene Zhulenev
f7285ddc11 [tf:tfrt] Refine values constraints when merging two clusters
Use constraints propagation to verify that clusters can be merged together.

PiperOrigin-RevId: 372957526
Change-Id: I596c05050cc400478944aba891f1a09250e3dc5b
2021-05-10 10:28:05 -07:00
Feng Liu
b99fce7f25 Improve the tfr translator to handle more integer types and tfr quant built-in ops
PiperOrigin-RevId: 372951822
Change-Id: I065e2e9923f615d3285448131aa3546bcc768879
2021-05-10 10:01:32 -07:00
A. Unique TensorFlower
d98faadf1f Check for existence of ANeuralNetworksExecution_enableInputAndOutputPadding before calling.
PiperOrigin-RevId: 372945789
Change-Id: I2ea6071eabd620293f6ff5e6445a30ee88c8f575
2021-05-10 09:32:24 -07:00
Rahul Joshi
d075463ee8 [XLA:GPU] Add test case for all-gather with operands of different element type.
- Fix XLA:GPU layout assignment for such all-gather to work correctly with tuple shaped
  outputs.

PiperOrigin-RevId: 372941995
Change-Id: Iba04e22cd821b9ec54187cf8b8be23304cbc6b9c
2021-05-10 09:18:23 -07:00
Rajkumar Samuel
fed1cf9bc0 Roll back a broken change.
PiperOrigin-RevId: 372934102
Change-Id: I6eb42f00e639f6f3e7e96e23665d1e46bf4630a0
2021-05-10 08:38:08 -07:00
A. Unique TensorFlower
c2b62f5f7e [tf.lite] Add prototype custom op for Atan2 and Sign
PiperOrigin-RevId: 372925155
Change-Id: Ie8f048e821b05b59c1c045ce7a8a5361c1c2c3b3
2021-05-10 07:45:34 -07:00
Thai Nguyen
40caef4454 Cleanup: Avoid copying dictionary multiple times
PiperOrigin-RevId: 372899187
Change-Id: Ie3b21b089ca7b9df327961ac4109358f66a64824
2021-05-10 04:33:53 -07:00
A. Unique TensorFlower
20a908fd41 Update TFRT dependency to use revision
c933672fd4.

PiperOrigin-RevId: 372898949
Change-Id: Idd09fa4f2118c8312807f1f4ec1c1aba9ff515b6
2021-05-10 04:25:51 -07:00
Adrian Kuegel
fa698e7c81 Integrate LLVM at llvm/llvm-project@9ba661f912
Updates LLVM usage to match
[9ba661f91276](https://github.com/llvm/llvm-project/commit/9ba661f91276)

PiperOrigin-RevId: 372895783
Change-Id: I7c0ef4c1d10b28e21367eb945e502dd41e17fafb
2021-05-10 04:01:04 -07:00
A. Unique TensorFlower
d7157e466e Update TFRT dependency to use revision
af0bfc46c8.

PiperOrigin-RevId: 372889355
Change-Id: I8b6c14ca82b57cd4fe2eb1fee82908835d263dc9
2021-05-10 03:14:23 -07:00
A. Unique TensorFlower
421a996084 Polish model maker doc: add more links and fallback solutions to TF.
PiperOrigin-RevId: 372888577
Change-Id: Ifc193b24bfe810ccd7168585e018eaa90e7a3a1a
2021-05-10 03:05:54 -07:00
A. Unique TensorFlower
837d6ea1fa compat: Update forward compatibility horizon to 2021-05-10
PiperOrigin-RevId: 372880945
Change-Id: Iae6459d890939ddd6e10d1b66ca6bee0a4484baa
2021-05-10 02:14:35 -07:00
A. Unique TensorFlower
002aa180df Update GraphDef version to 762.
PiperOrigin-RevId: 372880941
Change-Id: Ibfd8edf271cd994c0a8fabc6249891e82daba80b
2021-05-10 02:07:20 -07:00
TensorFlower Gardener
d54b6067b8 Merge pull request #48909 from trentlo:h-fusion-traversal-order-upstream
PiperOrigin-RevId: 372875170
Change-Id: I2db3bf120e3343449ee8a06926156cdad649f0c6
2021-05-10 01:12:30 -07:00
A. Unique TensorFlower
aff3c33377 Update TFRT dependency to use revision
8428fae7c9.

PiperOrigin-RevId: 372871647
Change-Id: I0bcdbbd1fde25a4e6ffad6697ac9847a3d17eb70
2021-05-10 00:42:45 -07:00
Adrian Kuegel
e9e496d551 Integrate LLVM at llvm/llvm-project@5b158093e2
Updates LLVM usage to match
[5b158093e246](https://github.com/llvm/llvm-project/commit/5b158093e246)

PiperOrigin-RevId: 372868700
Change-Id: I99a028b0938c1f3efc73a385f3b4acbf995bce17
2021-05-10 00:21:13 -07:00
Yuqi Li
e34734ff9b nit: remove empty line.
PiperOrigin-RevId: 372867877
Change-Id: I7e3e5be4c0210969fc194d06f4e79417293e6677
2021-05-10 00:11:30 -07:00
Prakalp Srivastava
6bd9c93fc9 Enable pass to hoist writes to replicate invariant resources outside tf_device.replicate op.
Enabling this pass in the TF-XLA MLIR bridge reduces the memory requirement on host as it does not need to allocate buffer memory for output from all device replicas.

PiperOrigin-RevId: 372858954
Change-Id: Ib94d09efe8468b4293e715f84cbdc8964af4155a
2021-05-09 22:24:09 -07:00