100 Commits
Author SHA1 Message Date
A. Unique TensorFlower 4f8e6d470a Fix BUILD dependencies in xla/python
Add missing and remove unused BUILD dependencies reported by build_cleaner.

PiperOrigin-RevId: 1006361228
2026-10-24 11:11:06 -07:00
A. Unique TensorFlower 14665b7f0b Automated Code Change
PiperOrigin-RevId: 1006165887
2026-10-24 01:25:34 -07:00
A. Unique TensorFlower f50c5d9d9f Automated Code Change
PiperOrigin-RevId: 1006106680
2026-10-23 22:52:06 -07:00
A. Unique TensorFlower 771b9f4749 Reverts f9652238f1
PiperOrigin-RevId: 1006088932
2026-10-23 22:00:00 -07:00
A. Unique TensorFlower 0dd39ad1d8 Avoid copying batched outputs when unbatching in BatchResourceBase.
For batched functions with many large outputs, unbatching dominates the host CPU time and LLC misses of `BatchResourceBase`. `BatchResourceBase::SplitOutputTensors` calls `tensor::Split`, which allocates a new buffer for every request's outputs and copies that request's rows into it, even when the rows could be handed out as aligned views of the batched output.

Return zero-copy `Tensor::Slice` views of the batched output when every task's rows start at an aligned address (`Tensor::IsAligned()`) and the batch has no more padding rows than task rows. Each view holds a reference to the whole batched output, which is freed only after every request has released its view. So a request that holds on to its outputs keeps the entire batch's outputs and padding allocated, not only its own rows, and `Tensor::AllocatedBytes()` on those outputs reports the size of the whole batched buffer. The padding limit keeps that buffer at most twice the size of the task rows. Otherwise, fall back to `tensor::Split`, which keeps the previous copying behavior and dtype coverage (for example, quantized outputs), but copy only the task rows; the padding rows were previously copied and then discarded.

In `bs=2` microbenchmarks on a 64-vCPU AMD Milan host (`intra_op_parallelism_threads = 16`, process CPU time, median of 9 runs), splitting a 12.23 MB/request output tensor drops from 1,397 µs to 38 µs of CPU per batch, about the cost of the batch round trip itself, and end-to-end host batch/unbatch overhead across 20 inputs and 62 outputs drops from 2.79 ms to 0.22 ms of CPU (13x).

PiperOrigin-RevId: 1005968722
2026-10-23 17:26:26 -07:00
A. Unique TensorFlower 6cad13066f Update tsl::proto_testing::Partially to use MessageDifferencer::PARTIAL.
Replaces the custom PartialIgnore criteria in tsl::proto_testing with MessageDifferencer::PARTIAL scope, correctly ignoring extra map entries as well as extra elements in repeated fields when combined with IgnoringRepeatedFieldOrdering.

PiperOrigin-RevId: 1005963876
2026-10-23 17:21:35 -07:00
A. Unique TensorFlower 6a9d0d8c2a Add estimated FLOPs and bytes accessed stat types to the XPlane schema.
PiperOrigin-RevId: 1005907357
2026-10-23 15:30:29 -07:00
TensorFlower Gardener ad744fae24 Merge pull request #129224 from AshiteshSingh:feat/auto-strategy
PiperOrigin-RevId: 1005852445
2026-10-23 14:23:34 -07:00
TensorFlower Gardener 942f7982dd Merge pull request #129344 from madib06ops:unbatch-rebatch-restore-validation
PiperOrigin-RevId: 1005848844
2026-10-23 14:18:47 -07:00
A. Unique TensorFlower 62f098ef90 Accept C99 complex exp results for an infinite real part in complex_unary_op_test.
llvm/llvm-project#232791 changed MLIR's ComplexToStandard lowering of
complex.exp, which the XLA CPU and GPU backends use, to return the C99 Annex G
values when the real part is infinite and the imaginary part is not finite:
exp(-inf + I*y) = 0 + 0*I and exp(+inf + I*y) = inf + NaN*I. Before, it
returned NaN + NaN*I, which is what complex_unary_op_samples.h expects.

ExpTest now skips those samples, and a new ExpInfRealNonFiniteImag test checks
these inputs (including y = NaN) and accepts either the old NaN + NaN*I result
or the C99 value. The test then passes with both old and new LLVM.

