Skip to content

[pull] master from tensorflow:master - #8803

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

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

Conversation

@pull

@pull pull Bot commented Sep 2, 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 : )

abhijeet117 and others added 30 commits August 23, 2026 23:53
NumPy flattens every input before concatenating when axis is None, but
the value was passed straight to array_ops.concat and failed with a
cryptic conversion error. Flatten the inputs and concatenate along
axis 0 instead.
Reshaping a 1-D array to [-1] is a no-op, so skip the extra op dispatch for inputs that are already flat.
The `TF_SYSTEMLIBS` for those 2 broke:
- The LICENSE filegroup should not have an extension.
- Duplicate `xla` in project reference
- Missing config-setting referenced by other targets.
Allow them to be recognized as build extensions.
Refactor accelerator detection and JSON summary generation in tf_env_collect.sh. Improve temporary file handling and streamline pip list checks.
In StagingMap::popitem(), the local key tensor was passed to
copy_or_move_tensors() before being assigned the actual key from
the map iterator. When an out-of-range index is supplied, the
downstream check_index() helper formats its InvalidArgument
message via key.scalar<int64_t>()() on the still-empty (0-element)
key tensor. Tensor::scalar() then invokes
CheckIsAlignedAndSingleElement() which CHECK_EQ(1, NumElements())
fails (1 vs. 0) and aborts the process with SIGABRT (exit 134),
turning a recoverable input error into a fatal CHECK.

Move the assignment of *key = it->first above the call to
copy_or_move_tensors() so that check_index() always sees a fully
constructed scalar key when formatting its error message. The
existing bounds-check and InvalidArgument semantics are
unchanged.

Fixes #112757
Adds testMapUnstageNoKeyOutOfRangeIndex and
testOrderedMapUnstageNoKeyOutOfRangeIndex to MapStageTest. Each test
stages one float32 value at index 0 with int64 key 1, then calls
the corresponding *MapUnstageNoKey op with index 1 and asserts that
the call raises tf.errors.InvalidArgumentError matching "out of bounds"
instead of aborting with a fatal CHECK in
Tensor::CheckIsAlignedAndSingleElement.

The ordered variant covers OrderedMapUnstageNoKeyOp<true>, which
shares StagingMap::popitem() with the unordered MapUnstageNoKeyOp<false>
through the StagingMap<bool Ordered> template, so both variants
exhibit the same out-of-range-index bug and need explicit coverage.

Without the popitem() reorder fix in the previous commit, both tests
crash the Python process with SIGABRT (exit 134) and the
tensor.cc:904 "Check failed: 1 == NumElements() (1 vs. 0)" signature.
With the fix, copy_or_move_tensors() sees a 1-element scalar key and
check_index() returns the expected InvalidArgumentError.
…ang.

Change-Id: Idf4224600b1fcdc29bd708f9b89d3ac4ab14b72d
cudnn doesn't accept f64 data types, so we should reject it in IsCudnnSupportedFusion.  This was discovered in the test from DoNotExecuteGemmFusionWithCuDnnWhenNotSupported when enabling gemm fusion V2. I believe this test was never testing what it was intending to.

Previously in V1, gemm fusion didn't support f64, so it created a fusion around the dot and another around the negate. Since cudnn rejected the _loop_ fusion around the negate, it returned "No supported configs", but this was unrelated to the dot/f64 fusion it was trying to test. I have updated the HLO to be a premade fusion to ensure it's testing the correct fusion. Then I updated IsCudnnSupportedFusion to successfully reject it (and added relevant test there).

PiperOrigin-RevId: 975071652
- Bump rules_cc to 0.2.20 in MODULE.bazel and workspace3.bzl.
- Bump bazel_skylib to 1.9.0 in workspace3.bzl to support the 'scope'
  attribute on bool_flag used by rules_cc 0.2.20.
- Remove rules_cc_protobuf.patch from rules_cc in workspace3.bzl since
  rules_cc 0.2.20 no longer contains cc_proto_library in cc/defs.bzl.
- Call compatibility_proxy_repo() early in WORKSPACE to define
  @cc_compatibility_proxy in WORKSPACE mode.
- Revert compiler flag workaround from third_party/llvm/build.patch
  now that rules_cc 0.2.20 natively provides @rules_cc//cc/compiler:compiler.

PiperOrigin-RevId: 975088002
…metic

`ParseAttributes` in dilation_ops.cc checked only that `strides` and `rates`
have 4 entries and that entries 0 and 3 equal 1. It never checked that the
spatial entries are positive, so zero and negative values reached the kernel.

`ParseSizes` then computes, in `int`:

    const int filter_rows_eff = filter_rows + (filter_rows - 1) * (rate_rows - 1);

A negative rate makes the effective filter size negative directly, and a large
negative one overflows. `GetWindowedOutputSizeVerbose` rejects `stride <= 0` and
a negative output size, but not a negative filter size: with dilation_rate == 1
the effective filter size is passed straight through, so
`output_size = (input - negative + stride) / stride` is larger than the input
and positive, and the guard passes.

Observed on 2.22.0-dev (input 2x4x4x2, filter 2x2x2, strides 1):

  rates=[1,0,0,1]      -> accepted, output 2x4x4x2
  rates=[1,-1,-1,1]    -> accepted, output 2x5x5x2
  rates=[1,-100,-100,1]-> accepted, output 2x104x104x2 (larger than the input)
  rates=[1,INT32_MIN,INT32_MIN,1] -> aborts the process:
      F tensor_shape.cc:204] Check failed: InitDims(dim_sizes) is OK
        (INVALID_ARGUMENT: Encountered overflow when multiplying ...)
        @ tensorflow::TensorShapeBase<>::TensorShapeBase()
        @ tensorflow::DilationOp<>::Compute()

Because the CHECK is inside TensorShape's constructor, callers cannot catch it.

This mirrors what 210e294 ("Fix integer overflow DoS in ExtractImagePatches
and ExtractVolumePatches") did for the sibling ops: that change routed attribute
parsing through `ParseAttributeVec4`, which enforces `(*attr)[1] >= 1 &&
(*attr)[2] >= 1`, and widened the shape arithmetic to int64_t. Dilation2D was
not covered. With the same inputs above, ExtractImagePatches already returns
OutOfRangeError for every non-positive rate.

`ParseAttributes` is shared by Dilation2D, Dilation2DBackpropInput and
Dilation2DBackpropFilter, so all three are covered.
Matches the error type used by the other attribute validation in this file.
This adds bounds checking to cache resizes and updates the cache truncation warning.
…ty-key-check

PiperOrigin-RevId: 975152958
PiperOrigin-RevId: 975162224
Expose the `llvm_linux_aarch64` repository from `@rules_ml_toolchain` in `MODULE.bazel`.

XLA registers Linux AArch64 toolchains:
- `@rules_ml_toolchain//cc:linux_aarch64_linux_aarch64`
- `@rules_ml_toolchain//cc:linux_aarch64_linux_aarch64_cuda`

These toolchains depend on `@llvm_linux_aarch64`. Under Bzlmod, repositories generated by module extensions must be explicitly imported via `use_repo`. Otherwise, the toolchain resolution will fail.

PiperOrigin-RevId: 975182846
PiperOrigin-RevId: 975183363
@pull pull Bot locked and limited conversation to collaborators Sep 2, 2026
@pull pull Bot added the ⤵️ pull label Sep 2, 2026
@pull
pull Bot merged commit bbb3c2a into Cache-Cloud:master Sep 2, 2026
2 checks 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.