Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
c30bf66
Replace generic Exception with specific exception types in tensorflow…
Cyrax321 May 7, 2026
9b0c8fa
Update tensorflow/python/keras/utils/data_utils.py
Cyrax321 Jun 26, 2026
8d25be2
Update tensorflow/python/keras/utils/data_utils.py
Cyrax321 Jun 26, 2026
d2ae0b3
Update tensorflow/python/tpu/client/client.py
Cyrax321 Jun 26, 2026
8e8bd46
Update client.py
Cyrax321 Jun 26, 2026
bcf4e7c
Update config.py
Cyrax321 Jun 26, 2026
2c84544
Fix line-too-long lint error in client.py
Cyrax321 Jul 8, 2026
4b0ab3a
Merge latest master into fix-generic-exceptions-python
Cyrax321 Jul 23, 2026
52c4ed4
Fix NaN second derivative in cumulative_logsumexp under nested Forwar…
Venkat6871 Sep 17, 2026
1c91c0e
Add regression test for tf.math.log_sigmoid float64 second derivative
VimalN2005 Sep 18, 2026
cc2f830
Update array_grad_test.cc
MaddipatlaChetan24 Sep 18, 2026
ff078d2
Fix always_inline runtime fallback helpers
yqtian-se Sep 18, 2026
a8af58a
Validate axis bounds in tf.linalg.norm
kaivalya-cyber Sep 19, 2026
753290c
Revert keras data_utils.py per reviewer: Keras maintained upstream in…
Cyrax321 Sep 19, 2026
75022da
Fix docstring for GPU presence check function
MaddipatlaChetan24 Sep 19, 2026
ceb5363
Improve buffer deletion safety in c_api_util.py
MaddipatlaChetan24 Sep 20, 2026
1155cc2
Update auto_control_deps_utils.py
MaddipatlaChetan24 Sep 20, 2026
fba93b5
Improve buffer deletion safety in __del__ method
MaddipatlaChetan24 Sep 20, 2026
a08207e
Clean up tensor_test.py by removing unused imports
MaddipatlaChetan24 Sep 21, 2026
dffe085
Update debug_data.py
MaddipatlaChetan24 Sep 21, 2026
57d42b9
Update tensorflow/python/debug/lib/debug_data.py
MaddipatlaChetan24 Sep 21, 2026
bb5ca0b
Fix tnp.sinc gradient at zero
Phoebus-Liu Sep 21, 2026
3562854
Address review feedback: use scalar cast in where_v2 and update gradi…
Venkat6871 Sep 21, 2026
4ae89cb
Cast expected gradient to dtype.as_numpy_dtype in testSincGradientAtZero
Phoebus-Liu Sep 21, 2026
b06006f
Update log_sigmoid second derivative test with non-zero atol
VimalN2005 Sep 21, 2026
303300a
Squashing commits after sync tool breakage
tensorflower-gardener Sep 23, 2026
bb24f7f
[XLA] Convert int4 constants in bulk between HLO literals and StableHLO
patrick-toulme Sep 23, 2026
3d237c0
Set scoped VMEM limit to full VMEM capacity via CompilerParams in Loc…
tensorflower-gardener Sep 23, 2026
0473ac1
Merge pull request #127721 from MaddipatlaChetan24:patch-30
tensorflower-gardener Sep 24, 2026
d335903
Merge pull request #127649 from MaddipatlaChetan24:patch-16
tensorflower-gardener Sep 24, 2026
a6f70a8
Merge pull request #127638 from yqtian-se:fix-runtime-fallback-always…
tensorflower-gardener Sep 24, 2026
1d83e6f
Merge pull request #127711 from MaddipatlaChetan24:patch-26
tensorflower-gardener Sep 24, 2026
f69558e
Merge pull request #127742 from Phoebus-Liu:fix/issue-127226
tensorflower-gardener Sep 24, 2026
28fc23c
Merge pull request #127551 from Venkat6871:fix/127243-cumulative-logs…
tensorflower-gardener Sep 24, 2026
dd8379b
Merge pull request #127710 from MaddipatlaChetan24:patch-25
tensorflower-gardener Sep 24, 2026
3092088
Merge pull request #127717 from MaddipatlaChetan24:patch-29
tensorflower-gardener Sep 24, 2026
c6b2f48
Merge pull request #127700 from MaddipatlaChetan24:patch-24
tensorflower-gardener Sep 24, 2026
7998217
Merge pull request #127639 from VimalN2005:fix-log-sigmoid-second-der…
tensorflower-gardener Sep 24, 2026
6de907d
Merge pull request #127682 from kaivalya-cyber:fix/norm-axis-bounds
tensorflower-gardener Sep 24, 2026
ae3c5be
Asynchronously disarm `ExecutionWatchdog` in the destructor
junwhanahn Sep 23, 2026
68e1e40
Automated Code Change
tensorflower-gardener Sep 23, 2026
96df653
Merge pull request #117860 from Cyrax321:fix-generic-exceptions-python
tensorflower-gardener Sep 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,7 @@ common:rbe_win_base --nobuild_runfile_links
common:rbe_win_base --define=override_eigen_strong_inline=true

