Commit Graph

90124 Commits

Author SHA1 Message Date
Deven Desai
552d71f399 [ROCm] Fix for ROCm Breakage - 200708
The XLA CI job for ROCm is running into the following compile failure

```
tensorflow/compiler/xla/service/sharding_propagation.cc: In static member function 'static tensorflow::Status xla::ShardingPropagation::NormalizeDomain(const xla::DomainMetadata::Domain&, const xla::DomainMetadata*)':
tensorflow/compiler/xla/service/sharding_propagation.cc:1387:46: error: request for member 'exit_domains' in 'domain', which is of pointer type 'xla::HloInstruction*' (maybe you meant to use '->' ?)
         for (HloInstruction* domain : domain.exit_domains) {
                                              ^
...
```

The failure seems to be caused by the loop variable `domain` having the same name as another variable in the enclosing scope. Renaming the loop variable to something different fixes the failure.
2020-07-08 23:24:41 +00:00
Martin Wicke
5b64e1d76b Expose x*sigmoid(x) as silu in addition to swish, and credit silu paper.
Fixes #41066.

PiperOrigin-RevId: 320286831
Change-Id: Iee5d7963e7203e9ea9fc82dba5a3d35142a3bf9b
2020-07-08 16:20:52 -07:00
Gabriel Rasskin
457388e83a
Update BUILD 2020-07-08 16:14:28 -07:00
Gabriel Rasskin
5fdcc8e9bc
Create consume_non_whitespace_fuzz.cc 2020-07-08 16:13:58 -07:00
Gabriel Rasskin
532bb640b7
Create arg_def_case_fuzz.cc 2020-07-08 16:13:24 -07:00
Gabriel Rasskin
871797b99e
Create consume_leading_digits_fuzz.cc 2020-07-08 16:12:54 -07:00
Pavithra Vijay
7f357c4447 Improve tf.train.list_variables API doc.
PiperOrigin-RevId: 320285328
Change-Id: I52d1d61e2c181259699024a8197d5364d3ba747e
2020-07-08 16:10:45 -07:00
Yuanzhong Xu
353af3ea66 Expose XlaOptions as an argument to tpu.rewrite
Right now, it contains an single option whether requested XLA partitioning should be done in SPMD or MPMD.

XLA/TPU has two implementations of partitioning. SPMD: ideal for per-op partitioning; MPMD: required for graph partitioning (e.g., GPipe).

