Skip to content

[pull] master from tensorflow:master - #8798

Merged
pull[bot] merged 15 commits into
Cache-Cloud:masterfrom
tensorflow:master
Sep 1, 2026
Merged

[pull] master from tensorflow:master#8798
pull[bot] merged 15 commits into
Cache-Cloud:masterfrom
tensorflow:master

Conversation

@pull

@pull pull Bot commented Sep 1, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

subhankarshah and others added 15 commits September 1, 2026 00:22
…ne buffer's position belongs to a computation that does not have a linear (single) caller chain up to the entry computation.

PiperOrigin-RevId: 974315178
…ilerOrchestrator

PiperOrigin-RevId: 974316753
- Add PassDebugInstrumentation to snapshot IR before and after failing passes.
- Add ConversionFailureReporter to record structured conversion diagnostics and IR artifacts.
- Introduce litert-reduce tool and reduce_failure script for automated MLIR crash reduction.
- Add pass timing session and module verification to the StableHLO to TFLite pipeline.
- Add enable_debug and debug_dir flags to converter_flags.proto.

PiperOrigin-RevId: 974320314
…e compiler performance and invocation boundaries.

PiperOrigin-RevId: 974326263
…ring

Imported from GitHub PR openxla/xla#48045

**Summary of Changes**<br>Propagate ConcatenateFusion's selected unroll factor through MlirKernelEmitter::unroll_factor() so loop optimization uses the factor that determined the launch dimensions. Add a B200 BF16 regression test that checks the value through the base-class interface.<br><br>**Justification**<br>The concatenate emitter selected an effective factor of 16, but LLVM lowering observed 0 and fell back to the generic factor-4 policy. Partial unrolling left dynamic vector indexing that NVPTX materialized in local memory. Propagating the selected factor fully unrolls the loop and removes that local workspace.<br><br>**Kind of Contribution**<br>Bug Fix; Performance Improvement; Tests<br><br>**Benchmark**<br>Original GB300 benchmark: 14.419 ms with the buggy default path versus 2.373 ms with the factor-8 workaround (6.08x). With this fix on B200, factor 16 emits no local memory and measured 3.103 ms; factor 8 measured 3.053 ms.<br><br>**Unit Tests**<br>bazel test //xla/backends/gpu/codegen/emitters:concatenate_test --test_output=errors passed on B200 against dl/openxla/xla main at 8e51f1b72d (ComputeLab job 3600273).<br><br>**Execution Tests**<br>No new execution test; the added unit test covers propagation through the compilation-pipeline interface, and the original JAX benchmark validates generated PTX and runtime performance.
Copybara import of the project:

--
81446b95a1670f3095d0e9883e369a781255f71f by Michael Goldfarb <mgoldfarb@nvidia.com>:

Propagate concatenate unroll factor to LLVM lowering

--
15368910d48bf4b2a160a30e82d92c4003e25873 by Michael Goldfarb <mgoldfarb@nvidia.com>:

Address concatenate emitter review feedback

Merging this change closes #48045

PiperOrigin-RevId: 974330557
Imported from GitHub PR openxla/xla#47846

## Summary

- require the while-loop induction-variable step to be an HLO constant before reading its literal
- keep `MatchLoopRangeWithKnownValues` consistent with `MatchTrivialLoopTripCount`
- add a regression assertion that a nonconstant induction-variable update returns `std::nullopt` instead of crashing

## Test

```bash
TMPDIR=/export/home/lishuo121/.cache/xla-tmp /tmp/xla-tools/bazel-8.7.0 test \
  --config=clang_local \
  --repo_env=CC=/usr/bin/clang \
  --repo_env=CXX=/usr/bin/clang++ \
  --action_env=CC=/usr/bin/clang \
  --action_env=CXX=/usr/bin/clang++ \
  --distdir=/export/home/lishuo121/.cache/xla-distdir \
  --experimental_downloader_config=/tmp/xla-tools/downloader.cfg \
  //xla/hlo/analysis:while_loop_analysis_test \
  --test_output=errors
```

Result: `1 test passes`.

Fixes #47384

Copybara import of the project:

--
c7705e79ddfbd4f16b4bbb2d8199724e1a727b34 by codex <49055103+982945902@users.noreply.github.com>:

Fix while loop range analysis for nonconstant steps

Merging this change closes #47846

PiperOrigin-RevId: 974332018
Removes legacy pass wrappers from mlir_hlo headers that have been migrated
to TableGen-generated pass constructors (createBufferDeallocationPass,
createLegalizeTrigonometricToApproximationPass, createGpuKernelToNvvmPass,
createGpuKernelToRocdlPass, and namespace hlo aliases).

PiperOrigin-RevId: 974344582
Fix elemental_ir_emitter so -1 ^ x returns -1 if x is odd and 1 if x is even.

PiperOrigin-RevId: 974364039
Imported from GitHub PR openxla/xla#48107

📝 Summary of Changes
Construct the Adaptor class explicitly to avoid an ambiguous conversion in `ExpandIntegerPower` on GCC

🎯 Justification
GCC considers the constructors from `mlir::mhlo::PowOpAdaptor::PowOpAdaptor` and `PowOpGenericAdaptor` as conversions.
See `PowOpGenericAdaptor(RangeT values, mlir::DictionaryAttr attrs = nullptr)`
That leads to ambiguity.

<details>
<summary>Full error:</summary>

