Upgrade Struct2Tensor to TensorFlow 2.21.0#59
Open
vkarampudi wants to merge 4 commits intogoogle:masterfrom
Open
Upgrade Struct2Tensor to TensorFlow 2.21.0#59vkarampudi wants to merge 4 commits intogoogle:masterfrom
vkarampudi wants to merge 4 commits intogoogle:masterfrom
Conversation
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR upgrades
struct2tensorto support TensorFlow 2.21.0 and resolves various build system incompatibilities, dependency conflicts, and compilation errors encountered during the process.Key Changes
TensorFlow & Bazel Version Alignment
.bazelversionto7.7.0to align with TensorFlow 2.21.0 requirements.Dependency Management & Bzlmod
common --noenable_bzlmodto .bazelrc. This was necessary to resolve severe version mismatch issues with Protobuf when using Bazel 7, ensuring we use the versions specified in WORKSPACE.pyarrowdependency insetup.pyto>=14to resolve security vulnerabilities and ensure compatibility.Build System Workarounds (Dummy Repositories)
third_party/and registered them in WORKSPACE:rules_java: A minimal dummy repo to satisfy Java dependencies without pulling in heavy external rules.local_config_cuda,local_config_rocm,local_config_tensorrt,local_config_sycl: Dummy repositories to satisfy TensorFlow's GPU configuration checks without requiring actual GPU setups.Compiler & Linker Fixes
--retain_optionsflag from Protobuf generation rules, which was causing failures with the version ofprotocused in Bazel 7.#include <cstdint>to several C++ files instruct2tensor/ops/andstruct2tensor/kernels/to fix missinguintptr_tdefinitions when compiling with newer compilers (likegcc 15).--copt=-Wa,--gsframe=noto.bazelrcto fix a relocation error specific togcc 15. However, this caused the PR build to fail because the PR runner's assembler did not support that flag. I have removed it for PR compatibility. If you build locally withgcc 15and see relocation errors, you may need to pass it manually.Test Suite Execution
--noincompatible_check_sharding_supporttobazel testto bypass sharding support checks that were failing in benchmark tests.Verification
All tests passed successfully locally:
bazel test //... --noincompatible_check_sharding_support ...