Commit Graph

121867 Commits

Author SHA1 Message Date
A. Unique TensorFlower
6fdb753000 Updates TensorFlow's Bazel version to 4.0.0.
https://blog.bazel.build/2021/01/19/bazel-4-0.html

PiperOrigin-RevId: 413219594
Change-Id: I7529703ef09099040a48042c896f88a584dc1d32
2021-11-30 12:53:11 -08:00
TensorFlower Gardener
31bcb2c7db Merge pull request #53219 from fo40225:fix-C2001
PiperOrigin-RevId: 413219496
Change-Id: I3c8a45caf0b52050cc4cc2f3f421371b3c24c230
2021-11-30 12:48:42 -08:00
TensorFlower Gardener
2a3e79691e Merge pull request #52949 from tensorflow:tfrt_complex_types
PiperOrigin-RevId: 413219461
Change-Id: I2790ea60e78b78cf2e6bbd29888cd3601009293a
2021-11-30 12:44:04 -08:00
A. Unique TensorFlower
576980848e Update TFRT dependency to use revision
db266d81b0.

PiperOrigin-RevId: 413217998
Change-Id: Ibe10782b2c96a33797e8bd2b782b26a6c3de1473
2021-11-30 12:38:53 -08:00
Philip Pham
567339ea5d Legalize tf.cumsum correctly when using mixed precision
PiperOrigin-RevId: 413217233
Change-Id: I310b60b5e58c60477fef6fa15b6c01b4d022774d
2021-11-30 12:33:59 -08:00
A. Unique TensorFlower
1dd5f97ba7 Integrate LLVM at llvm/llvm-project@5bbe50148f
Updates LLVM usage to match
[5bbe50148f3b](https://github.com/llvm/llvm-project/commit/5bbe50148f3b)

PiperOrigin-RevId: 413215449
Change-Id: Ia451829b7bd66bef277e81685e53fe21dca050dd
2021-11-30 12:27:40 -08:00
Shreepadma Venugopalan
9f1e0a3223 Remove unused argument isolate_session_state in UpdateSession.
PiperOrigin-RevId: 413214673
Change-Id: I97253eadd998d58c0b4d753e75ad68322e2ea924
2021-11-30 12:21:17 -08:00
Faizan Muhammad
fb9869c1b9 Fix TensorType dimension issue when shapes relaxed
PiperOrigin-RevId: 413211772
Change-Id: Ic6d2103510b895a125e29999452c94d80d70b6b0
2021-11-30 12:09:09 -08:00
Mehdi Amini
1bfa5e9299 Fix crash when importing invalid graph (func attribute with empty name) to TFG
Found by the fuzzer

PiperOrigin-RevId: 413200989
Change-Id: Ib81abccaf33f05a69c780c937710699f761ede72
2021-11-30 11:34:54 -08:00
A. Unique TensorFlower
d62bf2a099 Cleanup some forward compatibility checks and TODOs and update release notes.
PiperOrigin-RevId: 413199088
Change-Id: I795b9fce0524d2c218428473270d55607f9826c8
2021-11-30 11:29:39 -08:00
Rahul Joshi
f666828b9c [XLA:GPU] Handle BF16 in GetDNNDataTypeFromPrimitiveType
- Fixes bf16 convolution failures on NVIDA Ampere GPUs.
- Testing covered by one BF16 convolution test on xla/tests/convolution_test

PiperOrigin-RevId: 413198102
Change-Id: I2d2c6dc4e561718f700bf56a06e4810acc8217e4
2021-11-30 11:22:54 -08:00
Mark Daoust
d27642090d Fix on device training tutorial.
Mainly: The train_step was broken: the x/y args to the loss were reversed (CE is not symetric). Use `keras.Model.train_step`.

Also:

* Set the right dtype on the data to minimize casting.
* Use a tf.data.Dataset for training to minimize index twiddling.
* Upgrade plots.
* Don't reset the model: train->convert to lite->continue training
* Compare the model output before and after converting to lite.
* Compare the interpreter output before and after loading the on-device-trained-checkpoint.
* Add colors to the labels on the final plot.

PiperOrigin-RevId: 413198035
Change-Id: Ie44bee253f20a88f25d98e69ffb7cfe1cdea0f8d
2021-11-30 11:17:37 -08:00
Sagun Bajra
ce2a70df4f Properly instantiate var handles when running eagerly in tests.
PiperOrigin-RevId: 413194043
Change-Id: I3f10eb0ba2caf8767c1d6b464f2ca38ca0a2cabf
2021-11-30 11:11:32 -08:00
A. Unique TensorFlower
0fe244367c Add API's TpuEmbeddingEngine_ConfigureHost, TpuEmbeddingEngine_ConfigureCommunication, TpuEmbeddingEngine_FinalizeConfiguration and TpuEmbeddingEngine_IsInitialized for corresponding ops.
PiperOrigin-RevId: 413193574
Change-Id: I51ed5c9a95d71cd105e22f3bb3ba5cdbcbd7dbef
2021-11-30 11:04:09 -08:00
George Karpenkov
9f1a57f04b [TF2XLA] Remove incorrect tf.where optimization
Without this change, with tf.where enabled in autoclustering,
`//third_party/tensorflow/python/kernel_tests/nn_ops:embedding_ops_test_xla_gpu`
fails with a miscompare.

I can't generate test due to the input complexity (bug is almost certainly in
value inference), but this will be properly tested once tf.where is compiled in
autoclustering mode.