common:rbe_windows_x86_cpu_2022 --config=rbe_win_base --config=windows_x86_cpu_2022
common:rbe_windows_x86_cpu_2022 --features=-with_wrapper

# Override the remote instance and BES instance names to use the new RBE pools
common:rbe_windows_x86_cpu_2022 --remote_instance_name=projects/ml-oss-rbe-general/instances/default_instance
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pylint-presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install pylint==2.13.9 numpy wheel
pip install pylint==2.13.9 "numpy<2.0.0" wheel
- name: Run PyLint on changed files
run: |
echo "${{ steps.get_file_changes.outputs.files}}" | tr " " "\n" | grep ".py$" | xargs pylint --rcfile=tensorflow/tools/ci_build/pylintrc
4 changes: 3 additions & 1 deletion tensorflow/c/tf_datatype.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ typedef enum TF_DataType {
TF_UINT4 = 30,
TF_INT2 = 31,
TF_UINT2 = 32,
TF_FLOAT4_E2M1FN = 33 // 2 exponent bits, 1 mantissa bit, finite-only
TF_FLOAT4_E2M1FN = 33, // 2 exponent bits, 1 mantissa bit, finite-only
TF_FLOAT8_E8M0FNU = 34 // 8 exponent bits, 0 mantissa bits, finite-only, with
// NaN.
} TF_DataType;

// TF_DataTypeSize returns the sizeof() for the underlying type corresponding
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/cc/saved_model/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,8 @@ tf_cc_test(
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest",
"@xla//xla/tsl/lib/core:status_test_util",
"@xla//xla/tsl/platform:status_matchers",
],
)

Expand Down
5 changes: 5 additions & 0 deletions tensorflow/cc/saved_model/fingerprinting.cc
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ absl::StatusOr<FingerprintDef> CreateFingerprintDefPb(
SavedModel saved_model;
TF_RETURN_IF_ERROR(ReadBinaryProto(Env::Default(), pb_file, &saved_model));

if (saved_model.meta_graphs_size() == 0) {
return absl::InvalidArgumentError(
"SavedModel (.pb) contains no MetaGraphs.");
}

// Create a copy of `metagraph` which will be used and mutated for fingerprint
// computation.
FingerprintDef fingerprint_def;
Expand Down
17 changes: 17 additions & 0 deletions tensorflow/cc/saved_model/fingerprinting_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ limitations under the License.

#include <string>

#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "absl/numeric/int128.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/numbers.h"
#include "absl/strings/string_view.h"
#include "xla/tsl/lib/core/status_test_util.h"
#include "xla/tsl/platform/status_matchers.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/framework/versions.pb.h"
#include "tensorflow/core/platform/env.h"
Expand Down Expand Up @@ -206,5 +209,19 @@ TEST(FingerprintingTest, TestSingleprint) {
const_singleprint);
}