PiperOrigin-RevId: 1005838599
2026-10-23 14:09:30 -07:00
A. Unique TensorFlower ee4624e4de Speed up single-threaded GetMatchingPaths and FileSystem::IsDirectory.
In `GetMatchingPaths`, each `parent` directory in the queue has already been matched at previous levels, so we only need to match each `child` entry against the current segment's basename (`base_pattern`) rather than joining `parent` and `child` and re-matching the full path prefix. This avoids both re-evaluating earlier path components in `Match` and allocating joined path strings for non-matching entries.

Additionally, skip `GetChildren` when `base_pattern` contains no glob characters, avoid redundant `FileExists` calls on entries returned by `GetChildren`, reuse the `children` vector across iterations, and remove the redundant `FileExists` check before `Stat` in `FileSystem::IsDirectory`.

PiperOrigin-RevId: 1005739160
2026-10-23 11:30:02 -07:00
TensorFlower Gardener 53a05c426e Merge pull request #129000 from kokol16:fix/space-to-depth
PiperOrigin-RevId: 1005574314
2026-10-23 10:12:15 -07:00
A. Unique TensorFlower a2888c7380 Close @link commands inside <ul> blocks in TFLite NeuralNetworksTypes.h.
Upstream LLVM PR https://github.com/llvm/llvm-project/pull/221605 (commit https://github.com/llvm/llvm-project/commit/6cd72b33224f0c3002b41e0e356eb2ab94ab3545) enabled AST documentation comment retention and checking whenever any subgroup of -Wdocumentation (including -Wdocumentation-html) is active.

In third_party/tensorflow/lite/nnapi/NeuralNetworksTypes.h, three doc comments use Javadoc-style {@link ...} inside <ul>...</ul> blocks. Because Clang's comment lexer registers @link as a VerbatimBlockCommand ending at @/link, an unclosed @link consumes the closing </ul> tag until the end of the comment, failing the build with:
error: HTML tag 'ul' requires an end tag [-Werror,-Wdocumentation-html]

Add explicit @/link closing delimiters to {@link ... @/link} inside the three <ul>...</ul> blocks.

