Commit Graph

114199 Commits

Author SHA1 Message Date
A. Unique TensorFlower
ffae69dcc5 Update TFRT dependency to use revision
4ccbeea9b9.

PiperOrigin-RevId: 384844032
Change-Id: I87dbf3a0955d402161865acbb254c1c89f25593e
2021-07-14 20:56:31 -07:00
Reed Wanderman-Milne
579261dcd4 Fix crash in MatrixSolve when inputs have different batch dimensions.
Before, the process would crash or certain elements would be silently ignored. Now an InvalidArgument is raised.

PiperOrigin-RevId: 384844020
Change-Id: Iba44417e383bdd0e1abc4012bfca83b2377dd335
2021-07-14 20:50:03 -07:00
Hyeonjong Ryu
cd5a9ad133 Internal change on quantization
PiperOrigin-RevId: 384840800
Change-Id: I3e66e46144c763e95e526e01dea84cd47803c768
2021-07-14 20:20:08 -07:00
Geoffrey Martin-Noble
dd9fc1244d Use deps instead of td_srcs for gentbl
One step in getting rid of deprecated and brittle include functionality in the tablegen rules.

Note that this doesn't move everything to td_library yet, but uses td_library where adding a new library was the easiest way to keep everything building.

PiperOrigin-RevId: 384840190
Change-Id: I0c420024421f74ac98e3bf61577439544372ec67
2021-07-14 20:14:32 -07:00
Jaesung Chung
a06c80d875 Fix tensor index map to support multiple signature concept in the converter
PiperOrigin-RevId: 384839723
Change-Id: I0f08b277da94caac86d6c6c41cee02dd22ca5fe5
2021-07-14 20:06:12 -07:00
A. Unique TensorFlower
62ce49b7f7 Clean up usages of deprecated CodedInputStream::SetTotalBytesLimit() method
PiperOrigin-RevId: 384833682
Change-Id: If82466312db207de143cacef2727927c7b6a7880
2021-07-14 19:18:37 -07:00
A. Unique TensorFlower
b2f63ab0c4 Update TFRT dependency to use revision
5c6a8a58fe.

PiperOrigin-RevId: 384826730
Change-Id: Ie5b515f3f9745935ca315a9569a11ac7eaf50a2d
2021-07-14 18:17:56 -07:00
A. Unique TensorFlower
86fa4da8cb Fix EagerTensor/Tensor Cache Key Mismatch for Function Input Signature
- Added the delimiter between shape dimensions identical to the EagerTensor cases

- Updated the associated test which now fails with an error without this fix by including the case presented in the original bug

