Commit Graph

113787 Commits

Author SHA1 Message Date
rmothukuru
2dcbbe3ec7
Update errors_impl.py
Added the Code example for `tf.errors.ResourceExhaustedError`
2021-07-08 19:10:11 +05:30
Adrian Kuegel
b70166e24c Enable MLIR generated Xdivy and FloorDiv GPU kernels by default.
PiperOrigin-RevId: 383616365
Change-Id: I78db43ab2d97279fceeb5dd6ba1fa9d48c1b4e0d
2021-07-08 06:07:57 -07:00
Adrian Kuegel
599dda019d Disable vectorization for OnesLike and ZerosLike GPU kernels.
PiperOrigin-RevId: 383613128
Change-Id: I7de7612c3381f41e4514f0d6abf40d70dd607927
2021-07-08 05:37:26 -07:00
A. Unique TensorFlower
d8040d5b06 Update TFRT dependency to use revision
9167ea019f.

PiperOrigin-RevId: 383609578
Change-Id: I7da3e9224e0abe986402d55ca8b4a53165896570
2021-07-08 05:07:49 -07:00
A. Unique TensorFlower
0488245ab8 Integrate LLVM at llvm/llvm-project@684dfe8adb
Updates LLVM usage to match
[684dfe8adb7e](https://github.com/llvm/llvm-project/commit/684dfe8adb7e)

PiperOrigin-RevId: 383606237
Change-Id: Ic4654f282718c4bcea9ac4eb0cdac42b9ebd9a22
2021-07-08 04:44:26 -07:00
TensorFlower Gardener
ee03e30745 Merge pull request #50153 from nouiz:upstream_fusion_indexig
PiperOrigin-RevId: 383598431
Change-Id: Ic62c46792742fe27ee57f1f3a4b4661f0107fc57
2021-07-08 03:49:39 -07:00
Adrian Kuegel
2fa8d05abb Don't instantiate CastFunctor templates if they are not needed.
If MLIR generated kernels are enabled, some CastFunctor templates don't need to
be instantiated.

PiperOrigin-RevId: 383597713
Change-Id: Ia85077abbcf4b00132290f1120ea950a638bf7c0
2021-07-08 03:43:14 -07:00
Adrian Kuegel
ae38275fbb Disable vectorization for MLIR generated Round and Rint kernels.
It seems they don't benefit from it, and are faster without vectorization.

PiperOrigin-RevId: 383595164
Change-Id: If3ebe5ec1e7efd6e7853c4890b9545be7e0eb873
2021-07-08 03:22:26 -07:00
A. Unique TensorFlower
bc02e845f4 Update TFRT dependency to use revision
300e7ac61c.

PiperOrigin-RevId: 383595008
Change-Id: Ifbe6d391889c1fb5236692675740ee30a888e76e
2021-07-08 03:17:07 -07:00
A. Unique TensorFlower
de8cb40b70 Integrate LLVM at llvm/llvm-project@21fd875952
Updates LLVM usage to match
[21fd87595297](https://github.com/llvm/llvm-project/commit/21fd87595297)

PiperOrigin-RevId: 383591351
Change-Id: Iaa181fed4e6a89d9b73f6fbd351e66e8ee63ce4e
2021-07-08 02:50:41 -07:00
A. Unique TensorFlower
53591deefa Update GraphDef version to 821.
PiperOrigin-RevId: 383585924
Change-Id: If3608c847c3456dc3c42ea7cfe93ef13c5a046ee
2021-07-08 02:14:40 -07:00
A. Unique TensorFlower
a0ed0cbc92 compat: Update forward compatibility horizon to 2021-07-08
PiperOrigin-RevId: 383585806
Change-Id: Id24ee27b5f7b68a31501009c0ddb7d436e6c485d
2021-07-08 02:09:27 -07:00
Adrian Kuegel
07cb7846f0 Add MLIR generated Xlog1py GPU kernel for complex types.
This requires a mapping from mhlo::Log1pOp to complex::Log1pOp for complex types.

PiperOrigin-RevId: 383585333
Change-Id: Ia4d3f0c7c18b66db39638322e755bc9ef426c081
2021-07-08 02:02:28 -07:00
A. Unique TensorFlower
0e8600303a Update TFRT dependency to use revision
ed6f666ac1.

PiperOrigin-RevId: 383581443
Change-Id: I18e42eb5e28b6d2b89513cf4a3771edcba382c38
2021-07-08 01:30:01 -07:00
A. Unique TensorFlower
b8216f7078 Integrate LLVM at llvm/llvm-project@d38b9f1f31
Updates LLVM usage to match
[d38b9f1f31b1](https://github.com/llvm/llvm-project/commit/d38b9f1f31b1)

PiperOrigin-RevId: 383577631
Change-Id: I892a74f43a195c9e2645a7cd18501afb24afb585
2021-07-08 00:59:52 -07:00
Adrian Kuegel
abec23e1b6 Add MLIR generated OnesLike GPU kernels.
Not enabled by default yet.

PiperOrigin-RevId: 383574403
Change-Id: I95f95a2a42a9a2935470caf6312815fb0b9396a7
2021-07-08 00:36:57 -07:00
Terry Heo
44c05422ee tflite evaluation utils: Don't build XNNPACK for linux_armhf build
This is a temporary workaround until the XNNPACK build is fixed.

PiperOrigin-RevId: 383569908
Change-Id: Id7db0fa6614fb377fc38604d52c6aefa8d3cc3f0
2021-07-08 00:05:41 -07:00
Eugene Brevdo
634edc96e4 [TF XLA AOT] Assume aarch64 is always available.
This is useful for e.g. saved_model_cli aot_compile_cpu with a target
architecture of aarch64.

Previously this failed to build but now it seems OK.

While we're at it, remove the manual tag from saved_model_cli_test.

PiperOrigin-RevId: 383569229
Change-Id: I91dcfccfbd0c817e12dee7e45985437001f56b50
2021-07-07 23:56:34 -07:00
Terry Heo
1485091a6a tflite: Update CMake 3rd party libraries hash
PiperOrigin-RevId: 383560588
Change-Id: I6bb5121d844a3e18b6f404947b4b77e02846bd1d
2021-07-07 22:29:09 -07:00
Thai Nguyen
9c5ef6f956 Add tests for BroadcastTo op
The newly added case is target shape has zeros.

PiperOrigin-RevId: 383559084
Change-Id: I03c85d4071678a05a651b0a7a0c0cc2d59bad753
2021-07-07 22:12:37 -07:00
Jaesung Chung
1495a8fd94 Implement signature runner Python API for running multiple signatures
PiperOrigin-RevId: 383557269
Change-Id: Ibce8e6b413d7522550474a8d734a3da7fb834b62
2021-07-07 21:57:12 -07:00
A. Unique TensorFlower
75a4c9da24 Add mutable config function to HloModule. Add PhaseOrdering related members/functions in HloModuleConfig.
PiperOrigin-RevId: 383549428
Change-Id: I1902d88ef364a7ec12beda039ccae3fb947f403a
2021-07-07 20:46:18 -07:00
A. Unique TensorFlower
a715f57e0e Update TFRT dependency to use revision
edfbe646de.

PiperOrigin-RevId: 383541957
Change-Id: I4e4f95b977ec9f4170325d0de8aeb766bb10e9f0
2021-07-07 19:36:56 -07:00
Taehee Jeong
f295b03778 Add canonicalization pattern for tfr.quant_qparams op
This op reads preceding cast op that casts quantized tensor to tfr.tensor. From the quantization parameters, the scale and zero points are converted to constants.

PiperOrigin-RevId: 383541459
Change-Id: I1c5d21f8f829c25813d1adfe91a59194d30b2249
2021-07-07 19:30:42 -07:00
Jaesung Chung
157d8cfb76 Share the initialization status of the initialization subgraph execution.
Currently, the CallOnce operator can be invoked once in a single subgraph. When
we consider multiple entry point subgraphs, the current implementation of the
CallOnce will invoke the same initialization per entry point subgraph
separately.

To avoid the situation, the CallOnce operator should cache the invocation
information across the subgraphs. This requirement isn’t simply addressed by
the operator level. Like resource sharing in TensorFlow Lite interpreter class
level, it requires the interpreter level status sharing.

PiperOrigin-RevId: 383540722
Change-Id: Ia9f6dc6ed3631b2c37ffc65352cfc1a66ba2581e
2021-07-07 19:24:14 -07:00
A. Unique TensorFlower
6a50f602eb Integrate LLVM at llvm/llvm-project@8e22539067
Updates LLVM usage to match
[8e22539067d9](https://github.com/llvm/llvm-project/commit/8e22539067d9)

PiperOrigin-RevId: 383538878
Change-Id: I8ea541fe819c3b4fc79ef92376e0c474dfd72b07
2021-07-07 19:18:16 -07:00
A. Unique TensorFlower
e0567a9715 Minor style cleanups in tf_gen_op_wrapper_py
PiperOrigin-RevId: 383538498
Change-Id: Iefee745cdd4a71092d88ff210db29e50ae2540b4
2021-07-07 19:07:45 -07:00
A. Unique TensorFlower
623e6ee492 Improve deprecated name build warning by adding the full target name to the message
PiperOrigin-RevId: 383536228
Change-Id: Ie983f248d06deba48234772caa0c09f4e681dc6e
2021-07-07 18:44:24 -07:00
Jacques Pienaar
55acb46ee7 Use TF_LITE_KERNEL_LOG instead of report_error
PiperOrigin-RevId: 383535580
Change-Id: I83186751d13dcb27515831743563f61d0ff2fdf2
2021-07-07 18:38:10 -07:00
Eugene Zhulenev
985de0ce26 [tf:mlir] Update MLIR pass registration for test_cluster_ops_by_policy.cc
PiperOrigin-RevId: 383534970
Change-Id: If7776f85ae4caa26fec8626782efe826cfa8a520
2021-07-07 18:33:15 -07:00
Rahul Joshi
e53886b2ec [XLA:GPU] Fix expected output for AllGatherBroadcastReorder_Uniform test.
PiperOrigin-RevId: 383532900
Change-Id: I1e5e6cab9a13fbe1c4c93881d14fee3480e7054e
2021-07-07 18:27:28 -07:00
A. Unique TensorFlower
6623aaef16 Update TFRT dependency to use revision
87c5c07e96.

PiperOrigin-RevId: 383532595
Change-Id: Iac26fe373a88a76aa7e305377797399ebe7173de
2021-07-07 18:18:26 -07:00
Jacques Pienaar
8347f1d337 Remove unused flag
PiperOrigin-RevId: 383532496
Change-Id: Ic705cb1dd9e26c7802f50a1edda122a0afc19b96
2021-07-07 18:13:09 -07:00
HanBin Yoon
57ab6dbd9a Remove CollectivePermuteThunk. Use the NCCL version (NcclCollectivePermuteThunk) instead.
PiperOrigin-RevId: 383530975
Change-Id: I087e6bf0c0ed9409bc183421807f4f9df4e1d4e2
2021-07-07 18:04:45 -07:00
Matthias Kramm
039f14d987 Use TpuCompileOpKernelImpl path for ftrl_ops test with new bridge.
PiperOrigin-RevId: 383530077
Change-Id: Ia5a804598c30d18a37e75140a14e82300e5b1c62
2021-07-07 17:54:45 -07:00
Rahul Joshi
080481de7c [NFC] Update TestVisitorUtil passes to new pass registration API.
PiperOrigin-RevId: 383526001
Change-Id: I1d6a8cf5c99a3ba8000dd7eb125ed7353d3c232d
2021-07-07 17:22:49 -07:00
Jun Xu
db45050f69 Add buffer assignment to executable when a debug flag is set.
The buffer allocations and sizes info is useful for debug and writing memory unit tests.

PiperOrigin-RevId: 383524130
Change-Id: I93d2c1e982a7c27fd6e2e782842cb07c6e73f9ca
2021-07-07 17:12:49 -07:00
A. Unique TensorFlower
7b38474f74 Update TFRT dependency to use revision
acd1422732.

PiperOrigin-RevId: 383523011
Change-Id: Ie108cc78e3d6f67919bbd36e96bc442822ce502d
2021-07-07 17:06:15 -07:00
Kai Zhu
a39a49009a PR #50102: [MLIR][DISC] Add initial version of LhloLegalizeRootsToParallelLoops and InputInlineFusion
Imported from GitHub PR https://github.com/tensorflow/tensorflow/pull/50102

This PR is currently WIP for a discussion in advance. More UTs will be added.

The basic codegen flow will be:
step 1, LhloLegalizeRootsToParallelLoops
step 2, InputInlineFusion
step 3, canonicalize & CSE to optimize the redundant index calculations, we will need a MemRefLoadCSE here since the general cse will not process memref.load (this is only an optimization and will sent PRs as second priority)
step 4, Inline the lmhlo.Fusion
step 5, ParallelToGPULaunch/ParallelToOpenMP

Codegen schedules other than the basic loop schedule are seperated into incoming PRs. And lmhlo Ops support other than RealDynamicSlice, DynamicBroadcastInDim & BroadcastInDim in lhlo_elemental_util are also seperated into subsequent PRs.
Other known TODOs includes:
(1) There is potential redundant Linearize/Delinearize calculations in the initial version. memref.LinearizeIndex/Delinearize op will be brought in future PRs to optimize the index calculation. As discussed in https://llvm.discourse.group/t/add-an-expanded-load-store-op-in-memref-dialect/3503/17.

fusion_utils depends on https://github.com/tensorflow/tensorflow/pull/50020 and will be removed after it's done.
Copybara import of the project:

--
056519dd90e60de865657908807c24a943ead385 by tashuang.zk <tashuang.zk@alibaba-inc.com>:

[MLIR][DISC] Add initial version of LhloLegalizeRootsToParallelLoops and InputInlineFusion
Pass for codegen

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/tensorflow/pull/50102 from linearhit:disc_dev 056519dd90e60de865657908807c24a943ead385
PiperOrigin-RevId: 383518259
Change-Id: Ifc18e31c06c9faae56d4363a6f88c5292442dba1
2021-07-07 16:49:39 -07:00
Kuangyuan Chen
1f8c9c57c0 Add tests for argmin/argmax.
The ArgMin functor was fixed in upstream Eigen.

PiperOrigin-RevId: 383517713
Change-Id: I15c576f4f108d52d5dd383dd75d47b75c2469eef
2021-07-07 16:44:49 -07:00
A. Unique TensorFlower
33f7f3dd2a Integrate LLVM at llvm/llvm-project@223261cbaa
Updates LLVM usage to match
[223261cbaa6b](https://github.com/llvm/llvm-project/commit/223261cbaa6b)

PiperOrigin-RevId: 383517206
Change-Id: I0506468b2800ec94965679df6b03fa806eb6334a
2021-07-07 16:39:01 -07:00
Marcello Maggioni
d7d36f417f [XLA] Fix index of shape returned from ShapeInference for AllReduceStart.
The shapes are the same for each of the elements of the tuple, but the actual
output lives in index {1}. It can be confusing when reading and one might assume
that the actual buffer where the output lives is in {0} instead.

PiperOrigin-RevId: 383515890
Change-Id: Ic153d7de9cba57aec03f4981518ff8d41d1392a1
2021-07-07 16:31:49 -07:00
Kuangyuan Chen
d36c324838 Disable TSAN tap for //third_party/tensorflow/lite/experimental/acceleration/mini_benchmark:mini_benchmark_test
PiperOrigin-RevId: 383515621
Change-Id: I0dbc6cd028cce107e6ba993679a3eb66b6a0e8f6
2021-07-07 16:26:08 -07:00
Rahul Joshi
8823a9c8b7 [NFC] Delete unused file.
PiperOrigin-RevId: 383509257
Change-Id: I26e3833169426c8ab8ce14ca421aea0187514f77
2021-07-07 15:48:48 -07:00
Scott Zhu
e7255c5506 Update tf-nightly package to use more up to date version of keras and estimator.
PiperOrigin-RevId: 383507752
Change-Id: I91c125b8adea30952e2775cbc393d13305b00996
2021-07-07 15:42:28 -07:00
Matthias Kramm
1cfe63baab Add TPURewriteSession to xla_test.py
PiperOrigin-RevId: 383503694
Change-Id: I559f3180d5eb3e549c5477b252ded1db53e87060
2021-07-07 15:20:00 -07:00
Scott Zhu
da6568a4d3 Remove the API usage monitoring call in the legacy keras code.
PiperOrigin-RevId: 383499649
Change-Id: Idf581a8cc9e043714819a25a0d0104d177fee782
2021-07-07 15:05:45 -07:00
Antonio Sanchez
0bda15f7b8 Add tests for argmin/argmax.
The ArgMin functor was fixed in upstream Eigen.

PiperOrigin-RevId: 383499044
Change-Id: I04ab75fac6332a0b56b0dd7d6f23ba7f1b319187
2021-07-07 14:58:36 -07:00
Yuanzhong Xu
bfb74e1587 Pfor for EnsureShape
PiperOrigin-RevId: 383496175
Change-Id: I4766c47ba5cf1173d08f2e25e19a03e90d86cc14
2021-07-07 14:43:24 -07:00
Sanjoy Das
105aef3fac Disable GPU kernel for SparseSegmentMeanGrad
It fails with "Internal:  Failed to launch gpuprim::DeviceRadixSort::SortPairs, temp_storage_bytes: 3327status: invalid configuration argument"

Disable the kernel while we're triaging the issue.

PiperOrigin-RevId: 383492772
Change-Id: I6cf99f6d5cc8b39b081c48893a6db601ead6817c
2021-07-07 14:32:33 -07:00