PiperOrigin-RevId: 320282466
Change-Id: I8b90394333a15da9a3f2d93ac79e56eb2764f466
2020-07-08 15:56:29 -07:00
Gunhan Gulsoy
486ac1e10a Update TF's six dependency.
PiperOrigin-RevId: 320277020
Change-Id: I84b559c0aaff61e6745e141235d4afeed5e0cafb
2020-07-08 15:30:50 -07:00
A. Unique TensorFlower
a22b28a22a Fix typo, AddIntemediateTensorsToFusedOp to AddIntermediateTensorsToFusedOp.
PiperOrigin-RevId: 320276937
Change-Id: Ic6765880c25af50410c46f8f1ee164653b47a4ec
2020-07-08 15:25:45 -07:00
Pavithra Vijay
e242717155 Update v1 only training/adagrad_test with proper reason.
PiperOrigin-RevId: 320273086
Change-Id: Ibcd14926a7e8acb457347501a50d32c1973e1bc3
2020-07-08 15:07:54 -07:00
Lukas Geiger
5ef85fc6c8 Convert path to string right before passing it to the filesystem layer 2020-07-09 00:01:23 +02:00
Peng Wang
546df2593f [TF-numpy] Re-enables signature check against numpy, and fixes problems found by the check.
PiperOrigin-RevId: 320271282
Change-Id: Iea02c7dd8802b6b4fa7e879f3c2d73bdaf7a92e3
2020-07-08 15:00:54 -07:00
Andy Ly
e1fcc87096 Update TPUUpdateEmbeddingEnqueueOpInputs pass to use llvm::StringMap instead of std::map and fix error message style. (NFC)
PiperOrigin-RevId: 320269989
Change-Id: I0358e1345ccd2bc2f93adde5d793b62960f7f205
2020-07-08 14:56:46 -07:00
Jared Duke
c38762b4c3 Reland "Fix issues with 32-bit ARM builds"
PiperOrigin-RevId: 320269794
Change-Id: I9b7eb7561ad6c1d81d398745520e279b99c8dafe
2020-07-08 14:52:26 -07:00
Lucy Fox
84d017ca0e Update Grappler Remapper documentation to include DepthwiseConv2dNative fusion.
PiperOrigin-RevId: 320269324
Change-Id: I9defa2bfe2deff9d709eca0e308f56637d896a2e
2020-07-08 14:47:42 -07:00
Ran Chen
93990d3a3c Update the docstring of reduce_to and batch_reduce_to
PiperOrigin-RevId: 320267089
Change-Id: I09821547a91cbc7441ac6aa0e188a614a5055ddb
2020-07-08 14:37:28 -07:00
Mangpo Phothilimthana
d59724604c HloModule::Clone function copies input_output_alias_config. Without this copy, the cloned module is not identical to the original module because it does not have the input_output_alias_config.
PiperOrigin-RevId: 320260067
Change-Id: I2c1b8cdda50bc253fd30d844c3b1840c0bcf596c
2020-07-08 14:04:32 -07:00
Eugene Zhulenev
1404718bfa [MLIR:TF] Canonicalize redundant reshape
PiperOrigin-RevId: 320258973
Change-Id: I9064c42b70eddd0363cf6966344c39384561e7be
2020-07-08 13:59:58 -07:00
Francois Chollet
41b7f9c61b Fix critical bug with add_loss TFOpLayer graph construction
that caused incorrect loss values and backprop issues

PiperOrigin-RevId: 320257330
Change-Id: I0a030bc7632735b152454657fd15e41539b4e4bd
2020-07-08 13:53:24 -07:00
A. Unique TensorFlower
072f95d12b Add pass to update tpu embedding ops pass.
PiperOrigin-RevId: 320257175
Change-Id: I799e78da8f00e1097b0d5cf1eea23dfb4277389a
2020-07-08 13:49:27 -07:00
Andy Ly
6ad4a657e0 Add shape inference pass to the beginning of the TPUBridgeV1Compat pipeline.
It is possible for the TPU computation to be in a function. Running shape inference prior to V1 specific passes allow for more granular shapes/types to be propagated to functions (e.g. resource subtypes), resulting in possibly less runtime/dynamic shapes for the TPU program.

PiperOrigin-RevId: 320252292
Change-Id: I431ff20c943a9542fab2a0076675d62b22280cb8
2020-07-08 13:29:28 -07:00
Jared Duke
26e2f2e285 Fix cleanup of TFLite Java NNAPI delegate
PiperOrigin-RevId: 320251156
Change-Id: I252fad8d6a5b79b57da706135a42d7e7970b8bd4
2020-07-08 13:25:18 -07:00
Michael Kuchnik
80ac3b3bcc [tf.data] Change buckets for tf.data's iterator.getNext() duration.
PiperOrigin-RevId: 320249597
Change-Id: I7ab301007351628ceebb459e05ef9ceda73957f9
2020-07-08 13:18:16 -07:00
Andy Ly
ee7172a929 Add tf.TPUPartitionedCall to TensorFlow MLIR ODS.
This op is mostly auto generated from the TensorFlow op registry but with the op interface CallOpInterface added in, matching tf.PartitionedCall/tf.StatefulPartitionedCall.