PiperOrigin-RevId: 384824827
Change-Id: Iada04d329348365df17d5e971a5ab085ff90f85b
2021-07-14 18:03:06 -07:00
A. Unique TensorFlower
99c992f34b Integrate LLVM at llvm/llvm-project@7e496c29e2
Updates LLVM usage to match
[7e496c29e2bc](https://github.com/llvm/llvm-project/commit/7e496c29e2bc)

PiperOrigin-RevId: 384823409
Change-Id: I4c0c7a7dac58b16a9e39ac3a6c171563c96f0480
2021-07-14 17:51:14 -07:00
Advait Jain
1f3da84a89 Remove no longer necessary TFLM references from the Tensorflow repository.
TFLM issues should now be created at github.com/tensorflow/tflite-micro

PiperOrigin-RevId: 384822209
Change-Id: I3a64986eabe3d60d9f66672dd266799cb9646875
2021-07-14 17:43:00 -07:00
Jun Xu
a848a59540 [TF Numerics] Add remat memory test cases with XLA.
The remat XLA tests run on CPU, GPU, and TPU. The tests work by calling the experimental_get_compiler_ir API to trigger XLA compilation and retrieve the HLO proto string. From the HLO proto string, the memory usage is calculated.

PiperOrigin-RevId: 384821536
Change-Id: If5d6325c05b2d192b040ae2d060e9df0579477a6
2021-07-14 17:37:20 -07:00
Jun Xu
e3de711e09 [TF Numerics] Add remat memory test cases with XLA.
The remat XLA tests run on CPU, GPU, and TPU. The tests work by calling the experimental_get_compiler_ir API to trigger XLA compilation and retrieve the HLO proto string. From the HLO proto string, the memory usage is calculated.

PiperOrigin-RevId: 384818305
Change-Id: I8324df150263158e33ef47693e94f5632522b43b
2021-07-14 17:18:20 -07:00
Yang Chen
cfae482cdd [tf.data service] Create AutoShardRewriter class for auto-sharding.
PiperOrigin-RevId: 384817003
Change-Id: Id44b4c85f293f04e8c4be4f2dfae031f1082af14
2021-07-14 17:13:14 -07:00
A. Unique TensorFlower
495d77890e Fix tf.recompute_grad with XLA.
XLA doesn't lower tf.control_dependencies to HLO graph. Add a fake data dependency to upstream gradients so recompute will happen after that.

Also add memory test cases.

PiperOrigin-RevId: 384816813
Change-Id: I579e51f9ff1f845dd75fd355d46d1d913e64a200
2021-07-14 17:07:39 -07:00
Jiri Simsa
b270da08ef [tf.data] Clean up for tf.data performance model metric collection.
This CL removes previous support for periodically exporting the performance model information to a file and improves the tfstreamz/ integration to avoid the need to maintain static state.

In addition, this CL extends gauges with support for int64 / string / bool futures -- that is, making it possible to compute the values at the time they are requested.

PiperOrigin-RevId: 384812318
Change-Id: I3f82fc8f4b1ec5a1e0d3ac2a6d45b872f0ad815b
2021-07-14 16:44:10 -07:00
Faizan Muhammad
443ccaae53 Fix EagerTensor/Tensor Cache Key Mismatch for Function Input Signature
- Added the delimiter between shape dimensions identical to the EagerTensor cases

- Updated the associated test which now fails with an error without this fix by including the case presented in the original bug

PiperOrigin-RevId: 384810264
Change-Id: I222bb5b55197155003c3a8a2110b4a2196252f6a
2021-07-14 16:33:14 -07:00
Xiao Yu
ab9d17c5e4 Move outfeed template implementation to header file.
PiperOrigin-RevId: 384809603
Change-Id: I7d2ea6a15cf7d8a4ce815da91a7d89820bb3e994
2021-07-14 16:28:28 -07:00
Yunxing Dai
80a8e1950e Support dynamic dimension on reverse.
PiperOrigin-RevId: 384808365
Change-Id: Ia63bb10180e61289183e5bf12d2e1a70991b48a9
2021-07-14 16:23:27 -07:00
A. Unique TensorFlower
33844ff19b [tf.data] Graduate the experiment parallelize_batch_copy and make it default for all tf.data input pipelines.
PiperOrigin-RevId: 384806501
Change-Id: I93a224a8a751c0b3b72c0e2082357a61d35bcaf4
2021-07-14 16:17:06 -07:00
A. Unique TensorFlower
e7017fd09c [XLA] Improve region-based live range interference analysis to treat exclusive operations as non-overlapping and by re-ordering independent (unordered) operations to allow additional unnecesasry copies to be removed correctlallow additional unnecesasry copies to be removed correctlyy. This CL also fixed some buggs in the previous analysis implementation in terms of using the current(up-to-date) def-use data-flow relations.
PiperOrigin-RevId: 384805720
Change-Id: I5789725c5774ed4a94e26ba60cab6de95c02a9ef
2021-07-14 16:11:26 -07:00
Jun Xu
3cc0865144 Fix tf.recompute_grad with XLA.
XLA doesn't lower tf.control_dependencies to HLO graph. Add a fake data dependency to upstream gradients so recompute will happen after that.

Also add memory test cases.

PiperOrigin-RevId: 384805186
Change-Id: I17396d0a24723d597ea11ba7843117075298770a
2021-07-14 16:05:19 -07:00
A. Unique TensorFlower
31dd6a5447 Allow more reduce scatters by identifying split dim as the dimension that differs between allreduce and the dynamic slice when there is only one split dim.
PiperOrigin-RevId: 384801593
Change-Id: I89eb25c760fd198ec26d65426f34462b9abb4cf6
2021-07-14 15:48:03 -07:00
Mihai Maruseac
e1470f465d Bump the JPEG dependency to 2.1.0
Handles [CVE-2020-17541](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-17541)

PiperOrigin-RevId: 384789379
Change-Id: Ie339bbe0391067730a8ec7af11621322050cacd1
2021-07-14 15:13:18 -07:00
Advait Jain
a21cbe8f14 Update TFLM documentation to point to the tflite-micro github repo.
PiperOrigin-RevId: 384789374
Change-Id: I5e4698151bee54b3e28a4d46d8480bcd5dfee751
2021-07-14 15:06:17 -07:00
Advait Jain
8333b14688 Remove TFLM specific code from lite/kernels/op_macros.h
With TFLM moving to its own repository, we should no longer have a dependency
from TfLite to TFLM.

https://github.com/tensorflow/tflite-micro/pull/275 adds a TFLM-specific
implementation of op_macros.h in the TFLM tree and we can now remove all the
TFLM code from the tensorflow tree.

PiperOrigin-RevId: 384787132
Change-Id: I4d9babfa45413dd41309f30f11f8f732aec9b6fa
2021-07-14 15:00:39 -07:00
Allen Lavoie
6f7fd1b82f Resolve a custom device placement TODO after the bug was fixed
Custom devices see ops with resource inputs placed on them after cl/351603218.

PiperOrigin-RevId: 384786315
Change-Id: Ic6931c3049bb6fda068676c20a7875158f61417e
2021-07-14 14:51:53 -07:00
Fergus Henderson
8f305c2e42 (lite) Fix grammar error in error message.
PiperOrigin-RevId: 384785496
Change-Id: I3ddbef78bae1b4e3133425e2983950ed08bf9dcf
2021-07-14 14:46:52 -07:00
Bruce Fontaine
e493a33cce Fix TPUEmbedding layer to use named parameters
PiperOrigin-RevId: 384784083
Change-Id: Ic74266e98885f251d76bb18ce501a8f9b1130ce7
2021-07-14 14:32:38 -07:00
A. Unique TensorFlower
f2ff64a289 Update TFRT dependency to use revision
e3a3076004.

PiperOrigin-RevId: 384778421
Change-Id: I57bc04adb4d9171c96210e91f2d830d366e9b3f3
2021-07-14 14:07:38 -07:00
Yunxing Dai
43ef42afe2 Add support for sort in value inference.
PiperOrigin-RevId: 384776662
Change-Id: Id7dd475874280996b5346e29b9e81668acd7225e
2021-07-14 14:00:07 -07:00
A. Unique TensorFlower
81b2bcb9ba Integrate LLVM at llvm/llvm-project@7de2173c2a
Updates LLVM usage to match
[7de2173c2a4c](https://github.com/llvm/llvm-project/commit/7de2173c2a4c)

PiperOrigin-RevId: 384771196
Change-Id: I67cd047160d807e5f8fd5155e8dfeea0d76c2d34
2021-07-14 13:35:38 -07:00
Jay Shi
a3f842e69d [tf.data] Graduate the experiment parallelize_batch_copy and make it default for all tf.data input pipelines.
PiperOrigin-RevId: 384768529
Change-Id: I4bc4b79836c951d91d2f5a6891492fc925d2c7ff
2021-07-14 13:24:03 -07:00
A. Unique TensorFlower
5efcec7761 Fix an off-by-one in an error message in TextFileLineIterator.
PiperOrigin-RevId: 384767372
Change-Id: I24dde4b86ed2bcc07a7c2c6bf6fd9a47d4afe8c8
2021-07-14 13:15:35 -07:00
Daniel Ellis
ee119d4a49 Fix segmentation fault in shape inference logic.
When running shape functions, some functions (such as `MutableHashTableShape`)
produce extra output information in the form of a `ShapeAndType` struct.  The
shapes embedded in this struct are owned by an inference context that is
cleaned up almost immediately; if the upstream code attempts to access this
shape information, it can trigger a segfault.

`ShapeRefiner` is mitigating this for normal output shapes by cloning them
(and thus putting the newly created shape under ownership of an inference
context that will not die), but we were not doing the same for shapes and
types.  This commit fixes that by doing similar logic on output shapes and
types.

PiperOrigin-RevId: 384761124
Change-Id: I07c0c42d29dfbb55bfa13ec1f09ef825fb0a1a1d
2021-07-14 12:50:47 -07:00
Eugene Zhulenev
f118ff1538 Memoize HostCPU device using atomic pointer to save mutex lock
PiperOrigin-RevId: 384759508
Change-Id: I3a53c8a2b1b6c0c9582dcd97a8edd09efc4b12dc
2021-07-14 12:45:20 -07:00
Jacques Pienaar
fc048d833e Rename to underlying type rather than alias
Towards removing typedef. This changes from typedef to typedef'd type. This
doesn't cover all cases.

PiperOrigin-RevId: 384758927
Change-Id: I1abb77274c22164cf1ea7b5c860146ef91c308da
2021-07-14 12:39:03 -07:00
Reed Wanderman-Milne
d47bed61bd Remove reference in docstring to tf.contrib.
PiperOrigin-RevId: 384756222
Change-Id: Ia17e8f2b877e1d055fb04b79d307c060773b0b25
2021-07-14 12:22:57 -07:00
Christian Sigg
77b66fe42e Remove unused --define=using_rocm=true.
PiperOrigin-RevId: 384754476
Change-Id: I88d3b6e507a3a04e136398beb16cc512973b0c40
2021-07-14 12:17:06 -07:00
A. Unique TensorFlower
d471ff42c6 Integrate TFRS with the MLCompass framework, which will enable us to automatically run and benchmark our models every night.
PiperOrigin-RevId: 384750005
Change-Id: I133f8a69a6c128a2072c615b38ef22e1a48c57bc
2021-07-14 12:03:55 -07:00
A. Unique TensorFlower
d9998ae0b2 Update TFRT dependency to use revision
ff325fafd1.

PiperOrigin-RevId: 384749997
Change-Id: I11f192bad4b2cae79fddf46f8836f70d3a3c3725
2021-07-14 11:57:04 -07:00
TensorFlower Gardener
c781991474 Merge pull request #50742 from 8bitmp3:patch-3
PiperOrigin-RevId: 384741070
Change-Id: I883a15d20a37f2678c755071ef8729219ad7f6b9
2021-07-14 11:26:58 -07:00
A. Unique TensorFlower
f385fe1a59 Update TFRT dependency to use revision
4a4538f358.

PiperOrigin-RevId: 384740118
Change-Id: I48eac0f250e291dff2eb2da935e6b1205e4c5672
2021-07-14 11:15:24 -07:00
Allen Lavoie
7ca6bc4d4b ParallelDevice: support arbitrary nested structures in pack and unpack
This means .pack(...) can not start implicitly converting things to tensors, since pack([[1., 2.], [3., 4.], [5., 6.]]) and such are ambiguous (list of parallel tensors vs. parallel tensor of vectors). But I think that constraint is OK.

PiperOrigin-RevId: 384739350
Change-Id: I5301b6ac99e189ec5acfc68e9de27266a7363d14
2021-07-14 11:11:12 -07:00
Rahul Joshi
b4831ee85f [XLA:CPU] Add support for reduce-scatter in XLA CPU backend.
PiperOrigin-RevId: 384738593
Change-Id: I3928894241cb4bbf88868d5f8d53bd2fa29aa6a2
2021-07-14 11:06:02 -07:00
A. Unique TensorFlower
b8d81beeb7 Update TFRT dependency to use revision
3cafdc9fae.

PiperOrigin-RevId: 384735552
Change-Id: I8c5b45a697a82182d0db64cba71b956b1073c7c5
2021-07-14 10:59:12 -07:00
Amit Patankar
b608c3ae61 Remove the tensorflow/third_party/toolchains directory.
Toolchains have now been migrated to the external repository under tensorflow/toolchains.

PiperOrigin-RevId: 384724191
Change-Id: Ieae6a574bb8957640ebd75bd080ad1b546959fb3
2021-07-14 10:48:37 -07:00
A. Unique TensorFlower
bc50c970fd Integrate LLVM at llvm/llvm-project@93dc73b1e0
Updates LLVM usage to match
[93dc73b1e0f3](https://github.com/llvm/llvm-project/commit/93dc73b1e0f3)

PiperOrigin-RevId: 384723901
Change-Id: I9bb01afc7bc87f49e4ba0ac8f82fd2b9df4ad10b
2021-07-14 10:40:25 -07:00
Yang Chen
d5e0cf8368 [tf.data service] Fix a TODO to dynamically generate test protos.
PiperOrigin-RevId: 384722871
Change-Id: I2a1d7eb173ac22c519bcb5653192191a1be0a064
2021-07-14 10:31:38 -07:00
Jeremy Meredith
22e5a45747 Use the updated GraphDef (with e.g. placeholders resolved) instead of the original FunctionDef when determining reachable functions in PFLR (process_function_library_runtime). This allows reachability analysis to find wrapped functions.
Without the accompanying fix, the new test will fail with the error:

```
  FailedPreconditionError: {{function_node __wrapped__MapDataset_Targuments_0}}
  Could not find required function definition __inference_Dataset_map_square_11
  [[{{node MapDataset}}]] [Op:MapDataset]
```

PiperOrigin-RevId: 384722451
Change-Id: I558a918fb3f258dbb6f55b92f4b73d79beccaa11
2021-07-14 10:23:36 -07:00
Mihai Maruseac
f3fbbc8a79 Bump the JPEG dependency to 2.1.0
Handles [CVE-2020-17541](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-17541)

PiperOrigin-RevId: 384722318
Change-Id: I3f29c39acf3be527486f82d02c5b348f5ea4b153
2021-07-14 10:16:01 -07:00