Commit Graph

108919 Commits

Author SHA1 Message Date
Vishnuvardhan Janapati
83739474b5
Update custom_gradient.py 2021-05-10 08:48:30 -07:00
Vishnuvardhan Janapati
6172fb6de0
Update custom_gradient.py
Added error raised when executing eagerly .

Fixes https://github.com/tensorflow/tensorflow/issues/29275
2021-04-16 15:10:14 -07:00
Jiri Simsa
0bedfb5781 [tf.data] Exclude captured inputs from optimization-based serialization, which avoids the need to disable static optimizations for graphs that contain user-defined function that captures a reference.
PiperOrigin-RevId: 368920275
Change-Id: I8eb6396dafd1062f6f1d0cb6fae490e0a30958fa
2021-04-16 14:35:53 -07:00
Michael Gester
d8b97ea449 Fixed missing default values for TF dialect ops
- fixed missing empty-string default values (more than 100 cases)
- fixed wrong api-def description
- updated all existing TF dialect ops
- now derived attributes are in lexicographical order

PiperOrigin-RevId: 368918477
Change-Id: I10bc5e65cb5967ab4befd510ce60a1235bb153c3
2021-04-16 14:25:42 -07:00
Marvin Kim
192ec5a82c Disable V2 testing for tf_function_test.py
PiperOrigin-RevId: 368912485
Change-Id: Ic67dc50b5971ea51a25adf97ed79cccb3c873d16
2021-04-16 13:52:47 -07:00
A. Unique TensorFlower
3c724f9856 Switch from deprecated warn to warning.
PiperOrigin-RevId: 368907220
Change-Id: I9364d2d13e78156d6c17c3c878b278f18ad0f3b4
2021-04-16 13:25:07 -07:00
Michael Gester
773f98984c Refine constraints for TF dialect ops
- added some unmodelled ops to dialect
- relaxed over-restrictive side effects
- moved ops that can now be auto-generated to tf_generated_ops.td
- updated extra op traits

PiperOrigin-RevId: 368906974
Change-Id: Ia39916cf446d9a1b001da054a8c43e223333bccc
2021-04-16 13:20:00 -07:00
A. Unique TensorFlower
f02944a7e7 Register StructuredTensorTypeSpec. Necessary for using
StructuredTensor as the input (and/or) output of some models.

PiperOrigin-RevId: 368905924
Change-Id: Idb72a1b109021295e31dd084dd5f8fda2f7ea2ba
2021-04-16 13:15:15 -07:00
Yunxing Dai
c891969f9f Always propagate constants for while loops, including V1.
PiperOrigin-RevId: 368897854
Change-Id: I16609b36680c2018f1d91b1741afd90a5feb6a6a
2021-04-16 12:35:03 -07:00
A. Unique TensorFlower
c1a5f0172f NNAPI Delegate: pass padding information to NNAPI on devices with Android API 31+.
PiperOrigin-RevId: 368892953
Change-Id: Idc3cb3c68869f39bee996d6d86e34d2bb9c94bc9
2021-04-16 12:08:39 -07:00
A. Unique TensorFlower
34aa7b56db Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 368890055
Change-Id: I5863a0ec96ff39d15a513553f29147813680cc09
2021-04-16 11:53:23 -07:00
Jose Baiocchi
9828f1ae70 Allow ProfilerFactory to return a nullptr ProfilerInterface
PiperOrigin-RevId: 368888650
Change-Id: I6d76435f8dfb376c5c8108d778efbf11d2e2b939
2021-04-16 11:46:07 -07:00
Prakalp Srivastava
e8c447f90d Do not make an exception for TPUReplicatedInput in graph pruning.
TPUReplicatedInput ops can be safely pruned away if they have no use. It is anyways deleted by cluster formation pass later on if it has no use. This change just removes them early on in the bridge pipeline.

PiperOrigin-RevId: 368885302
Change-Id: I4976c74e21526e008fa851494151fe7ad577d691
2021-04-16 11:29:04 -07:00
TensorFlower Gardener
9a52875173 Merge pull request #48536 from Saduf2019:master
PiperOrigin-RevId: 368882905
Change-Id: I89a613553d2276f46901d488ae1a7638ab4dca6a
2021-04-16 11:21:35 -07:00
Yuanzhong Xu
fe61cabe50 Register XlaSharding op to PFor
It is the same as tf.identity except that there is a sharding attribute to pass
to XLA.