PiperOrigin-RevId: 320247409
Change-Id: I5db944a3aa3330f7238cfaef190e8210944eb811
2020-07-08 12:59:42 -07:00
Daniel Nguyen
f863e79fa8 added priority function 2020-07-08 19:57:33 +00:00
Yanhui Liang
bf9ed625de Clean up the LSTM/GRU layer with the new grappler selector.
PiperOrigin-RevId: 320244001
Change-Id: Iaf4285b437f64493d7b9bf8b9638c588b15e1237
2020-07-08 12:44:10 -07:00
Eugene Zhulenev
0a95e95853 Canonicalize identity arithmetic operations with dynamic shapes
PiperOrigin-RevId: 320240434
Change-Id: I5b095eeb95f42e6126939600aebf5efe802198e7
2020-07-08 12:28:45 -07:00
TensorFlower Gardener
65960e7b90 Merge pull request #41144 from xingyu-long:xingyu_simplify_cpu_example
PiperOrigin-RevId: 320233485
Change-Id: Ieaf27de6d8a12e43bf94a0ce40f8e6e829f48791
2020-07-08 11:55:28 -07:00
A. Unique TensorFlower
2d18e2be71 Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 320232518
Change-Id: I191e4b25ef8fb243b4180eb4a9a696701490f2cb
2020-07-08 11:49:38 -07:00
Andy Ly
afed3a8257 Add helper functions to tf_device.replicate op for determining and accessing replicated and packed inputs from block arguments.
This exposes reusable functions for determining whether a block argument is forwarding a replicated input or a packed input, and which operand it is forwarding.
operand_segment_sizes is also fixed to set packed inputs size correctly in the custom build function.

PiperOrigin-RevId: 320230346
Change-Id: I7971aff5f3dfa37278b607b4f8b4ac738eb7659d
2020-07-08 11:43:03 -07:00
Ran Chen
4a8aa32dbd Run gpu doctest with a fixed set of devices
This is to ensure that the test can run with different physical GPUs, and we can
change our examples to use two GPUs which are more real.

PiperOrigin-RevId: 320229497
Change-Id: I0bc875ab3a54f32ebc6a705c7c350795b341b31f
2020-07-08 11:39:05 -07:00
Advait Jain
eae9ba7557 Make ParseOpData a stub function that returns an error for TFLM.
PiperOrigin-RevId: 320227976
Change-Id: Iaa13812b519eb8926e00b7660f36f69eeae112ef
2020-07-08 11:32:52 -07:00
A. Unique TensorFlower
e0d896af5c Expose Interpreter from InterpreterWrapper.
PiperOrigin-RevId: 320226019
Change-Id: I20a0fec86ccdfab9785e9940ad2845d7261bcf34
2020-07-08 11:24:21 -07:00
Anna R
73166ba1f6 Update TF_AllocateOutput to just call ctx->allocate_output now that TF_Tensor just wraps a Tensor.
PiperOrigin-RevId: 320224601
Change-Id: Ib0d3c3f9cd1e5a74d103dedcc17118e6a7c92817
2020-07-08 11:20:03 -07:00
Ken Franko
21ed77b7b5 Correctly set the experimental_io_device when restoring variable from a checkpoint.
PiperOrigin-RevId: 320222381
Change-Id: I30187c7777ab8056e48004ef5e4ae747edc32227
2020-07-08 11:10:44 -07:00
Lucy Fox
a24f458073 Lower tf.IsNan op to an equivalent computation using tf.Equal op.
PiperOrigin-RevId: 320221675
Change-Id: Ie97659a6b4150cce5af920f42c36c48e8c7b07d7
2020-07-08 11:07:05 -07:00
Alexander Belyaev
fed98ed671 Add mlir_cpu_runner tests infra for CHLO->LHLO->LLVM lowering.
PiperOrigin-RevId: 320218897
Change-Id: I07e22cf1448cbe9ac4fa303fb817d40617ab633c
2020-07-08 11:03:19 -07:00
Lucy Fox
1ca7b3ffda Update whitelist to allowlist in comment.
Noticed an instance of whitelist that didn't get changed (likely missed due to hyphen) so submitting a quick fix.

