Update tf_gpu_kernel_library and tf_custom_op_library in tensorflow.bzl to
dispatch to rocm_library from @config_rocm_hipcc//rocm:build_defs.bzl when ROCm
is configured instead of using cuda_library with rocm_copts. Bump
rules_ml_toolchain in TensorFlow's workspace3.bzl and MODULE.bazel so
rocm_library is available in @config_rocm_hipcc.
PiperOrigin-RevId: 1003047308
Adds `'Programming Language :: Python :: 3.14'` to `CLASSIFIERS` in `setup.oss.py.tpl`, registers the Python 3.14 toolchain and `requirements_lock_3_14.txt` in `MODULE.bazel`, documents Python 3.14 support under Release 2.22.0 in `RELEASE.md`, and removes a stale comment in `ml_build/Dockerfile`.
Fixes#102890
PiperOrigin-RevId: 999653577
- Bump rules_cc from 0.2.20 to 0.2.25 in MODULE.bazel and workspace3.bzl for
both XLA and TensorFlow.
- Bump bazel_features from 1.25.0 to 1.50.0 in workspace3.bzl for both XLA and
TensorFlow to provide bazel_features.cc.cc_common_is_in_rules_cc used by
rules_cc 0.2.25 in WORKSPACE mode.
PiperOrigin-RevId: 983818634
- Explicitly define rules_cc 0.2.20 in workspace3.bzl.
- Call compatibility_proxy_repo() in WORKSPACE and workspace1.bzl to define
@cc_compatibility_proxy in WORKSPACE mode.
- Bump rules_cc to 0.2.20 in MODULE.bazel.
- Bump bazel_skylib to 1.9.0 in workspace3.bzl and MODULE.bazel to support
the 'scope' attribute on bool_flag used by rules_cc 0.2.20.
- In third_party/googleapis/build_rules.bzl.oss, load cc_proto_library from
protobuf instead of rules_cc defs.bzl, avoiding errors from the removal
of cc_proto_library in rules_cc >= 0.2.18.
PiperOrigin-RevId: 975045752
Loading rules_ml_toolchain directly in the WORKSPACE file creates a maintenance headache by requiring manual updates for each Tensorflow dependent project. To streamline this, we’ve moved the repository load into xla_workspace3.bzl. This ensures the hermetic Python toolchains are available early enough in the initialization sequence.
PiperOrigin-RevId: 905126658
- Refactor tf_wheel rule to resolve canonical repository names and pass them as environment variables.
- Update wheel target in BUILD to use external_repos list for cleaner maintenance.
- Simplify get_repo_path in build_pip_package.py to leverage these environment variables.
- Add missing pybind11_abseil dependency to import_api_packages_test_cpu.
- Ensure tests pass in both Bzlmod and non-Bzlmod environments.
Imported from GitHub PR https://github.com/tensorflow/tensorflow/pull/102891
See #62598.
Add basic bzlmod support on Linux x86 CPU. Most of the incompatibilities have been resolved.
Running tests with:
```
env TFCI=py311,linux_x86,rbe,bzlmod,no_docker ci/official/pycpp.sh
```
should pass except for those in tensorflow/tools/pip_package
A known issue is with building the wheels. The issues are two fold:
1. In particular, in WORKSPACE setup an old version of pybind11_abseil is used. I can't find a version of pybind11_abseil with bzlmod support that works.
The reason is that TensorFlow implicitly requires the `ImportStatusModule(bypass_regular_import = true)` which is not supported in latest version of pybind11_abseil.
2. The wheel building script packages some headers and python modules from external repos (XLA, TSL, local_config_cuda). Under bzlmod they will be in a different path.
pcloudy@ suggested some tricks to handle this for a single directory by passing the path as environment variable, but considering many are used for building wheels, we should find a better way.
Reasons for duplicating the patches on absl/grpc: bzlmod does not support applying patches across module boundary.
Copybara import of the project:
--
99f6ec365e83b2a188399e050ac67865888e91c2 by Yicheng Luo <ethanluoyc@gmail.com>:
Support bzlmod
Merging this change closes#102891
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/tensorflow/pull/102891 from ethanluoyc:bzlmod aa56a78ea1adce56262937ee79bcf61db530ba05
PiperOrigin-RevId: 885201845