PiperOrigin-RevId: 368882808
Change-Id: If12db4c47e3f884fd1df5b1679d5a47844be60a0
2021-04-16 11:16:25 -07:00
Juanli Shen
b5a81e9ef2 Use explicit reference instead of literal to get function
PiperOrigin-RevId: 368879589
Change-Id: If69208420099638fb26d9f92a404a2e4e1a7df4d
2021-04-16 11:02:07 -07:00
Christian Sigg
5aad2d540b Move tf_runtime external repository import into a separate file.
PiperOrigin-RevId: 368876050
Change-Id: Iad02fd10a6bda2132a0b089e58ee69eaf5c2e231
2021-04-16 10:47:08 -07:00
Qiao Zhang
2c0afa6b6d [JAX] Allow control of the number of max inflight async computations dispatched.
Due to allocator semantics on some backends, peak device memory usage grows with the number of inflight computations dispatched. Allowing users to dispatch fewer async computations will allow them to avoid OOM or fragmentation errors, with potentially little to no performance penalty.

PiperOrigin-RevId: 368873433
Change-Id: Ie98b41206a134af693034215aeb902206398551e
2021-04-16 10:32:38 -07:00
Rahul Joshi
62019a7241 [XLA:GPU][NFC] Use ThunkSequence for SequentialThunk
PiperOrigin-RevId: 368871191
Change-Id: Ia6786464658838a91f3629dc02d8e96cc6c725b6
2021-04-16 10:20:57 -07:00
A. Unique TensorFlower
85ae1f97f9 Register zeros_like_object as zeros_like_v2.
Also register it for zeros_like.

PiperOrigin-RevId: 368867252
Change-Id: I248498d1a621f0f97dc5b6436703e684012d8fa2
2021-04-16 10:03:29 -07:00
Tim Shen
c4a532007a [XLA/GPU] Remove some dead code.
PiperOrigin-RevId: 368862215
Change-Id: I07d5168957f9c66a1e1559577d105d60f5a341ea
2021-04-16 09:40:08 -07:00
Rahul Joshi
798f1447d1 [XLA:GPU][NFC] Use absl::flat_hash_map instead of std::map.
PiperOrigin-RevId: 368861987
Change-Id: I1afbbdbd1249927822845fec189bc4079875ff83
2021-04-16 09:34:50 -07:00
Rahul Joshi
e8a67ddddb [XLA:GPU] Eliminate redundant thunk_total_order_ member from ThunkSchedule.
- thunk_total_order_ contains the raw same pointers as in thunk_ (which contains
  unique_ptr<>).
- use thunks_ directly instead and remove thunk_total_order_