PiperOrigin-RevId: 413192927
Change-Id: I43d0f6f93e706810ad219d657d01b95c14a7426b
2021-11-30 10:58:36 -08:00
Weiyi Wang
229efc0e72 Support model signaturedef in t/lite/testing/kernel_test/...
PiperOrigin-RevId: 413176649
Change-Id: I2fc1affddb97b34344474053c51c0fbe9df3f525
2021-11-30 10:04:32 -08:00
Michael Gester
ae7626fbc4 Clean up Embedding op side effect handling
- now we have two Embedding side effects, read and write
- now dependencies between EnqueueTPUEmbedding ops with same device ordinal are
  properly modeled
- we now finally don't have any Embedding-specific code left in side effect
  analysis
- introduced new `TF_MustExecute` trait that avoids pruning of an op; this is
  useful for side-effecting ops that don't produce any output and don't have
  dependencies to/from other ops
- for ops that just used `TF_TPUEmbeddingSideEffect` to avoid pruning, use new
  `TF_MustExecute` trait instead
- in contrast to the old `TF_TPUEmbeddingSideEffect`, `TF_MustExecute` avoids
  pruning independent of reachability (see new graph pruning test)

PiperOrigin-RevId: 413175982
Change-Id: I7b65c7a0e8a17b8a1683a0e01d1fd0614f7ac95a
2021-11-30 09:58:47 -08:00
Peter Hawkins
5c64255f32 [JAX] Correctly propagate Python errors out of pytree code when the keys of an enum value cannot be sorted.
Also catch std::runtime_error since the pytree code may throw it.

PiperOrigin-RevId: 413160923
Change-Id: I7da36f45a72785a9f9ba205d4418549fa75278f8
2021-11-30 08:54:37 -08:00
Stephan Herhut
645074a4f6 Retire the lowering from lhlo to linalg, as it is unmaintained and only partially implemented by now.
Also make mhlo the source of truth for map_mhlo_to_scalar_op.h and split it off map_lhlo_to_scalar_op.h.

Users of the lhlo to linalg transformation should go from mhlo to linalg and then bufferize at the linalg level.

PiperOrigin-RevId: 413146497
Change-Id: Ieb3bbe568bd298bf0475167dad5e5e975c8f08bf
2021-11-30 07:47:25 -08:00
A. Unique TensorFlower
24feab6091 Internal change
PiperOrigin-RevId: 413133566
Change-Id: Ie65b380b61e92eac12a58f81cb2c425ac5b0b4cf
2021-11-30 06:35:20 -08:00
A. Unique TensorFlower
5aa97cd5b4 Implements //tensorflow/compiler/tf2tensorrt:_pywrap_py_utils using cc_shared_library. dynamic_deps is not used. Passing dynamic dependencies through dynamic_deps will be implemented in a separate change.
PiperOrigin-RevId: 413132151
Change-Id: Ieb9cc16c2c80fe6c56f6d0aec33760c555d5168e
2021-11-30 06:26:03 -08:00
A. Unique TensorFlower
9dd6792db5 Internal change
PiperOrigin-RevId: 413123342
Change-Id: Iaabb9c214a1a6f63043c46995d44fdf7dd54ac78
2021-11-30 05:35:12 -08:00
Stephan Herhut
84c8883fc7 Fix handling of empty shapes in broadcast_to operation.
PiperOrigin-RevId: 413117255
Change-Id: Ie568579875e0e6213cd9ea9be72ce45009f2f0d7
2021-11-30 04:51:51 -08:00
Diego Caballero
9f34df20a8 [xla] Skip loop full unroll pass in LLVM pipeline.
This patch uses an existing mechanism to filter out the early loop
full unroll pass in the LLVM pipeline. This pass applies excessive
unrolling in statically bounded low trip-count loops, which are
very common in XLA. This creates a strong dependency on the SLP
vectorizer to produce all the vector code, since the loops are fully
unrolled before they reach the Loop Vectorizer. By disabling it,
the Loop Vectorizer would have an opportunity to vectorize the code.
A later loop unroll pass will still unroll the loops before SLP for
those cases missed by the Loop Vectorizer.