TEST(FingerprintingTest, CreateFingerprintDefPbEmptyMetaGraphsReturnsError) {
const std::string model_dir =
io::JoinPath(::testing::TempDir(), "empty_metagraphs_model");
TF_ASSERT_OK(Env::Default()->RecursivelyCreateDir(model_dir));
const std::string pb_file = io::JoinPath(model_dir, "saved_model.pb");
SavedModel saved_model;
TF_ASSERT_OK(WriteBinaryProto(Env::Default(), pb_file, saved_model));

EXPECT_THAT(
CreateFingerprintDef(model_dir).status(),
tsl::testing::StatusIs(absl::StatusCode::kInvalidArgument,
"SavedModel (.pb) contains no MetaGraphs."));
}

} // namespace
} // namespace tensorflow::saved_model::fingerprinting
1 change: 1 addition & 0 deletions tensorflow/compiler/aot/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ cc_library(
"@xla//xla/client:client_library",
"@xla//xla/client:compile_only_client",
"@xla//xla/hlo/builder:xla_computation",
"@xla//xla/pjrt:pjrt_compiler",
"@xla//xla/service:compiler",
"@xla//xla/service/cpu:cpu_aot_compilation_result",
"@xla//xla/service/cpu:cpu_compiler",
Expand Down
5 changes: 4 additions & 1 deletion tensorflow/compiler/aot/compile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ limitations under the License.
#include "xla/client/client_library.h"
#include "xla/client/compile_only_client.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/pjrt/pjrt_compiler.h"
#include "xla/service/compiler.h"
#include "xla/service/cpu/cpu_aot_compilation_result.h"
#include "xla/shape.h"
Expand Down Expand Up @@ -174,8 +175,10 @@ absl::Status CompileGraph(GraphDef graph_def, const tf2xla::Config& config,
graph_def, config, &computation, flags.debug_info,
flags.debug_info_path_begin_marker));
} else {
TF_ASSIGN_OR_RETURN(auto* pjrt_compiler,
xla::GetDefaultPjRtCompiler(xla::CpuName()));
TF_RETURN_IF_ERROR(ConvertGraphDefToXla(std::move(graph_def), config,
client, &computation));
pjrt_compiler, &computation));
}