PiperOrigin-RevId: 320218738
Change-Id: I0ff69dccac31ccd514800e32acf04c2a60caf9ea
2020-07-08 10:56:59 -07:00
Saurabh Saxena
736b8b8b82 Allow computing gradients of If/While in imported graphs.
PiperOrigin-RevId: 320218171
Change-Id: I3f030716123b4e9ce3c2dc53b7c30112dc05a908
2020-07-08 10:53:32 -07:00
A. Unique TensorFlower
b709aa2064 Fix typo in a message.
PiperOrigin-RevId: 320217596
Change-Id: Iba6a9102ba341a87911f96b2fad44db88fc26678
2020-07-08 10:50:15 -07:00
Haoyu Zhang
69ea5a77f9 Adjust error reporting and messages with remote targets.
* When resetting the context (set_server_def), use LOG_AND_RETURN_IF_ERROR;
  * Log (instead of directly return) errors when creating remote contexts fails, to avoid the CHECK failures;
  * Explain when register function on remote workers could fail.

PiperOrigin-RevId: 320213865
Change-Id: Ie6dac323e6265edc9079e22be3453a3b05949943
2020-07-08 10:46:01 -07:00
Mehdi Amini
17939ba172 Rename XlaHloDialect class into MhloDialect following the recent dialect namespace renaming
PiperOrigin-RevId: 320213526
Change-Id: I31a3391837f300a58ea0f1c0991b5ba3573a4a31
2020-07-08 10:41:33 -07:00
Frank Chen
2ebad1d7be Call TfTpu_Initialize() to initialize relevant bits of the TPU framework when loading the TPU library
PiperOrigin-RevId: 320212388
Change-Id: I7a614c34407373af207f98db8f68cc342a176438
2020-07-08 10:37:14 -07:00
Pavithra Vijay
61d0aaf7dd Update v1 only saved_model_experimental_test test with proper reason.
PiperOrigin-RevId: 320212160
Change-Id: Ia72ea7c532d334c24ffb1d528db790245e389bea
2020-07-08 10:33:09 -07:00
Mehdi Amini
ab442b9076 Rename xla_chlo dialect into chlo
Following on the plan of isolating the compiler/mlir/hlo directory.

PiperOrigin-RevId: 320212018
Change-Id: Iffebf0107164ebc1d2af4fab9811681058183fea
2020-07-08 10:28:20 -07:00
Mehdi Amini
d35df6dc46 Rename xla_lhlo dialect into lmhlo
Following on the plan of isolating the compiler/mlir/hlo directory.
Another xla_lhlo dialect will be created under compiler/mlir/xla/ later.

PiperOrigin-RevId: 320210326
Change-Id: I25147bb7687c5efeb0e61f8f9ffef27b022af5b1
2020-07-08 10:21:19 -07:00
Karmel Allison
7eab1f3bfe Replace instances of "whitelist" with "allowlist" where possible. See Google Developer guidelines at https://developers.google.com/style/word-list#blacklist for more information.
PiperOrigin-RevId: 320210110
Change-Id: I480d2b1c80d7d77fdd071b7642011758988f18c0
2020-07-08 10:13:43 -07:00
Kuangyuan Chen
a85beef408 Fix a race condition in attr_builder where the AttrTypeMap for the same op_name
might be created multiple times, causing memory leak.

PiperOrigin-RevId: 320208354
Change-Id: I36b7f077ae6645160198c55d0441d482141aa707
2020-07-08 10:10:00 -07:00
A. Unique TensorFlower
b1cdfe3b9b Add SparseTensor support to assert_type.
PiperOrigin-RevId: 320207860
Change-Id: I869efd91e2f5911e6f3bc184f06685245b70f1f0
2020-07-08 10:05:43 -07:00