PiperOrigin-RevId: 413111548
Change-Id: I1ee747ff76257e698f6f1453a385177f85195dc9
2021-11-30 04:12:00 -08:00
A. Unique TensorFlower
7334db370c Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 413098872
Change-Id: I67eb14dad643f1e5042b3cefeafbacdd6d2a44a5
2021-11-30 02:52:27 -08:00
TensorFlower Gardener
e8fb045c8f Merge pull request #50581 from Intel-tensorflow:quintinwang/functional_ops_default_device
PiperOrigin-RevId: 413095823
Change-Id: I9aaacbda24c17f115fbf453a759fdca9d0450a37
2021-11-30 02:33:57 -08:00
A. Unique TensorFlower
a09bb670ea Update GraphDef version to 966.
PiperOrigin-RevId: 413082710
Change-Id: Ib0076708fe183e6f0fc254fd272911e26e6afcfc
2021-11-30 01:13:00 -08:00
A. Unique TensorFlower
ce96a9aafa compat: Update forward compatibility horizon to 2021-11-30
PiperOrigin-RevId: 413082259
Change-Id: I90006b28679121aefa11f88a0ce14728833042b9
2021-11-30 01:07:54 -08:00
A. Unique TensorFlower
a9c7531dd7 Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 413081289
Change-Id: Ia65e9ff621e2cde83f0d321211fa9249eabe20dd
2021-11-30 01:02:08 -08:00
A. Unique TensorFlower
b55c0ce908 Add conversion metadata to Flatbuffer file
PiperOrigin-RevId: 413073053
Change-Id: Ib5b1c810db13ec33f2ba1d1b9bc9d5d88b021f67
2021-11-30 00:01:13 -08:00
A. Unique TensorFlower
13adf6272a Update TFRT dependency to use revision
794c96aa58.

PiperOrigin-RevId: 413065517
Change-Id: I5dd8880d4449790ce00559b3dcbdeff93433b950
2021-11-29 23:03:08 -08:00
Thai Nguyen
7aef208477 Add conversion metadata to Flatbuffer file
PiperOrigin-RevId: 413064285
Change-Id: Ib973d44dade3683dba284a7cf214ac08ee941e60
2021-11-29 22:51:37 -08:00
Mehdi Amini
cca53ffb9a Mark mlir/XLA tests as passing with Sanitizer except gpu_ops.mlir
This is possible after 413001036 which broke the dependency on XLA GPU
which initializes Cuda and the GPU.

PiperOrigin-RevId: 413058845
Change-Id: Ic53f951c05da8f444c072d67b2b9877948b92eb0
2021-11-29 22:04:40 -08:00
A. Unique TensorFlower
e2fe466f8d Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 413049563
Change-Id: I787346c12fb6cc5f4d961dfb5e8935397c7459aa
2021-11-29 20:54:14 -08:00
Mehdi Amini
765ab6082b Fix crash when importing invalid graph (attribute with empty name) to TFG
Found by the fuzzer

PiperOrigin-RevId: 413037608
Change-Id: I7220932e261bd71848d8bd6d0ee654e83c7fa2e3
2021-11-29 19:23:59 -08:00
Mehdi Amini
a31654d667 Fix crash when an invalid graph (empty handle_data) is provided to the TFG importer
Found by the fuzzer.