```
external/xla/xla/codegen/emitters/transforms/expand_integer_power.cc: In function 'llvm::LogicalResult xla::emitters::{anonymous}::ExpandIntegerPower(mlir::math::IPowIOp, mlir::PatternRewriter&)':
external/xla/xla/codegen/emitters/transforms/expand_integer_power.cc:51:66: error: conversion from '<brace-enclosed initializer list>' to 'mlir::mhlo::PowOp::Adaptor' {aka 'mlir::mhlo::PowOpAdaptor'} is ambiguous
   51 |       mlir::mhlo::impl::mapMhloOpToStdScalarOp<mlir::mhlo::PowOp>(
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
   52 |           op.getLoc(), result_types, arg_types, {op->getOperands()},
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   53 |           op->getAttrs(), &rewriter);
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from bazel-out/k8-opt/bin/external/xla/xla/mlir_hlo/_virtual_includes/mlir_hlo/mhlo/IR/hlo_ops.h:104,
                 from external/xla/xla/codegen/emitters/transforms/expand_integer_power.cc:20:
bazel-out/k8-opt/bin/external/xla/xla/mlir_hlo/_virtual_includes/hlo_ops_inc_gen/mhlo/IR/hlo_ops.h.inc:23828:3: note: candidate: 'mlir::mhlo::PowOpGenericAdaptor<RangeT>::PowOpGenericAdaptor(RangeT, mlir::DictionaryAttr) [with RangeT = mlir::ValueRange]'
23828 |   PowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : PowOpGenericAdaptor(values, attrs, Properties{}, {}) {}
      |   ^~~~~~~~~~~~~~~~~~~
bazel-out/k8-opt/bin/external/xla/xla/mlir_hlo/_virtual_includes/hlo_ops_inc_gen/mhlo/IR/hlo_ops.h.inc:23862:30: note:   inherited here
23862 |   using PowOpGenericAdaptor::PowOpGenericAdaptor;
      |                              ^~~~~~~~~~~~~~~~~~~
bazel-out/k8-opt/bin/external/xla/xla/mlir_hlo/_virtual_includes/hlo_ops_inc_gen/mhlo/IR/hlo_ops.h.inc:23860:7: note: candidate: 'constexpr mlir::mhlo::PowOpAdaptor::PowOpAdaptor(const mlir::mhlo::PowOpAdaptor&)'
23860 | class PowOpAdaptor : public PowOpGenericAdaptor<::mlir::ValueRange> {
      |       ^~~~~~~~~~~~
bazel-out/k8-opt/bin/external/xla/xla/mlir_hlo/_virtual_includes/hlo_ops_inc_gen/mhlo/IR/hlo_ops.h.inc:23860:7: note: candidate: 'constexpr mlir::mhlo::PowOpAdaptor::PowOpAdaptor(mlir::mhlo::PowOpAdaptor&&)'
In file included from external/xla/xla/codegen/emitters/transforms/expand_integer_power.cc:37:
external/xla/xla/mlir_hlo/mhlo/transforms/map_mhlo_to_scalar_op.h:1059:26: note:   initializing argument 4 of 'mlir::Value mlir::mhlo::impl::mapMhloOpToStdScalarOp(mlir::Location, llvm::ArrayRef<mlir::Type>, llvm::ArrayRef<mlir::Type>, typename MhloOpTy::Adaptor, llvm::ArrayRef<mlir::NamedAttribute>, mlir::OpBuilder*) [with MhloOpTy = mlir::mhlo::PowOp; typename MhloOpTy::Adaptor = mlir::mhlo::PowOpAdaptor]'
 1059 |     mhlo::PowOp::Adaptor adaptor, ArrayRef<NamedAttribute> attributes,
      |     ~~~~~~~~~~~~~~~~~~~~~^~~~~~~
```

I'm not entirely sure why it is ambiguous as the inherited PowOpGenericAdaptor is the better match compared to the PowOpAdaptor->PowOpAdaptor-copy-ctor sequence

</details>

🚀 Kind of Contribution
🐛 Bug Fix

Copybara import of the project:

--
552c47fe09b4823dd963538d84726b1c86f1f39b by Alexander Grund <Flamefire@users.noreply.github.com>:

Fix ambiguous conversion in `ExpandIntegerPower` on GCC

GCC considers the constructors from `mlir::mhlo::PowOpAdaptor::PowOpAdaptor` and `PowOpGenericAdaptor` as conversions.

Use the Adaptor class explicitely to avoid it.

Merging this change closes #48107

PiperOrigin-RevId: 974372421
PiperOrigin-RevId: 974372632
When `--xla_gpu_cublas_fallback=false`, cuBLAS/cuBLASLt should still be compiled and run to produce a trusted reference output for buffer correctness checking and output clustering, but should be excluded from winning configuration selection.

PiperOrigin-RevId: 974397462
PiperOrigin-RevId: 974403667
Just create the tests as if they were after HoistFusedBitcasts - removing this dependency makes it a simpler flip for when we actually turn on Gemm Fusion V2, which hoists bitcasts internally.

Updated UseTF32For8BitOrLessWithF32 to remove the removable bitcast.

PiperOrigin-RevId: 974408644
…llective kernel thunks.

Introduce a new xla option xla_gpu_unsupported_use_cross_host_one_shot_kernel which allows users to enable cross-host one-shot collectives.
Create a symmetric memory for scratch buffers and use it to get a peer address of memory chunk instead of running separate rendezvous.

Reverts c830a86

PiperOrigin-RevId: 974411622
….cc.

TF_ counterparts are deprecated and it's difficult to read tests that have their function crossed out.

PiperOrigin-RevId: 974436851
@pull pull Bot locked and limited conversation to collaborators Sep 1, 2026
@pull pull Bot added the ⤵️ pull label Sep 1, 2026
@pull
pull Bot merged commit 52ec721 into Cache-Cloud:master Sep 1, 2026
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.