Commit Graph

105051 Commits

Author SHA1 Message Date
Anirudh Sriram
886997fc77 Update book file 2021-02-19 14:20:28 -08:00
Anirudh Sriram
8082abb0b4 Delete content under models/ 2021-02-19 14:16:28 -08:00
Anirudh Sriram
46a97cc561 Move content under models/ to examples/ 2021-02-19 14:08:59 -08:00
A. Unique TensorFlower
9b7ff60faa reduce public interface for python hooks.
PiperOrigin-RevId: 358447444
Change-Id: I949c08d8aa4da929667b42766a9289a549c87ff8
2021-02-19 11:36:36 -08:00
Mingming Liu
03b926d9f9 Change log to vlog to avoid spamming logs
PiperOrigin-RevId: 358445685
Change-Id: Idcff7f096dc331f023d6b5d4cce2d9e453091141
2021-02-19 11:32:08 -08:00
Jiri Simsa
2401461cee Making sure that recently introduced offset argument for the InitializeTableFromTextFile op is handled in a backwards / forwards compatible manner.
PiperOrigin-RevId: 358416520
Change-Id: I8b9637c5d9707097738de134e64b2cb72c73022a
2021-02-19 09:13:35 -08:00
Scott Main
e661958293 Update Python guide to install via Debian package to avoid future issues when trying to use Coral libraries. (Debian package installs are incompatible with pip installs.)
PiperOrigin-RevId: 358414526
Change-Id: I769d7e178e490fe9d86abe3194e9bfa8778350f6
2021-02-19 08:58:55 -08:00
A. Unique TensorFlower
ac74e1746a Export google_find_phdr in JNI library
This is necessary in some circumstances when building internally, and is harmless otherwise.

