Reshard from tile [2,2,1] to [1,2,2] can be done by a subgroup all-to-all between dimensions 0 and 2.
PiperOrigin-RevId: 320726161
Change-Id: Ied51f29d67c2f29f6a5aaf03fc07c44ddaecb809
Reshard from tile [2,2,1] to [1,2,2] can be done by a subgroup all-to-all between dimensions 0 and 2.
PiperOrigin-RevId: 320720720
Change-Id: I1b63ba731b830610596c77697c5577fa9e2e0f79
The one behavior fix is for metrics: In head, when calling a metric on a symbolic keras input the current metric value is eagerly returned and no update is applied. W/ kerastensors before this cl a messy stack trace was raised. This cl fixes KerasTensors so they act in the same way as symbolic inputs in head: return the current metric value w/o applying any updates.
In the future we may want to revisit this & make the behavior of metrics more consistent w/ standard keras layers: If a metric sees a symbolic input, return a symbolic output that represents the value of the metric. If a functional model is built from those symbolic inputs/outputs, the metric will be included as a layer that applies the update & returns the metric result at the point when it's run.
PiperOrigin-RevId: 320714741
Change-Id: Ie535d8b8dcb35e65ced20d28a0e1b6d59c4c9b83
Remove a few unit test, since it is harder to write unit tests using the new SelectDevice method. However, device_placement_test should provide better coverage than the unit test.
PiperOrigin-RevId: 320704318
Change-Id: I9bee9b508d4eba714f68b8c7464d818091224fdc
1) Previously, SparseMatMul legalization didn't work correctly for operands with different
element types which is fixed now.
2) Forbidden element types are now correctly checked.
3) Added more unit tests for SparseMatMul legalization.
PiperOrigin-RevId: 320696400
Change-Id: I7376b2cf06027ab6153da0831e2f7d39498ee210
When I imported #41235 I followed the linter warnings for Linux but this inadvertendly broke Windows
```
tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache_test.cc(230): error C3493: 'file_size' cannot be implicitly captured because no default capture mode has been specified
tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache_test.cc(237): error C2664: 'tf_gcs_filesystem::RamFileBlockCache::RamFileBlockCache(const tf_gcs_filesystem::RamFileBlockCache &)': cannot convert argument 4 from 'int' to 'tf_gcs_filesystem::RamFileBlockCache::BlockFetcher'
tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache_test.cc(238): note: No constructor could take the source type, or constructor overload resolution was ambiguous
.\tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache.h(52): note: see declaration of 'tf_gcs_filesystem::RamFileBlockCache::RamFileBlockCache'
tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache_test.cc(532): error C3493: 'block_size' cannot be implicitly captured because no default capture mode has been specified
tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache_test.cc(568): error C3493: 'block_size' cannot be implicitly captured because no default capture mode has been specified
```
PiperOrigin-RevId: 320695991
Change-Id: Ib2cd1c9ed37c92702e8341c0309819373bae7445
* Change op runtime error string to match with graph construction.
* Remove session scopes
* Fix invalid argument tests to be eager friendly by constructing and
evaluating in the same line.
PiperOrigin-RevId: 320693166
Change-Id: I42ee0c4a4e141074863a366aef55f9960f0ea806
This CL consists of two steps:
* First, refactor all Thunks to take an ThunkInfo instead of const HloInstruction*. This will benefit future extensions to ThunkInfo as we move away from HloInstruction*.
* Secondly, change the data pipeline from:
Emitter -> Thunk* -> hlo_instruction() -> profiler(HloInstruction*)
to:
Emitter -> Thunk with profile indices
The profile doesn't really depend on HloInstruction*, but just its pointer
identity. Removing the dependency on HloInstruction helps with MLIR migration.
PiperOrigin-RevId: 320687291
Change-Id: I7027d4c032f73ed615e5b520e01f3740781735be
`gradients.h` has the public headers.
`gradients_internals.h` has some helpers for testing, while we figure out how to hook this into the AbstractOperation itself.
PiperOrigin-RevId: 320682374
Change-Id: I53e1c76f3c0897ff66f2563501806c425de69f24
Imported from GitHub PR https://github.com/tensorflow/tensorflow/pull/40962
This PR mainly changes tensorflow::bfloat16 to Eigen::bfloat16 to get benefit from its vectorization
Copybara import of the project:
--
3451f21c1e by ShengYang1 <yang.sheng@intel.com>:
Replace tensorflow::bfloat16 with Eigen::bfloat16
PiperOrigin-RevId: 320674736
Change-Id: If4a1347142260f784a75d0bcec95cf8a42698a8d
Otherwise dynamic dimension inference won't have the latest view of the graph.
PiperOrigin-RevId: 320667881
Change-Id: I75f8e993904385fc516f046c96343fe54419e27f
for TensorFlow V1 even when the user overrides Session's default ConfigProto.
In TensorFlow V1, when the user doesn't override Session's default ConfigProto, the ConfigProto
uses the value from TF_XLA_FLAGS (via context.config). However, when the user passes in their
own ConfigProto, enable_mlir_bridge is defaulted to false.
PiperOrigin-RevId: 320661288
Change-Id: I5deacb4e12b6551a57c2496c35830ac3af25fe28
- Eliminate custom checks for checking no region arguments in IfRegion
verification.
- update expected error messages in IfRegion unit tests.
PiperOrigin-RevId: 320643657
Change-Id: I982ea71cf3bffe9811773724d75a79bb98cd35b7