PiperOrigin-RevId: 1005563736
2026-10-23 10:06:55 -07:00
A. Unique TensorFlower 8ab6091905 Automated Code Change
PiperOrigin-RevId: 1005482730
2026-10-23 06:16:36 -07:00
A. Unique TensorFlower dc0157f2f9 Automated Code Change
PiperOrigin-RevId: 1005439639
2026-10-23 05:25:43 -07:00
TensorFlower Gardener a867034f72 Merge pull request #129296 from twelfthlabor:fix/boolean-mask-negative-axis
PiperOrigin-RevId: 1005414704
2026-10-23 05:11:48 -07:00
TensorFlower Gardener a67343d392 Merge pull request #129241 from bodapatisaikrishna:fix-tnp-numpy-compat
PiperOrigin-RevId: 1005403176
2026-10-23 04:56:30 -07:00
TensorFlower Gardener c21156af11 Merge pull request #129310 from MaddipatlaChetan24:patch-77
PiperOrigin-RevId: 1005390987
2026-10-23 04:44:57 -07:00
TensorFlower Gardener 7859b75d6b Merge pull request #129307 from MaddipatlaChetan24:patch-74
PiperOrigin-RevId: 1005390617
2026-10-23 04:39:24 -07:00
TensorFlower Gardener 6206e40818 Merge pull request #129243 from bodapatisaikrishna:fix-eager-scalar-cache-signed-zero
PiperOrigin-RevId: 1005388816
2026-10-23 04:26:57 -07:00
TensorFlower Gardener c78a4fcb1d Merge pull request #128296 from vishwakt:fix-conv-zero-size-output-shape
PiperOrigin-RevId: 1005387882
2026-10-23 04:21:17 -07:00
TensorFlower Gardener df2cf0ebfc Merge pull request #128993 from vishwakt:fix-xla-matrix-diag-dynamic
PiperOrigin-RevId: 1005387800
2026-10-23 04:09:32 -07:00
TensorFlower Gardener e6f770ac7e Merge pull request #129174 from MaddipatlaChetan24:patch-70
PiperOrigin-RevId: 1005387779
2026-10-23 04:04:21 -07:00
TensorFlower Gardener ee9f594057 Merge pull request #129354 from vishwakt:fix-tensorlist-scatter-existing-holes
PiperOrigin-RevId: 1005387206
2026-10-23 03:50:30 -07:00
TensorFlower Gardener 8d1b192d05 Merge pull request #126158 from vishwakt:fix-slice-begin-size-overflow
PiperOrigin-RevId: 1005385415
2026-10-23 03:47:00 -07:00
TensorFlower Gardener eeea5cc9d2 Merge pull request #129186 from bodapatisaikrishna:fix/62982-loopcond-empty-frame
PiperOrigin-RevId: 1005382776
2026-10-23 03:34:12 -07:00
TensorFlower Gardener 2c5f80eb55 Merge pull request #129055 from hasrat17:fix/ctc-loss-validate-label-class-ids
PiperOrigin-RevId: 1005376867
2026-10-23 03:28:43 -07:00
TensorFlower Gardener 928526debe Merge pull request #129308 from MaddipatlaChetan24:patch-75
PiperOrigin-RevId: 1005375794
2026-10-23 03:17:56 -07:00
TensorFlower Gardener 18f9d25f2a Merge pull request #128815 from twelfthlabor:fix/norm-empty-input
PiperOrigin-RevId: 1005373866
2026-10-23 03:13:01 -07:00
TensorFlower Gardener 18d001ad4c Merge pull request #128807 from twelfthlabor:fix/k8s-cluster-spec-in-cluster-config
PiperOrigin-RevId: 1005373627
2026-10-23 03:02:43 -07:00
TensorFlower Gardener 43b52a9899 Merge pull request #129367 from tensorflow:dependabot/pip/certifi-2026.10.19
PiperOrigin-RevId: 1005373222
2026-10-23 02:59:25 -07:00
TensorFlower Gardener d47e60e821 Merge pull request #129322 from vishwakt:fix-xla-binary-dynamic-size-bound
PiperOrigin-RevId: 1005372932
2026-10-23 02:49:26 -07:00
TensorFlower Gardener 3d9e5ac53d Merge pull request #129398 from MaddipatlaChetan24:patch-79
PiperOrigin-RevId: 1005365746
2026-10-23 02:45:26 -07:00
TensorFlower Gardener c3b26b6ae1 Merge pull request #129336 from vishwakt:fix-eager-bfloat16-python-float-subnormal
PiperOrigin-RevId: 1005365182
2026-10-23 02:35:11 -07:00
TensorFlower Gardener c3a1b74d0c Merge pull request #129414 from Nishuuzz:hunt-2026-10-21
PiperOrigin-RevId: 1005364077
2026-10-23 02:31:10 -07:00
TensorFlower Gardener 9313d0f4f7 Merge pull request #129417 from vishwakt:fix-debug-events-writer-reinit
PiperOrigin-RevId: 1005360689
2026-10-23 02:20:58 -07:00
TensorFlower Gardener 340245e410 Merge pull request #129433 from Phoebus-Liu:fix/issue-121912-expm-16bit
PiperOrigin-RevId: 1005360375
2026-10-23 02:15:42 -07:00
A. Unique TensorFlower a300b9867e Automated Code Change
PiperOrigin-RevId: 1005335415
2026-10-23 02:01:59 -07:00
A. Unique TensorFlower e21992863c Lower non-integer-scale TPU ResizeNearestNeighbor to separable 1D gathers.
For non-integer scale factors (e.g. 688x1520 -> 459x1013), the legacy
ResizeNearest XLA custom call is slow on TPU v6e (~152 ms -> ~0.2 ms per image,
~750x speedup) while separable 1D gathers (`xla::TorchIndexSelect`) preserve
bit-exact numerics against the CPU reference.

The gather lowering applies when H and W are static, positive, within 32-bit
index bounds, not both `align_corners` and `half_pixel_centers`, and at least
one spatial axis has a non-integer scale ratio. Integer ratios, dynamic spatial
dims, 1x1 inputs, identity resizes, and gradients keep their existing paths.

