[pull] master from tensorflow:master - #8795
Merged
Merged
Conversation
Automated security fix generated by OrbisAI Security
Adds GetOrRegisterDatasetInvalidDatasetId to grpc_dispatcher_impl_test.cc to verify that backslash, slash, '.', and '..' dataset IDs are rejected via the public gRPC API rather than calling the internal ValidateDatasetId function directly.
retrieve_clang_version returns None when the clang executable does not
report a parseable version, which happens with wrappers such as ccache
or any tool whose --version banner lacks a usable version token.
disable_clang_offsetof_extension then crashed with AttributeError while
deciding whether to add -Wno-gnu-offsetof-extensions for clang 16 and
17. Non-numeric version strings would crash the same way with
ValueError. Both cases now skip the flag, matching every confirmed
version outside 16 and 17; the existing "current clang installation
version unknown" warning still prints.
Test Plan:
python -m py_compile configure.py
python -m pylint --rcfile=tensorflow/tools/ci_build/pylintrc \
configure.py # rated 10.00/10, same as master
Direct call matrix on disable_clang_offsetof_extension: None, empty
string and 'unknown' return without writing; '16.0.0' and '17.1.8'
write build --copt=-Wno-gnu-offsetof-extensions; '22.1.8', '15.x'
and '18.x' write nothing, byte identical to master bazelrc output.
On master, None reproduced "AttributeError: 'NoneType' object has no
attribute 'split'" from issue 125939.
retrieve_clang_version indexed the first character of whatever the clang executable printed, so a wrapper that exits with nothing on stdout crashed with IndexError. The parsed result is now always handled as a token list: an empty or unrecognized banner reaches the existing unknown-version warning and returns None, and an adjacent or truncated "clang version " marker does the same instead of raising IndexError. Together with the previous commit this makes configure survive any clang whose --version output cannot be parsed. Version-bearing outputs are unchanged. One deliberate difference: banners without a version token no longer print the misleading "not a release version" warning that master produced by accident, because that check now runs over tokens instead of characters. A token-free banner starting with a digit used to be reported as a bogus one digit version; it is now reported as unknown. Test Plan: Monkeypatched run_shell harness over retrieve_clang_version and the retrieve plus disable_clang_offsetof_extension flow on this branch: empty stdout, whitespace only stdout, banner without a version token, digit-initial token-free banner, adjacent "clang version " separators and a truncated marker all return None with the unknown-version warning and no crash; "clang version 22.1.8" returns 22.1.8; "Ubuntu clang version 18.0.0git" returns 18.0.0 with the prerelease warning. On master the empty-output input reproduced "IndexError: string index out of range". pylint --rcfile=tensorflow/tools/ci_build/pylintrc rates configure.py 10.00/10.
Split the no "clang version " marker case into its own early return instead of wrapping the raw banner in a single-element list. Same observable behavior on every input, clearer control flow. Test Plan: Monkeypatched run_shell matrix rerun after the change: empty stdout, whitespace only, banner without token, digit-initial token-free banner, adjacent separators and truncated marker all return None with the unknown-version warning; 'clang version 22.1.8' returns 22.1.8; 'Ubuntu clang version 18.0.0git' returns 18.0.0 with the prerelease warning. python -m py_compile exit 0; pylint with tensorflow/tools/ci_build/pylintrc rates configure.py 10.00/10.
Grappler's constant folding rewrote Div(ones, y) into Reciprocal(y), assuming the two are numerically equivalent. They are not on x86: the CPU Reciprocal kernel uses Eigen's fast-math preciprocal for float, which computes rcp plus one Newton-Raphson step under EIGEN_FAST_MATH and is accurate to about 1 ulp rather than exactly IEEE division, while the packet tail and the Div kernel divide exactly. As a result, 1.0 / x returned different values in eager and graph mode on x86, for example 0.99999994 instead of 1.0 for x = 1.0. Remove the rewrite so 1 / y stays a true division in optimized graphs. Users who want the faster approximate reciprocal can still call tf.math.reciprocal explicitly. The ReduceDivToReciprocalMul strength reduction for division by constants is documented as such and is left unchanged. The new Python test asserts both that no Reciprocal appears in the optimized graph and that 1.0 / ones is exactly ones, so it fails on any platform if the rewrite comes back. Fixes #102771
Internal presubmit lint rejects newly introduced print() statements in
Python source. The two new warning branches in retrieve_clang_version
now use sys.stdout.write instead, matching the requested fix.
Test Plan: python -c 'import ast; ast.parse(open("configure.py").read())' -> ok
PiperOrigin-RevId: 973794732
…ngle-var-indexing PiperOrigin-RevId: 973797203
…ision PiperOrigin-RevId: 973797307
…ion-none PiperOrigin-RevId: 973797343
Exports tflite::ConvertMlirBytecode on Windows in _pywrap_tensorflow.def and symbols_pybind.txt to resolve undefined symbol errors during linking of __pywrap_tensorflow_0_shared_object.dll in Windows x86 presubmit builds. PiperOrigin-RevId: 973824659
Imported from GitHub PR openxla/xla#47502 📝 Summary of Changes Tag FileCheck only gpu tests with gpu tag only 🎯 Justification This allows them to be run on rocm_cpu step of CI 🚀 Kind of Contribution 🧪 Tests 📊 Benchmark (for Performance Improvements) N\A 🧪 Unit Tests: None 🧪 Execution Tests: None Copybara import of the project: -- 1d1f8ebd6c98d540aedb33625d4e1f0f8af756c2 by Dragan Mladjenovic <Dragan.Mladjenovic@amd.com>: [ROCm] Separate lit test that use FileCheck only This allows them to be run on rocm_cpu step of CI Merging this change closes #47502 PiperOrigin-RevId: 973827849
PiperOrigin-RevId: 973835112
Part of a stacked effort towards adding tooling to measure and generate GPU bandwidth derate tables reproducibly. This CL introduces `GetPeakBandwidthBytesPerSec(int device_id)`, which dynamically queries the active `StreamExecutor` to retrieve the theoretical peak GPU memory bandwidth at runtime. Test: Added unit tests. PiperOrigin-RevId: 973840679
Without sorting, they are dumped in arbitrary order, which makes dumps not bit-identical, which makes it harder to hunt for indeterminism. I've checked a model that produced non-deterministic dumps before, this change fixes it. PiperOrigin-RevId: 973891310
PiperOrigin-RevId: 973902250
…to patch. This aligns rules_proto version across Bzlmod and WORKSPACE builds. PiperOrigin-RevId: 973931168
…-side telemetry PiperOrigin-RevId: 973939699
PiperOrigin-RevId: 973939820
PiperOrigin-RevId: 973941174
Storing weights outside of flatbuffer should also respect alignment requirement. For now this is just matching alignment requirement for tensors stored inside flatbuffer with constants stored outside PiperOrigin-RevId: 973945746
…mode PiperOrigin-RevId: 973960856
…aset-id-backslash-path-traversal PiperOrigin-RevId: 973983980
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )