Commit Graph

11 Commits

Author SHA1 Message Date
A. Unique TensorFlower
805775fcb5 Refactor mechanisms of building TF wheel and storing TF project version.
This change introduces a uniform way of building the TF wheel and controlling the filename version suffixes.

A new repository rule `python_wheel_version_suffix_repository` provides information about project and wheel version suffixes. The final value depends on environment variables passed to Bazel command: `_ML_WHEEL_WHEEL_TYPE, _ML_WHEEL_BUILD_DATE, _ML_WHEEL_GIT_HASH, _ML_WHEEL_VERSION_SUFFIX`

`tf_version.bzl` defines the TF project version and loads the version suffix information calculated by `python_wheel_version_suffix_repository`.

The targets `//tensorflow/core/public:release_version, //tensorflow:tensorflow_bzl //tensorflow/tools/pip_package:setup_py` use the version chunks defined above.

The version of the wheel in the build rule output depends on the environment variables.

Environment variables combinations for creating wheels with different versions:
  * snapshot (default build rule behavior): `--repo_env=ML_WHEEL_TYPE=snapshot`
  * release: `--repo_env=ML_WHEEL_TYPE=release`
  * release candidate: `--repo_env=ML_WHEEL_TYPE=release --repo_env=ML_WHEEL_VERSION_SUFFIX=-rc1`
  * nightly build with date as version suffix: `--repo_env=ML_WHEEL_TYPE=nightly --repo_env=ML_WHEEL_BUILD_DATE=<YYYYmmdd>`
  * build with git data as version suffix: `--repo_env=ML_WHEEL_TYPE=custom --repo_env=ML_WHEEL_BUILD_DATE=$(git show -s --format=%as HEAD) --repo_env=ML_WHEEL_GIT_HASH=$(git rev-parse HEAD)`

PiperOrigin-RevId: 733444080
2025-03-04 14:39:12 -08:00
Vadym Matsishevskyi
ec90bea08d Migrate TensorFlow on newest Hermetic Python set of rules
This makes Tensorflow consistent with JAX and XLA

PiperOrigin-RevId: 647832813
2024-06-28 17:19:18 -07:00
Christian Sigg
da0884c7d4 [NFC, internal change] Polish copybara workflow file.
PiperOrigin-RevId: 352434171
Change-Id: I15d05e4fbd02d02cbb544100c92c79c0c8fdcc40
2021-01-18 11:07:07 -08:00
A. Unique TensorFlower
bd893f36c3 Export 'configure' and 'configure.py' to allow inverse dependent repos to do 'bazel run @org_tensorflow//:configure -- --workspace $(pwd)'.
PiperOrigin-RevId: 219764425
2018-11-02 01:29:58 -07:00
A. Unique TensorFlower
794b6cb85a Make LICENSE visible to bazel.
(The OSS //tensorflow/BUILD file can't see files as they are in the parent directory.)

PiperOrigin-RevId: 180578688
2018-01-02 12:37:06 -08:00
Manjunath Kudlur
e83a041dd5 Depend on protobuf's header only library when building custom ops
Change: 149501122
2017-03-07 20:46:41 -08:00
Manjunath Kudlur
07427d1b51 Automated rollback of change 148492669
Change: 148552367
2017-02-25 08:12:56 -08:00
Manjunath Kudlur
01ecd3fd51 Rollback the change to depend on header only protobuf library.
Change: 148492669
2017-02-24 13:10:21 -08:00
Manjunath Kudlur
63ad7054ad Replace dependency on entire proto library with just the headers for contrib.
- Linking a version of the entire proto library with every .so is wasteful.
- Causes duplicate destruction of the static initialized objects causing
non-deterministic crashes.
Change: 147220106
2017-02-10 18:06:48 -08:00
A. Unique TensorFlower
9a086bbbdc Replace all uses of tf.complex_abs with tf.abs.
Change: 142501037
2016-12-19 17:03:28 -08:00
A. Unique TensorFlower
fb52ade37d Automated rollback of change 131452196
Change: 131951691
2016-09-01 08:48:21 -07:00