PiperOrigin-RevId: 1005216345
2026-10-23 01:47:31 -07:00
A. Unique TensorFlower 304cbf7870 Release GIL during append calls, similar to the other calls. Otherwise, one might encounter performance issues.
PiperOrigin-RevId: 1005039469
2026-10-23 01:19:20 -07:00
TensorFlower Gardener b360f5cae0 Merge pull request #128594 from boriskozak:tensorflow-128588-fix
PiperOrigin-RevId: 1005036441
2026-10-23 01:09:10 -07:00
A. Unique TensorFlower 17a0aa81b0 Fix signed integer overflow in SplitV shape inference function to unblock TF ASAN TAP job.
PiperOrigin-RevId: 1005032727
2026-10-23 01:06:02 -07:00
A. Unique TensorFlower 8a3ca8dd17 Add ClearMultiPassTracerRegisterForTest helper for multi-pass profiler tests.
Tests that register `SimpleMultiPassTracer` via `RegisterSimpleMultiPassTracerForTest` previously lacked a way to clear the global TSL multi-pass profiler factory registry during test teardown, causing duplicate tracer registration across multiple test cases in the same test binary.

Add `ClearMultiPassTracerRegisterForTest` in `xla/tools/multihost_hlo_runner/simple_multipass_tracer_for_test` to forward to `tsl::profiler::ClearRegisteredMultiPassProfilersForTest`, verified by multi-pass profiler lifecycle unit tests.

PiperOrigin-RevId: 1004995739
2026-10-22 22:11:06 -07:00
A. Unique TensorFlower 10026f2fec [XLA:CPU][oneDNN] Fix data race in OneDnnThreadPool::parallel_for()
Fixes data race in oneDnnThreadPool::parallel_for() for both sync and async cases, when we're running in multi-threaded mode. The issue was caused by the fact, that oneDnnThreadPool::get_in_parallel() was always returning false. Because of that, when some oneDNN kernels started inner parallel_for(), those functions were unable to see that they were running inside of a thread already. This caused them to overwrite done_event_ from outer parallel_for().

The fix implements needed checks to satisfy oneDNN contract, which is stated in `src/common/dnnl_thread.hpp`:
Since oneDNN does not allow nested parallelism, inside a parallel region the number of available threads is 1.