PiperOrigin-RevId: 358372796
Change-Id: Ib53a5bc1e45acb7fb3fceee91ea25fe7e69283c4
2021-02-19 03:39:36 -08:00
A. Unique TensorFlower
2a52449898 Depend on shim targets in the Java API
PiperOrigin-RevId: 358370930
Change-Id: I1890368dec43716c2bbcbdc27b60a13e39903d06
2021-02-19 03:21:52 -08:00
Stephan Herhut
47c5329897 Enable the generated version of sign.
PiperOrigin-RevId: 358370348
Change-Id: I034141783fe054ff7b78233dc1fe653abc77b16f
2021-02-19 03:16:03 -08:00
Sanjoy Das
db445bbf91 Return a failed status (instead of crashing) when block count is too high
PiperOrigin-RevId: 358360541
Change-Id: Ia08a289c1368bfb2c8b726e707c8bb94a208d224
2021-02-19 01:49:52 -08:00
A. Unique TensorFlower
0a5daafe5d Update GraphDef version to 682.
PiperOrigin-RevId: 358355580
Change-Id: I954937e74ee84c8d0105319e954119c4c560e92e
2021-02-19 01:12:51 -08:00
A. Unique TensorFlower
7ae245910f compat: Update forward compatibility horizon to 2021-02-19
PiperOrigin-RevId: 358355577
Change-Id: I786507263a90b6fc81c9473d17365b8b8ac737bc
2021-02-19 01:07:44 -08:00
Yujing Zhang
58f1434ed4 Disable multi_worker_continuous_run_test on asan
PiperOrigin-RevId: 358344741
Change-Id: I41b0536dfbde6168085477306cab6a8b7c7f65a6
2021-02-18 23:30:57 -08:00
Khanh LeViet
891ba39743 Improve Model Maker tutorial notebook
PiperOrigin-RevId: 358338694
Change-Id: I2f6538530d2cacc9ee56ceba8a662df830e145d2
2021-02-18 22:25:58 -08:00
Yunlu Li
c7b83e2b5e Internal bug fix.
PiperOrigin-RevId: 358331167
Change-Id: I8d4e850023c3c2c6784cf3329d19ad3b9c25948d
2021-02-18 21:32:27 -08:00
A. Unique TensorFlower
2a2b5ba633 Integrate LLVM at llvm/llvm-project@cd8cc00b9e
Updates LLVM usage to match
[cd8cc00b9e2b](https://github.com/llvm/llvm-project/commit/cd8cc00b9e2b)

PiperOrigin-RevId: 358329421
Change-Id: I56c409cb93a70dc0b1643913813ecb935e500603
2021-02-18 21:15:42 -08:00
David Rim
be58584469 Add dynamic range quantization for TransposeConv2d filters
PiperOrigin-RevId: 358327761
Change-Id: I1b4c22a0b4b6f01e70f359c2207f925ea77448d6
2021-02-18 21:02:19 -08:00
David Rim
2abdad6ab1 Disable padded MatrixBatchVectorMultiply with sdot
PiperOrigin-RevId: 358324561
Change-Id: I2ba23bf11c7b200e49cee1cdff096c3521f12e51
2021-02-18 20:31:36 -08:00
Taehee Jeong
3314df4945 Correctly throw error occurred from CalibrationWrapper
PiperOrigin-RevId: 358321694
Change-Id: Ie95ae5701320f5ee7361ca306650603479c92a65
2021-02-18 20:05:41 -08:00
Peter Hawkins
051542c14d Switch tensorflow::Subprocess to use posix_spawnp() instead of fork()/execvp() on non-Android POSIX platforms.
The goal of this change is to avoid calling pthread_atfork() handlers. Some libraries, in particular the version of OpenBLAS included in NumPy, have buggy pthread_atfork() handlers. See https://github.com/xianyi/OpenBLAS/pull/3111 and https://github.com/google/jax/issues/5713 for details.

Now, while we can and have fixed the buggy atfork handlers, it will take some time for the fix to be deployed in a NumPy release and for users to update to a new NumPy release. So we also take an additional step: avoid running atfork handlers in Subprocess.

My copy of the glibc documentation says:
"
According  to  POSIX, it unspecified whether fork handlers established with pthread_atfork(3)
are called when posix_spawn() is invoked.  On glibc, fork handlers are  called  only  if  the
child is created using fork(2).
"
It appears glibc 2.24 and newer do not call pthread_atfork() handlers from posix_spawn().

Using posix_spawn() should be at least no worse than an explicit fork()/execvp() pair, and on glibc it should do the right thing.

PiperOrigin-RevId: 358317859
Change-Id: Ic1d95446706efa7c0db4e79bf8281f14b2bd99df
2021-02-18 19:36:11 -08:00
Yi Situ
61f4be7e5b Remove preprocessor guards.
PiperOrigin-RevId: 358313521
Change-Id: I9100dbf8d82dc695a896a7b61c433ef38865ec9d
2021-02-18 19:03:14 -08:00
Yujing Zhang
4a7d4b3887 [XLA:GPU] Introduce CollectiveOpGroupMode and related helpers.
- Introduce a CollectiveOpGroupMode enum to describe various modes of interpreting
  replica groups attached to collective communication operations and
  GetCollectiveOpGroupMode() function to get the group formation mode
  implied by an HLO collective op based on whether it has channel_id and
  use_global_device_ids.
- Fix GetParticipatingDevices() to use this mode to correctly find participants in all
  group formatio...

PiperOrigin-RevId: 358313513
Change-Id: I9103d065c0a89149bcad3fa6b275696a257c97ae
2021-02-18 18:57:54 -08:00
Meghna Natraj
a8d2bce461 Separate the TF to TFLite type conversion based on their usage (for the TF model or the TFLite model)
PiperOrigin-RevId: 358307744
Change-Id: I942ad076fcac7360c0e221a4098105c763ee960c
2021-02-18 18:12:23 -08:00
Geoffrey Martin-Noble
0f4c8f4a7b Make LLVMIRModuleTranslation target name match CMake name
PiperOrigin-RevId: 358306741
Change-Id: I12e79c398db0504ead0130acae2a0cca8c76a7db
2021-02-18 18:05:42 -08:00
Jaesung Chung
0795d9d94c Add a new pass that freezes SavedModel's AssetOp
This new pass will replace a func's saved model asset bound inputs which are
bound to tf.InitializeTableFromTextFileV2Op ops with tf.Const ops inside the
func's body.

closes #46737

PiperOrigin-RevId: 358304291
Change-Id: I2bd2f6fbcafc30c878a7848eb4c107c3b48d9673
2021-02-18 17:51:19 -08:00
Jay Shi
810e10d628 [tf.data] Add benchmark to compare autotuned MapAndBatchDataset with autotuned ParallelMapDataset followed by ParallelBatchDataset.
PiperOrigin-RevId: 358303549
Change-Id: I49ad3093d72b78ad436d0d9a98f73dbaf4c2eaa8
2021-02-18 17:46:18 -08:00
Yunxing Dai
72684b41eb Disable parse_headers in compiler/jit/BUILD's header only target.
PiperOrigin-RevId: 358302609
Change-Id: I99c0dd7162bb8e397e0a44e85bea1888c9ad4cee
2021-02-18 17:39:09 -08:00
Yi Situ
2c995bda2b Change TPU_LOAD_LIBRARY to accept 1/0 instead of true/false.
PiperOrigin-RevId: 358300004
Change-Id: I93059c5e8fa32463be8a7e598009219a450b498e
2021-02-18 17:33:40 -08:00
Yujing Zhang
624a4a0938 Disable iterator_cluster_test on msan
PiperOrigin-RevId: 358299495
Change-Id: I6461aa86d5dd82376a53255d208774b3c834df75
2021-02-18 17:28:31 -08:00
Terry Heo
5bdd88c188 Enable a way of providing scalar string input with byte[] in Java API
PiperOrigin-RevId: 358299264
Change-Id: I7d755a5a306e1267019e12d1bce5e441acd1550b
2021-02-18 17:21:36 -08:00
A. Unique TensorFlower
3b4f970c3b Update ops-related pbtxt files.
PiperOrigin-RevId: 358292541
Change-Id: Ieb03481abb80ee0e0c0e295fcf4e0726d27f4e02
2021-02-18 17:08:41 -08:00
A. Unique TensorFlower
be625d2fe8 Allow file-based initializers with integer values.
PiperOrigin-RevId: 358292431
Change-Id: Id27fc2dc0be23ef328503c73394bcbe1f0de59bc
2021-02-18 17:04:25 -08:00
Daniel Ellis
c29e9f25e7 Handle garbage collection race condition.
An exception is being thrown when objects that use `CapturableResourceDeleter` are garbage collected at the end of a program's life.  This can happen in very normal circumstances, such as when using `saved_model_cli` to inspect a model.

The cause of the exception appears to be a race condition with garbage collection between `CapturableResourceDeleter` and `ScopedTFFunction`. Both define a custom finalizer (`__del__`); `CaptureableResourceDeleter`'s finalizer ultimately calls a concrete function which calls an `_EagerDefinedFunction` which attempts to load and execute a `ScopedTFFunction`.

In the case of multiple objects in a reference cycle all going unreachable during the same garbage collection cycle, we get no guaranteed ordering for which of the objects will be collected first. In the case of the exception, `ScopedTFFunction` is collected first and its underlying function is deleted. Later, `CapturableResourceDeleter` is called, which fails, since the function it's trying to call is gone.

PiperOrigin-RevId: 358292164
Change-Id: I9162d5de622f5c1ec9b2954647b9958a7d3d87b6
2021-02-18 17:00:03 -08:00
Haoliang Zhang
50ea65ffda In lower tensorlist pass, if allow_tensorlist_pass_through is true, then emit debug logs (since this is not a failure), otherwise emit standard logs (which is considered as a conversion failure) so that end users will see the error message from the converter stack trace.
PiperOrigin-RevId: 358292147
Change-Id: I3c4aa367d09e6fbe4543e66121371a4a4e6d311f
2021-02-18 16:55:50 -08:00
Ken Franko
351fd5e844 Emit an error if there is an uncompilable op in tpu cluster and soft_device_placement option is not true.
This emits an error early rather than a potentially misleading error later in compilation.

PiperOrigin-RevId: 358291279
Change-Id: I227b8303a6b6245c49243e37b0ee9e2e68c20e35
2021-02-18 16:51:26 -08:00
Rahul Joshi
f184809b77 [XLA:GPU] Introduce CollectiveOpGroupMode and related helpers.
- Introduce a CollectiveOpGroupMode enum to describe various modes of interpreting
  replica groups attached to collective communication operations and
  GetCollectiveOpGroupMode() function to get the group formation mode
  implied by an HLO collective op based on whether it has channel_id and
  use_global_device_ids.
- Fix GetParticipatingDevices() to use this mode to correctly find participants in all
  group formation modes.
- Extend collective_ops_utils test to exercise the new behavior of
  GetParticipatingDevices.
- Change existing uses of GetParticipatingDevices() to use cross replica group
  mode to match existing behavior.

PiperOrigin-RevId: 358291067
Change-Id: I2f77659b5718c7513c0b4e724fd4c8c8d343f26c
2021-02-18 16:46:57 -08:00
Tim Shen
e8241628d6 [XLA/GPU] Fix fused slice to use correct MHLO layout.
For an MHLO op, `TypeToShape(op.getType())` doesn't return the intended layout, as layout currently is carried by the `minor_to_major` attribute.

Instead, get the shape from the converted HloComputation from MHLO.

This prevents failures that are revealed in later CLs.

PiperOrigin-RevId: 358289988
Change-Id: I3db5f83738caf51b220afa986ff83b9866628711
2021-02-18 16:40:16 -08:00
A. Unique TensorFlower
1b47c073b0 Integrate LLVM at llvm/llvm-project@b7e05c874b
Updates LLVM usage to match
[b7e05c874b5b](https://github.com/llvm/llvm-project/commit/b7e05c874b5b)

PiperOrigin-RevId: 358289004
Change-Id: I98fa9d4ffb96e84a6a0055e7a6a8d106c3f6ddc6
2021-02-18 16:33:23 -08:00
Alex Stark
a5142450de TFLite resize bilinear opt: Adjust rounding.
PiperOrigin-RevId: 358288715
Change-Id: If443468f473163407f772c9f5f49b9c2d83d6e5e
2021-02-18 16:26:47 -08:00
Michael Banfield
56d3205590 Allow overriding libtpu loading via environment variable.
PiperOrigin-RevId: 358288105
Change-Id: I49136cd247d6866345adb90689639d34b5990740
2021-02-18 16:19:55 -08:00
Karim Nosir
4a10c37bcf [lite] Deprecate _custom_opdefs field in TfLiteConverter.
It is unused. Also, clean up references and mark field deprecated in the proto file.

PiperOrigin-RevId: 358274276
Change-Id: I1ba5990597230c8bd546f8894e5a67b2fc0ec305
2021-02-18 15:11:55 -08:00
A. Unique TensorFlower
fea7106930 Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 358269610
Change-Id: Ie8d8a6247bac1dbad28a09fc2c58d698935a15aa
2021-02-18 14:58:10 -08:00
TensorFlower Gardener
ce73e7d75f Merge pull request #47228 from advaitjain:fix-bazel-docs
PiperOrigin-RevId: 358268311
Change-Id: I63fa95535afdc4ae3878fd7e9df7e0bb76c3fd63
2021-02-18 14:54:17 -08:00
TensorFlower Gardener
498026c3a5 Merge pull request #47227 from advaitjain:opt-kernel-doc
PiperOrigin-RevId: 358268296
Change-Id: I6666ca8e2dbe3bccbef6141a7d86ab29cd397563
2021-02-18 14:49:57 -08:00
Frank Chen
014f02fea5 Open source op definition for TPUReshardVariable op
PiperOrigin-RevId: 358268125
Change-Id: I88c2de3f0bdb237cb1b235c2691a684ab644e916
2021-02-18 14:43:04 -08:00
Thomas O'Malley
aed7a7b5e8 Add reset_states method to LossesContainer and MetricsContainer.
PiperOrigin-RevId: 358259524
Change-Id: I875ad8434cccd6ca47fc41f9e3a7328cd2fcecb6
2021-02-18 14:10:41 -08:00
Jiri Simsa
c9240bd8ed [tf.data] Include information about element shapes and types in TraceMe metadata.
PiperOrigin-RevId: 358258835
Change-Id: I2652e2fe0d10f1462ac90d27f7d09e071a2f31ed
2021-02-18 14:04:51 -08:00
A. Unique TensorFlower
f8a5d4e6cb Add a method to update a literal using dynamic bounds if necessary.
PiperOrigin-RevId: 358255625
Change-Id: I06518781b9e341e0942cabd6099057b9845a5625
2021-02-18 13:49:53 -08:00
Eugene Zhulenev
8d1b9a9f82 Register AddN T=uint32 kernel on GPU
PiperOrigin-RevId: 358242898
Change-Id: I9518bf1ccb53c65b0e434efb5d791d32d51de12e
2021-02-18 12:55:32 -08:00