This gets rid of any problems arising from TF's direct use of headers (see changes in `tensorflow/{c,core}`) such that all other users can be handled with automated changes.
PiperOrigin-RevId: 713676354
Imported from GitHub PR https://github.com/openxla/xla/pull/21166
Copybara import of the project:
--
b939d5aea471e4b267a806b19102b6d56a7abe0a by Ilia Sergachev <isergachev@nvidia.com>:
[DOC] Fix a link in the documentation.
Merging this change closes#21166
PiperOrigin-RevId: 713589150
`GetFirstTargetDimToMoveShardingTiles` can be used for moving the sharding tiles from a source dimension to a target dimension when the source dimension and target dimension are different and the size of target dimension is divisible by the merged tile size. This util function will be used in the dimensions that need replication in the partitioner.
This cl has no behavior change. We will use this util function to support
1. Concat dimension in concat operations
2. Slice dimensions in dynamic-slice operations
PiperOrigin-RevId: 713588209
There is only one call to `TfLiteDelegateCopyFromBufferHandleInternal`,
which passes in `t` for the `tensor` parameter and `t->delegate` for the `delegate` parameter, so inside this function, `tensor->delegate` and `delegate` are equivalent expressions that evaluate to the same value. But referencing `delegate` rather
than `tensor->delegate` is simpler and more readable here, and makes the nullness check match the dereference on the following line, and is more consistent with the other functions in this file. So this change modifies the code to use `delegate`
rather than `tensor->delegate`.
PiperOrigin-RevId: 713528157
`xla::PjRtLayout` was designed as an abstract class so that it leaves options to represent layouts without depending on `xla::Layout`. In reality, `xla::PjRtXlaLayout` is the only concrete layout representation that will exist in the foreseeable future, and the lack of a proper type-erased layout creation interface forces everyone to use unsafe downcast to access the underlying layout. This causes an unnecessary code bloat without much extensibility because too many downcasts practically prevent new layout representations from being easily introduced.
This CL folds `xla::PjRtXlaLayout` into `xla::PjRtLayout` and make `xla::PjRtLayout` a non-abstract class. Like `xla::Shape` that is used pervasively in PjRt, this CL makes layouts a concrete type based on `xla::Layout`. The benefit is that it simplifies many callers that use PjRt layouts: `xla::GetXlaLayoutUnsafe()` is now replaced with the `pjrt_layout->xla_layout()` accessor, no more `down_cast`/`dynamic_cast` to access `xla::PjRtXlaLayout`, etc.
`xla::ifrt::BasicStringArrayLayout` was the only other implementation of `xla::PjRtLayout` and this is now removed. Since string arrays are supported only in IFRT and not in PjRt, its layout representation should also live only in IFRT. Since no one depends on string array layouts, this CL simply removes its implementation so that we can add a proper one once a proper IFRT layout type is added.
PiperOrigin-RevId: 713516368
1) Restore some key logic lost when landing cl/707770943, in compiled_model.cpp:122
2) Don't abort CompiledModel creation if the runtime fails to apply compiler plugins, rather issue warnings
3) Log the list of compiler plugins that were successfully applied
PiperOrigin-RevId: 713420589