if (flags.experimental_quantize && *quantize_xla) {
Expand Down
71 changes: 36 additions & 35 deletions tensorflow/compiler/jit/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ cc_library(
"//tensorflow/compiler/tf2xla/kernels:xla_ops",
"//tensorflow/core:core_cpu_internal",
"//tensorflow/core:lib",
"//tensorflow/core/tfrt/common:pjrt_cpu_client_registration",
"@com_google_absl//absl/memory",
"@xla//xla/stream_executor:platform_manager",
] + if_libtpu(
Expand Down Expand Up @@ -291,7 +292,6 @@ cc_library(
# Public visibility is needed for external TF/XLA backends.
visibility = ["//visibility:public"],
deps = [
":common",
":device_compilation_cluster_signature",
":device_compilation_profiler",
":device_compiler",
Expand All @@ -304,13 +304,11 @@ cc_library(
":variable_info_util",
":xla_compile_util",
":xla_device_compiler_client",
":xla_device_context",
":xla_launch_util",
":xla_tensor",
"//tensorflow/compiler/jit/ops:xla_ops",
"//tensorflow/compiler/tf2xla:common",
"//tensorflow/compiler/tf2xla:layout_util",
"//tensorflow/compiler/tf2xla:tf2xla_util",
"//tensorflow/compiler/tf2xla:xla_compiler",
"//tensorflow/compiler/tf2xla:xla_op_registry",
"//tensorflow/compiler/tf2xla/kernels:xla_dummy_ops",
Expand Down Expand Up @@ -346,36 +344,28 @@ cc_library(
"//tensorflow/core/kernels/data:options_dataset_op",
"//tensorflow/core/kernels/data:prefetch_dataset_op",
"//tensorflow/core/platform:stream_executor_no_cuda",
"//tensorflow/core/profiler/lib:traceme",
"//tensorflow/core/tfrt/common:async_value_tensor",
"//tensorflow/core/tfrt/common:create_pjrt_client_util",
"//tensorflow/core/tfrt/common:global_state",
"//tensorflow/core/tfrt/common:pjrt_util",
"//tensorflow/core/tpu:tpu_defs",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/base",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/log",
"@com_google_absl//absl/log:check",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:optional",
"@com_google_absl//absl/types:span",
"@xla//xla:executable_run_options",
"@xla//xla:shape_util",
"@xla//xla/client:client_library",
"@xla//xla/client:local_client",
"@xla//xla/hlo/ir:hlo",
"@xla//xla/pjrt:pjrt_client",
"@xla//xla/pjrt:tf_pjrt_client",
"@xla//xla/service:compiler",
"@xla//xla/service:executable",
"@xla//xla/service:stream_pool",
"@xla//xla/service/gpu:gpu_executable_run_options",
"@xla//xla/service:shaped_buffer",
"@xla//xla/stream_executor:platform",
"@xla//xla/stream_executor:platform_manager",
"@xla//xla/stream_executor:stream",
"@xla//xla/stream_executor/host:host_platform_id",
"@xla//xla/stream_executor/integrations:tf_allocator_adapter",
"@xla//xla/tsl/framework:device_id_utils",
],
Expand Down Expand Up @@ -403,11 +393,9 @@ cc_library(
deps = [
":device_compilation_cluster_signature",
":device_compilation_profiler",
":device_compiler",
":jit_compilation_passes",
":variable_info",
":variable_info_util",
":xla_device_no_jit_rewrite_registration",
":xla_launch_util",
":xla_tensor",
"//tensorflow/compiler/jit/ops:xla_ops",
"//tensorflow/compiler/tf2xla:layout_util",
Expand Down Expand Up @@ -446,6 +434,7 @@ cc_library(
"//tensorflow/core/kernels/data:prefetch_dataset_op",
"//tensorflow/core/platform:stream_executor_no_cuda",
"//tensorflow/core/tfrt/common:async_value_tensor",
"@com_google_absl//absl/status",
"@com_google_absl//absl/types:optional",
"@xla//xla/client:local_client",
"@xla//xla/pjrt:pjrt_client",
Expand Down Expand Up @@ -476,13 +465,12 @@ cc_library(
"//tensorflow/compiler/mlir/tensorflow:dump_graph",
"//tensorflow/core:framework_internal",
"//tensorflow/core:framework_types_hdr",
"//tensorflow/core:lib",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core/tpu/kernels:sparse_core_xla_flags_defaults",
"@com_google_absl//absl/base",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/log",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:optional",
"@xla//xla:parse_flags_from_env",
],
)
Expand All @@ -496,10 +484,8 @@ cc_library(
deps = [
"//tensorflow/core:framework_internal",
"//tensorflow/core:framework_types_hdr",
"//tensorflow/core:lib",
"//tensorflow/core/protobuf:for_core_protos_cc",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/types:optional",
],
)

Expand Down Expand Up @@ -629,7 +615,6 @@ cc_library(
":pjrt_tensor_buffer_util",
":variable_info",
":variable_info_util",
":xla_tensor",
"//tensorflow/compiler/tf2xla:common",
"//tensorflow/compiler/tf2xla:xla_compiler",
"//tensorflow/compiler/tf2xla:xla_resource",
Expand All @@ -644,6 +629,7 @@ cc_library(
"//tensorflow/core/common_runtime/gpu:gpu_serving_device_selector",
"//tensorflow/core/tfrt/common:async_value_tensor",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/base",
"@com_google_absl//absl/cleanup",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/container:flat_hash_set",
Expand All @@ -660,18 +646,13 @@ cc_library(
"@xla//xla/client:local_client",
"@xla//xla/hlo/ir:hlo",
"@xla//xla/pjrt:pjrt_client",
"@xla//xla/pjrt:pjrt_common",
"@xla//xla/pjrt:pjrt_compiler",
"@xla//xla/pjrt:pjrt_executable",
"@xla//xla/pjrt/plugin/xla_cpu:cpu_execute_options",
"@xla//xla/runtime:device_id",
"@xla//xla/service:executable",
"@xla//xla/service:maybe_owning_device_memory",
"@xla//xla/service:shaped_buffer",
"@xla//xla/service:transfer_manager",
"@xla//xla/stream_executor:device_memory",
"@xla//xla/stream_executor:device_memory_allocator",
"@xla//xla/stream_executor:event",
"@xla//xla/stream_executor:platform",
"@xla//xla/stream_executor:platform_manager",
"@xla//xla/stream_executor/host:host_platform_id",
"@xla//xla/stream_executor:device_address_allocator",
"@xla//xla/tsl/framework:device_id_utils",
"@xla//xla/tsl/framework:serving_device_selector_policies",
],
Expand Down Expand Up @@ -875,30 +856,41 @@ cc_library(
visibility = [":internal"],
deps = [
":compilability_check_util",
":device_compilation_profiler",
":device_compiler",
":pjrt_device_compiler_client",
":variable_info",
":variable_info_util",
":xla_device_no_jit_rewrite_registration",
":xla_launch_util",
"//tensorflow/compiler/tf2xla:xla_compiler",
"//tensorflow/compiler/tf2xla:xla_resource",
"//tensorflow/core:framework",
"//tensorflow/core:lib",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core/common_runtime:core_cpu_internal",
"//tensorflow/core/common_runtime/eager:tensor_handle",
"//tensorflow/core/platform:refcount",
"//tensorflow/core/platform:statusor",
"//tensorflow/core/tpu:tpu_defs",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:span",
"@xla//xla:shape_util",
"@xla//xla:status_macros",
"@xla//xla/client:executable_build_options",
"@xla//xla/client:local_client",
"@xla//xla/hlo/ir:hlo",
"@xla//xla/hlo/translate:portable_api",
"@xla//xla/pjrt:compiled_memory_stats",
"@xla//xla/pjrt:pjrt_client",
"@xla//xla/service:hlo_graph_dumper",
"@xla//xla/service:hlo_module_config",
"@xla//xla/service:hlo_proto_util",
"@xla//xla/stream_executor:platform",
"@xla//xla/stream_executor/host:host_platform_id",
"@xla//xla/tsl/platform:errors",
"@xla//xla/tsl/platform:statusor",
],
alwayslink = 1,
)
Expand Down Expand Up @@ -1984,9 +1976,12 @@ tf_cuda_cc_test(
],
deps = [
":device_compilation_cluster_signature",
":device_compilation_profiler",
":device_compiler",
":device_compiler_client",
":device_executable_persistor",
":tf_graph_to_hlo_compiler_proto_cc",
":xla_activity_listener",
":xla_compile_util",
":xla_device_compiler_client",
":xla_gpu_device",
Expand All @@ -2004,14 +1999,17 @@ tf_cuda_cc_test(
"//tensorflow/core/kernels:ops_testutil",
"//tensorflow/core/platform:env",
"//tensorflow/core/platform:errors",
"//tensorflow/core/platform:path",
"//tensorflow/core/platform:refcount",
"//tensorflow/core/platform:status",
"//tensorflow/core/platform:status_matchers",
"//tensorflow/core/platform:statusor",
"//tensorflow/core/platform:test",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/base",
"@com_google_absl//absl/functional:any_invocable",
"@com_google_absl//absl/log:check",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/synchronization",
"@com_google_absl//absl/time",
Expand All @@ -2022,6 +2020,7 @@ tf_cuda_cc_test(
"@xla//xla/hlo/builder:xla_computation",
"@xla//xla/stream_executor:platform_manager",
"@xla//xla/tsl/lib/strings:proto_serialization",
"@xla//xla/tsl/platform:errors",
"@xla//xla/tsl/platform:statusor",
],
)
Expand Down Expand Up @@ -2075,8 +2074,10 @@ tf_cuda_cc_test(
"@xla//xla/client:client_library",
"@xla//xla/client:local_client",
"@xla//xla/pjrt:pjrt_client",
"@xla//xla/stream_executor:device_memory_allocator",
"@xla//xla/service/cpu:cpu_transfer_manager",
"@xla//xla/stream_executor:device_address_allocator",
"@xla//xla/stream_executor:platform",
"@xla//xla/stream_executor:platform_manager",
"@xla//xla/stream_executor/host:host_platform_id",
"@xla//xla/tsl/platform:statusor",
],
Expand Down
Loading
Loading