PiperOrigin-RevId: 368858394
Change-Id: I88af97bd305cecdcb52b6f8c73d3090b321f7410
2021-04-16 09:12:43 -07:00
A. Unique TensorFlower
2fa483b13a Integrate LLVM at llvm/llvm-project@bb907b26e2
Updates LLVM usage to match
[bb907b26e2bf](https://github.com/llvm/llvm-project/commit/bb907b26e2bf)

PiperOrigin-RevId: 368850216
Change-Id: Iba02c5dc1c3370dd7ecb44fb18c0857844c9209c
2021-04-16 08:26:18 -07:00
TensorFlower Gardener
1f664ec611 Merge pull request #48508 from ddavis-2015:DepthToSpace-pr3
PiperOrigin-RevId: 368848624
Change-Id: I557bb5d82b91f1c70c48206b8d96c4c8ecb73642
2021-04-16 08:14:22 -07:00
A. Unique TensorFlower
025053edfe [MLIR][KernelGen] Disable unrolling for lgamma and digamma kernels
The two kernels are fairly big and do not benefit from vectorization.

PiperOrigin-RevId: 368839057
Change-Id: Ica7d07f4aeeb0908af0c0b79630d751f45d05dd9
2021-04-16 07:04:57 -07:00
A. Unique TensorFlower
1fe211938d Integrate LLVM at llvm/llvm-project@3bc88eb392
Updates LLVM usage to match
[3bc88eb3924f](https://github.com/llvm/llvm-project/commit/3bc88eb3924f)

PiperOrigin-RevId: 368828718
Change-Id: I31ba85b46d7588db38378ad2c7d9b671e3f39ff1
2021-04-16 05:36:25 -07:00
A. Unique TensorFlower
e4a3931bd7 2nd change in tfrecord vocabulary support CL chain.
This CL moves the c++ InitializeTableFromDataset op as well as helpers from core to data.

PiperOrigin-RevId: 368824197
Change-Id: I4c5a2f09fb8b96e059eee3d0c78badf8756acdd9
2021-04-16 04:57:57 -07:00
A. Unique TensorFlower
46ef6f1ca8 2nd change in tfrecord vocabulary support CL chain.
This CL moves the c++ InitializeTableFromDataset op as well as helpers from core to data.

PiperOrigin-RevId: 368816647
Change-Id: I284249e60a165b416932fbaf500345cad784668b
2021-04-16 03:56:50 -07:00
A. Unique TensorFlower
9614961027 compat: Update forward compatibility horizon to 2021-04-16
PiperOrigin-RevId: 368805037
Change-Id: Idc7633582a2d8e70367934b6e5ed40d0da216229
2021-04-16 02:09:31 -07:00
A. Unique TensorFlower
cc8c47d43e Update GraphDef version to 738.
PiperOrigin-RevId: 368805027
Change-Id: I32e835d0de56ac506c7c691104851e849e22cb5b
2021-04-16 02:05:43 -07:00
Smit Hinsu
ba33d2118d Unconditionally set _xla_propagate_compile_time_consts attribute in region_control_flow_to_functional pass
This is to fix one of the failures in old bridge phase two legalization expecting a constant. This happens because phase one of the MLIR bridge moved operand of the op outside of the loop body because it was loop invariant. Also, _xla_propagate_compile_time_consts attribute was set to false for the op so the constant didn't get propagated during legalization.

We need to set _xla_propagate_compile_time_consts to true while going from region to functional control flow given the possibility of transformation for LICM. The attribute was supposed to be enabled globally anyway and MLIR bridge phase two does that unconditionally.

PiperOrigin-RevId: 368783012
Change-Id: I26751014e73c172bba6ea02e7c1aa2ad41bcfd30
2021-04-15 22:48:52 -07:00
Yuanzhong Xu
c0abef1d84 Also parse the public sharding attribute for XlaSharding op
If this op is created from python API, the sharding attribute is missing.

PiperOrigin-RevId: 368778739
Change-Id: I0c2a81444970d883ea8fa584e9f88f1d2d6dd048
2021-04-15 22:07:49 -07:00
Qiao Zhang
65c1850918 [JAX] Add input buffer size check for ExecuteHelper.
Introduce a new PJRT CPU backend based on TFRT (8).

PiperOrigin-RevId: 368773676
Change-Id: I12815d3c5efb7a904859ed43b672a4052c73c80e
2021-04-15 21:12:02 -07:00
TensorFlower Gardener
d507712e26 Merge pull request #47987 from lgeiger:cleanup-collections
PiperOrigin-RevId: 368770307
Change-Id: I9171a6f6962a6e695112e60f3eadce3a18c07ad6
2021-04-15 20:42:25 -07:00
Yuanzhong Xu
cd54b9ecb1 [XLA:SPMD] Refine inferred gather output sharding
to allow sharding on both parallel and operand passthrough dimensions

PiperOrigin-RevId: 368768975
Change-Id: I0ad74c65b389cac6f3c51b9a0d5511ed295cdd27
2021-04-15 20:26:15 -07:00
TensorFlower Gardener
999a1597ec Merge pull request #48503 from jameshfisher:patch-4
PiperOrigin-RevId: 368767960
Change-Id: Idc9928c602e9062239bfacdd26063558b22bb743
2021-04-15 20:15:26 -07:00
A. Unique TensorFlower
fbb971f4f8 Adds a PjRtClient method to determine whether the underlying runtime is StreamExecutor or TFRT.
PiperOrigin-RevId: 368766408
Change-Id: I54a3996b6bd79ab6f81b9999ca90374c0e3dc088
2021-04-15 19:57:11 -07:00
A. Unique TensorFlower
6667f55d13 Integrate LLVM at llvm/llvm-project@3f97c66b00
Updates LLVM usage to match
[3f97c66b0040](https://github.com/llvm/llvm-project/commit/3f97c66b0040)

PiperOrigin-RevId: 368763888
Change-Id: I4dd77bea882a97a2b6c81e240cdf315ae059b9e2
2021-04-15 19:28:56 -07:00
Tim Shen
08cd032d66 [XLA/GPU] Fix the IR dumping to propagate the suffix correctly.
PiperOrigin-RevId: 368762041
Change-Id: Id45ad3c0c5aedce3ed6130a64ad0e8230c344076
2021-04-15 19:07:14 -07:00
Jared Duke
7066643823 Remove legacy/deprecated Makefile references
These references are invalid and unsupported.

PiperOrigin-RevId: 368761275
Change-Id: I635b4067e7d2233a3827b52f88d5656910470fb2
2021-04-15 19:01:17 -07:00
David Majnemer
05c54bfee2 [XLA] Simplify trivial variadic reduce-window operations
For example, a variadic RW with a single result can be turned into a normal RW.

PiperOrigin-RevId: 368757284
Change-Id: I5634f193d48820d93b3539b22acbd3be97cfd67d
2021-04-15 18:26:43 -07:00
Billy Lamberta
3c365bed67 Update TFLite Microcontrollers section
PiperOrigin-RevId: 368753584
Change-Id: I9735daccab13d585f12aee7c513222e5ac048f0b
2021-04-15 17:57:28 -07:00
Rahul Joshi
7e1f3afe7b [XLA:GPU] Add test to exercise multiple infeed and outfeeds from the same process.
- Use replicated execution to test that infeeds and outfeeds are tied up to the correct
  replica, i.e., internally the correct stream executor.

PiperOrigin-RevId: 368751782
Change-Id: I6d3224112cbb46d332e1b79fd8db2091c227736d
2021-04-15 17:41:06 -07:00
Jeremy Meredith
3bdccb536b Extracting hand-coded real number support out of generated C++ Conj op and into the only file (math_grad.cc) where it was used. This allows the current set of C++ ops to be fully auto-generated.
PiperOrigin-RevId: 368748247
Change-Id: I5634d14022f2456bbd09194774c41916c2115f3d
2021-04-15 17:19:40 -07:00
Thai Nguyen
246a89698b Support Keras ZeroPadding3D layer in TFLite
PiperOrigin-RevId: 368746408
Change-Id: Id0592fdac147b95c180e0c80e8ebe875dfc69908
2021-04-15 17:06:59 -07:00
Thai Nguyen
77a7fe960e Increase ANDROID_NDK_API_LEVEL to 21 in Dockerfile
PiperOrigin-RevId: 368744806
Change-Id: I1cba31bb011f870cce576718c626eaf1207742fd
2021-04-15 17:02:01 -07:00
Sachin Joglekar
cadc77d627 Copy execution plan in graph partitioner. Also adds code to model_builder_test that fails without this fix.
PiperOrigin-RevId: 368744429
Change-Id: I59378037b9e42a20581fa4c2393e2a64bbcb54ef
2021-04-15 16:54:21 -07:00
Marat Dukhan
3719dfcfb6 Re-enable quantized XNNPACK delegate tests under MSan
PiperOrigin-RevId: 368736235
Change-Id: Ia2c0993c7097c0b5bb9901200fd02a1a0ea976f4
2021-04-15 16:13:19 -07:00
TensorFlower Gardener
b8cad4c631 Merge pull request #48163 from lgeiger:keras-python-2
PiperOrigin-RevId: 368735750
Change-Id: Ica0aebf2d8290fe32bf5f022c503c875f80b6e29
2021-04-15 16:08:28 -07:00