PiperOrigin-RevId: 413036574
Change-Id: Ib90e542c04ccc46416bce3201e23f339e5bd1097
2021-11-29 19:12:13 -08:00
A. Unique TensorFlower
5781f1db06 Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 413033646
Change-Id: I944a03b28bb3a9582c686f9c765f34bbdc2b637a
2021-11-29 18:54:38 -08:00
Haoliang Zhang
6207b79ff3 Remove symbol names in training_delegate.cc (AcquireFlexDelegate, TF_AcquireFlexDelegate).
PiperOrigin-RevId: 413033196
Change-Id: Idd03222901c6ef6c6a09a7db52eee205c5454549
2021-11-29 18:45:44 -08:00
A. Unique TensorFlower
fab8206baa [NNAPI] Enable delegation of NNAPI FL7 ops in NNAPI delegate
PiperOrigin-RevId: 413028262
Change-Id: Iaddc50dc563ba0ae226e906c456c960a31dc31e1
2021-11-29 18:08:24 -08:00
Chia-hung Duan
3efefb7807 Support dumping Graph to TFG dialect
PiperOrigin-RevId: 413027326
Change-Id: I73325da01df083441834c49e58e6130d64357e8f
2021-11-29 18:02:37 -08:00
Austin Anderson
956bac7410 Delete Linux wheel size check
This has been supplanted by the size check in the Docker containers. See
https://github.com/tensorflow/build/blob/master/tf_sig_build_dockerfiles/devel.usertools/wheel_verification.bats

I expect no one is using this check but us.

PiperOrigin-RevId: 413026557
Change-Id: I88e1a20cd39a5c235cfac7e7a9550a82dd588ab8
2021-11-29 17:57:52 -08:00
A. Unique TensorFlower
bcfc3df209 Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 413019112
Change-Id: If1b845a4a030b088c698263e80e40a802e66c0b4
2021-11-29 17:17:26 -08:00
A. Unique TensorFlower
ff8d959a38 No-op change: linter clean-up's.
PiperOrigin-RevId: 413018156
Change-Id: If449fd1cec775b0ffeacfbe6c8e707db13f36800
2021-11-29 17:10:44 -08:00
A. Unique TensorFlower
b3aacb8958 [NNAPI] Support Vendor Plugin in NNAPI delegate
PiperOrigin-RevId: 413015019
Change-Id: I8deb5d5be34e12d32981477797df93108fa0b347
2021-11-29 16:52:19 -08:00
Weiyi Wang
bcfd690cb6 [tf.lite] Zip test test cases uses <name, value> key value pairs to specify input and expectations, instead of using index.
PiperOrigin-RevId: 413010353
Change-Id: I3de3cf5a9815cb39611cde3dff3f5da527faca1a
2021-11-29 16:32:06 -08:00
Juhyun Lee
139235ceec Fix grammar in error messages.
PiperOrigin-RevId: 413009516
Change-Id: Iffd3b74a9653af80619da13938d067cf06d77fed
2021-11-29 16:26:07 -08:00
Peng Wang
16bcc6a92c Add utilities for typing equality and subtyping, along with tests.
PiperOrigin-RevId: 413007179
Change-Id: Id0c18d50ec74464fb07e1f7a79e64a6818b040bd
2021-11-29 16:19:44 -08:00
Katherine Wu
80ac603f3f Use dependencies logic when loading function captures, slot variables, and resource handles.
This ensures that all function captures (which includes slot variables) are loaded before the functions that use them. Previously, function captures are loaded in the alphabetical order of the function names, which can cause problems if functions depend on the output of other functions (resource handles are generated by `create_resource`).

PiperOrigin-RevId: 413006430
Change-Id: I82faecd089eeae7e28920d8cc0ae993e58833b49
2021-11-29 16:14:28 -08:00
A. Unique TensorFlower
dcf7735203 Update TFRT dependency to use revision
516ed2b623.

PiperOrigin-RevId: 413005737
Change-Id: I0149237cacd7baf04a1a1f12026956734ddeac56
2021-11-29 16:09:07 -08:00
HanBin Yoon
62f6c6fbb4 [XLIR] Make convolution executions trigger when the input chain is ready.
PiperOrigin-RevId: 413003145
Change-Id: I3fc89cd07debc7af678d7532f583318b39874df9
2021-11-29 15:58:24 -08:00