PiperOrigin-RevId: 1004992090
2026-10-22 22:05:39 -07:00
A. Unique TensorFlower 1cd100073a Integrate LLVM at llvm/llvm-project@d5efcd0ec4
Updates LLVM usage to match
[d5efcd0ec41d](https://github.com/llvm/llvm-project/commit/d5efcd0ec41d0f425076e3dd738a68d333ad610f)

PiperOrigin-RevId: 1004891790
2026-10-22 17:48:36 -07:00
TensorFlower Gardener d855368598 Merge pull request #115498 from RadikHoroshev:fix/cwe770-gif-jpeg-oom-bounds-check
PiperOrigin-RevId: 1004874756
2026-10-22 17:40:31 -07:00
A. Unique TensorFlower d53de9c465 Automated Code Change
PiperOrigin-RevId: 1004695089
2026-10-22 15:16:29 -07:00
A. Unique TensorFlower 3c0f0612b5 Automated Code Change
PiperOrigin-RevId: 1004636730
2026-10-22 12:19:09 -07:00
A. Unique TensorFlower 92e12e8bd3 Add rvalue vector and absl::flat_hash_map overloads to RequestCost::RecordStructuredCosts and RequestCost::RecordStructuredMetrics to avoid copying StructuredCost maps and StructuredMetric vectors.
PiperOrigin-RevId: 1004603561
2026-10-22 10:27:44 -07:00
A. Unique TensorFlower f8eb5b24e8 Automated Code Change
PiperOrigin-RevId: 1004593399
2026-10-22 09:41:05 -07:00
A. Unique TensorFlower 0048fd5e5a Preserve stack_frame_index when embedding computations in XlaBuilder.
`XlaBuilder::AddSubComputation` copied the embedded computation's
`HloComputationProto`s but dropped its `stack_frame_index`, leaving the
instructions' `stack_frame_id`s dangling. `HloModule::CanonicalizeStackFrameIds`
then reset them to 0, so source locations were lost for any computation built
via `ConvertMlirHloToHlo` and then embedded through `xla::Call`.

`XlaBuilder` now keeps a `StackFrames` table for imported computations:

-   `AddSubComputation` re-interns each imported frame (and its parent chain)
    into it, so identical frames are stored once, and rewrites the imported
    instructions' ids accordingly.
-   `BuildSubComputation` re-interns a child builder's table into its parent, only for entries that were imported with a stack frame index.
-   `Build()` / `BuildConstantSubGraph()` emit it as the module's
    `stack_frame_index`.
-   Ids set directly via `SetOpMetadata` (i.e. on the builder's own
    instructions, or on imported computations that carry no table) refer to a
    caller-owned table and are left untouched.

PiperOrigin-RevId: 1004589040
2026-10-22 09:28:27 -07:00
TensorFlower Gardener 1adcb90a05 Merge pull request #127922 from Deeven-Seru:optimize-concat-fastpath
PiperOrigin-RevId: 1004582530
2026-10-22 09:03:03 -07:00
A. Unique TensorFlower 57889aaedc Automated Code Change
PiperOrigin-RevId: 1004523690
2026-10-22 07:27:53 -07:00
A. Unique TensorFlower 048b2af29e Automated Code Change
PiperOrigin-RevId: 1004520493
2026-10-22 06:55:16 -07:00
A. Unique TensorFlower 71c5e3555e Automated Code Change
PiperOrigin-RevId: 1004507754
2026-10-22 06:42:22 -07:00
A. Unique TensorFlower 6c389546b3 Automated Code Change
PiperOrigin-RevId: 1004461259
2026-10-22 05:35:22 -07:00
A. Unique TensorFlower d97d633b8b Automated Code Change
PiperOrigin-RevId: 1004433586
2026-10-22 04:44:21 -07:00
A. Unique TensorFlower 93de14c237 Ensure GpuSolver::CheckLapackInfoAndDeleteSolverAsync, DeterminantOpGpu, and CholeskyOpGpu invoke DoneCallback and propagate errors on all error paths.
1. In `GpuSolver::CheckLapackInfoAndDeleteSolverAsync` (`cuda_solvers.cc` and `rocm_solvers.cc`), if `dev_lapack_info.CopyToHost(&success)` fails, drain the GPU stream via `BlockHostUntilDone()` (so any previously enqueued async D2H memcpy into `host_lapack_infos` completes before `host_lapack_infos` is destroyed), destroy `solver`, and invoke `info_checker_callback(status, host_lapack_infos)` instead of returning early via synchronous `OP_REQUIRES` (which skipped `info_checker_callback` and the caller `AsyncOpKernel::DoneCallback`). Also destroy `solver` before invoking `info_checker_callback` on the `dev_lapack_infos.empty()` early return path.
2. In `DeterminantOpGpu::ComputeAsync`, `LogDeterminantOpGpu::ComputeAsync` (`determinant_op.cc`), and `CholeskyOpGpu::ComputeAsync` (`cholesky_op_gpu.cu.cc`), propagate non-`InvalidArgument` errors (such as `InternalError` from `CopyToHost` failure) to `context` via `OP_REQUIRES_OK_ASYNC(context, status, done)` in `info_checker`.
3. Add unit tests in `determinant_op_gpu_test.cc` verifying `CheckLapackInfoAndDeleteSolverAsync` (including partial `CopyToHost` failure across multiple `DeviceLapackInfo` entries), `MatrixDeterminant`, `LogMatrixDeterminant`, and `Cholesky` on GPU when `CopyToHost` fails.

PiperOrigin-RevId: 1004418238
2026-10-22 03:30:19 -07:00
A. Unique TensorFlower f6d9d3f21b [XLA] Keep frontend attributes on their owners in ConvertMover
When `ConvertMover` moves a `kConvert` across a commuting operation, preserve the original `kConvert` frontend attributes on the new `kConvert` instructions and keep the commuting operation's attributes on the cloned instruction instead of copying the outer instruction's attributes onto the replacement root.

PiperOrigin-RevId: 1004414597
2026-10-22 03:24:47 -07:00
A. Unique TensorFlower 4188eaa2b6 Add per-trainer metrics in CrossTrainerCache.
Add six monitoring metrics under `/tensorflow/data/service/cross_trainer_cache/`:
- `trainer_queries`: Counter of cache hits and misses per `trainer_id` and `source` (`"cache"`, `"cache_waited"`, or `"prefetch"`).
- `blocked_wait_usecs`: Counter of microseconds spent waiting for another thread to extend the cache per `trainer_id`.
- `elements_skipped`: Counter of elements skipped due to eviction per `trainer_id`.
- `cursor_offset`: Distribution of each trainer's element offset from the eviction edge (`cache_start_index_`).
- `size_bytes`: Gauge tracking total cached byte size across active `CrossTrainerCache` instances.
- `max_size_bytes`: Gauge recording the configured maximum cache size in bytes.

PiperOrigin-RevId: 1004358006
2026-10-22 02:04:42 -07:00
TensorFlower Gardener 3f385c823d Merge pull request #129183 from MaddipatlaChetan24:patch-72
PiperOrigin-RevId: 1004288413
2026-10-22 00:44:58 -07:00
A. Unique TensorFlower 3d291ea36e [XLA] Box and color SparseCore offloads in the HLO dump graph
PiperOrigin-RevId: 1004247682
2026-10-21 23:27:58 -07:00
A. Unique TensorFlower 0914014d3f #HloDiff Compare moved instruction pairs in the comparison tool.
HLO diff can report matched instructions that are unchanged themselves but used
differently (e.g. swapped operands) as moved instead of unchanged. The
comparison manager and the original tensor summary comparator only mapped
unchanged and changed pairs, so the tensors of moved instructions would no
longer be compared. Map moved pairs too, and count them as unchanged in the
creation metrics.

PiperOrigin-RevId: 1004193597
2026-10-21 22:46:35 -07:00
A. Unique TensorFlower 72e90de7db Constant-fold FLOOR_DIV.
tfl.floor_div had no folder, so a FLOOR_DIV on constant operands survived
conversion as a runtime op. GPU delegates that reject FLOOR_DIV then see a
CPU-only op in the middle of an otherwise delegable graph.

The fold matches the TFLite kernel: f32 operands are divided and floored in
double, and integer division rounds toward negative infinity. Division by
zero (for any element type) is left to the runtime, which reports it as an
error.

HF DETR models hit this in the sine position embedding (dim_t // 2 on a
constant arange); it is their only FLOOR_DIV.

Tests: const-fold.mlir adds f32 (with broadcast, and a 1.0 // 0.1 case that
needs the double division) and i32 (all sign combinations) folds, plus
divide-by-zero (i32 and f32) and runtime-operand negatives.
PiperOrigin-RevId: 1004127675
2026-10-21 22:04:46 -07:00
A. Unique TensorFlower 911eb8c25f Integrate LLVM at llvm/llvm-project@634f85fc75
Updates LLVM usage to match
[634f85fc756b](https://github.com/llvm/llvm-project/commit/634f85fc756b6a6a93800831dcb65f3bf6f93086)

PiperOrigin-RevId: 1004081686
2026-10-21 20:51:56 -07:00
A. Unique TensorFlower 73f26b77ac Fix BUILD dependencies in xla/tools
Add missing and remove unused BUILD dependencies reported by build_cleaner.

PiperOrigin-RevId: 1004069236
2026-10-21 20:47:44 -07:00
A. Unique TensorFlower 3c2ca6412d Ensure TPUPartitionedCallOp::ComputeAsync invokes DoneCallback on all error paths.
1. Use `gtl::MakeCleanup` in `TPUPartitionedCallOp::ComputeAsync` so `DoneCallback` (and `DequeueFromCoreSelector` if a core was selected) is always invoked even when an early error return occurs before async execution begins.
2. Store `init_status_` as a member variable of `TPUPartitionedCallOp` so initialization errors inside `absl::call_once` (`once_` and `ordinal_selector_once_`) are preserved across subsequent `ComputeAsync` calls.
3. In `InstantiateFunctionsFromSubgraphs`, populate `partition_cache_[cache_hash]` only after all subgraphs have been rewritten and instantiated without error, avoiding a partial/empty cache entry on failure.

PiperOrigin-RevId: 1004036684
2026-10-21 20:29:16 -07:00
TensorFlower Gardener f168c48322 Merge pull request #129242 from bodapatisaikrishna:fix-signal-kaiser-windows
PiperOrigin-RevId: 1004014447
2026-10-21 19:35:41 -07:00
A. Unique TensorFlower aa586100be Fix BUILD dependencies in xla/hlo
Add missing and remove unused BUILD dependencies reported by build_cleaner.

PiperOrigin-RevId: 1004007958
2026-10-21 19:09:36 -07:00
A. Unique TensorFlower 6ec19dfe25 Automated Code Change
PiperOrigin-RevId: 1003960972
2026-10-21 17:01:31 -07:00
A. Unique TensorFlower 3033f2ecd7 Reverts 8ed7b6c4d7
PiperOrigin-RevId: 1003949406
2026-10-21 16:28:07 -07:00
A. Unique TensorFlower 93ba4a135b Constant-fold BATCH_MATMUL with constant f32 operands.
`BatchMatMulOp` had no folder, so a matmul of two constants survived into the
flatbuffer and was recomputed on every inference. Add `BatchMatMulOp::fold`
for f32 operands with static shapes, honoring `adj_x` / `adj_y` and
right-aligned batch broadcasting, subject to the usual `ShouldFoldOperation`
size limit.

PiperOrigin-RevId: 1003936085
2026-10-21 15:47:37 -07:00
A. Unique TensorFlower 556ba62e9c Automated Code Change
PiperOrigin-RevId: 1003892529
2026-10-21 14:16:43 -07:00
A. Unique TensorFlower 995728c7aa Automated Code Change
PiperOrigin-RevId: 1003889202
2026-10-21 13:49:09 -07:00
A. Unique TensorFlower b13e7f1c66 [XLA:GPU] Defer CUDA VMM memory deallocations while a cuDNN handle is active.
cuDNN v9 internally captures temporary CUDA graphs during heuristic queries and execution plan creation (e.g. via `cudnn::backend::cudnnBackendGetMetadataFromGraph` inside `cudnnBackendFinalize`), which does not go through `CudaStream::CaptureHandle`.

During parallel autotuning (`ConfigAssigner::GetConfigsForAll`), a worker thread running `GpuProfiler::Profile` can deallocate VMM buffers via `CudaDeviceMemoryAllocation::~CudaDeviceMemoryAllocation` -> `DrainPendingVmmDeallocations` -> `cuCtxSynchronize()` concurrently with the main thread querying cuDNN heuristics in `CudnnSupport::GetConvolveRunners`. Calling `cuCtxSynchronize()` while cuDNN is capturing a CUDA graph on the same CUDA context either fails with `CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED` / `cudaErrorStreamCaptureInvalidated` or segfaults inside `libcuda.so` (`cuCtxSynchronize`).

Call `CudaDeviceAllocator::EnterStreamCapture` and `CudaDeviceAllocator::ExitStreamCapture` in `CudnnHandle` (`xla/stream_executor/cuda/cuda_dnn.cc`) so that VMM deallocations are deferred until the active cuDNN operation completes.

PiperOrigin-RevId: 1003883162
2026-10-21 13:44:45 -07:00
A. Unique TensorFlower eba2cc07ef Automated Code Change
PiperOrigin-RevId: 1003875329
2026-10-21 12:52:03 -07:00
A. Unique TensorFlower 640040d2fc Automated Code Change
PiperOrigin-RevId: 1003868652
2026-10-21 12:23:01 -07:00
A. Unique TensorFlower 8ed7b6c4d7 DEFAULT in AssignBuffersWithSequentialOrdering now uses SPATIAL instead of BEST_OF_SPATIAL_TEMPORAL, so the heap simulation runs once instead of twice.
BEST_OF_SPATIAL_TEMPORAL can still be requested explicitly.

PiperOrigin-RevId: 1003841595
2026-10-21 11:49:06 -07:00
A. Unique TensorFlower a42498789d Automated Code Change
PiperOrigin-RevId: 1003798720
2026-10-21 09:49:07 -07:00
A. Unique TensorFlower 16c60c964e Automated Code Change
PiperOrigin-RevId: 1003785520
2026-10-21 09:09:08 -07:00
A. Unique TensorFlower 061fc6bf25 Automated Code Change
PiperOrigin-RevId: 1003751863
2026-10-21 07:10:06 -07:00
A. Unique TensorFlower 9c0e242c78 Fix BUILD dependencies in xla/backends
Add missing and remove unused BUILD dependencies reported by build_cleaner.

PiperOrigin-RevId: 1003724229
2026-10-21 06:08:39 -07:00
A. Unique TensorFlower 5901d5d4a9 Automated Code Change
PiperOrigin-RevId: 1003713941
2026-10-21 05:46:21 -07:00
TensorFlower Gardener 911d8a893d Merge pull request #129180 from destro4evr-rgb:fix/ctc-loss-gpu-oob-batch-index
PiperOrigin-RevId: 1003702391
2026-10-21 05:31:15 -07:00
TensorFlower Gardener 69f5f004e2 Merge pull request #128741 from destro4evr-rgb:fix/kmeans-plusplus-oob-read
PiperOrigin-RevId: 1003694965
2026-10-21 04:14:01 -07:00
A. Unique TensorFlower 3d61158117 Automated Code Change
PiperOrigin-RevId: 1003683479
2026-10-21 03:33:17 -07:00
A. Unique TensorFlower 19a90c5a6e Automated Code Change
PiperOrigin-RevId: 1003672773
2026-10-21 02:57:04 -07:00
A. Unique TensorFlower 7de5832338 Automated Code Change
PiperOrigin-RevId: 1003647520
2026-10-21 02:47:29 -07:00
A. Unique TensorFlower c28d1fde54 Automated Code Change
PiperOrigin-RevId: 1003612014
2026-10-21 01:37:07 -07:00
A. Unique TensorFlower 8e5806467f Fix BUILD dependencies in xla/mlir
Add missing and remove unused BUILD dependencies reported by build_cleaner.

PiperOrigin-RevId: 1003597755
2026-10-21 01:32:39 -07:00
A. Unique TensorFlower 6d46c1caea Automated Code Change
PiperOrigin-RevId: 1003586486
2026-10-21 00:56:31 -07:00
A. Unique TensorFlower f3e73cd327 Fix BUILD dependencies in xla/pjrt
Add missing and remove unused BUILD dependencies reported by build_cleaner.

PiperOrigin-RevId: 1003531199
2026-10-21 00:12:54 -07:00
A. Unique TensorFlower 8340443d45 Fix ALU throughput and latency calculations in Pallas microbenchmark cost model.
PiperOrigin-RevId: 1003492832
2026-10-20 23:21:14 -07:00
TensorFlower Gardener a60772e202 Merge pull request #126681 from kokol16:fix/tridiagonal
PiperOrigin-RevId: 1003418172
2026-10-20 20:34:32 -07:00
A. Unique TensorFlower 16ef5a55d7 Automated Code Change
PiperOrigin-RevId: 1003403354
2026-10-20 19:23:44 -07:00
A. Unique TensorFlower ae24fecc36 [XLA] Remove redundant inner vector builtins guard in trig.h.
PiperOrigin-RevId: 1003280819
2026-10-20 17:58:32 -07:00
A. Unique TensorFlower e1670b9676 Add SubchannelCostModel and extend PlatformInfo with XLU timing support
Introduces SubchannelCostModel to model subchannel quantization workloads and extends PlatformInfo to track cross lane unit timing capabilities.

PiperOrigin-RevId: 1003267036
2026-10-20 17:55:16 -07:00
TensorFlower Gardener b34080bc18 Merge pull request #112689 from chinese0cabbage:master
PiperOrigin-RevId: 1003229673
2026-10-20 17:17:05 -07:00
A. Unique TensorFlower c2b62c5c1e Integrate LLVM at llvm/llvm-project@f9cea2f24b
Updates LLVM usage to match
[f9cea2f24b67](https://github.com/llvm/llvm-project/commit/f9cea2f24b6713cc344a875e674d45728c19d24e)

PiperOrigin-RevId: 1003204504
2026-10-20 16:44:03 -07:00
A. Unique TensorFlower 2e9c44cc8b Optionally functionalize v1 control flow in XlaCompiler::CompileGraph
With TF_XLA_FUNCTIONALIZE_CONTROL_FLOW=1, run FunctionalizeControlFlow before
ValidateGraph so graphs with v1 control flow (e.g. Enter) compile instead of
failing validation. Off by default.

PiperOrigin-RevId: 1003176296
2026-10-20 16:03:22 -07:00