🌐 AI搜索 & 代理 主页
Backport Windows builds into 2.18 for 2.18.1 (#88848)

* Update scripts/configs for Windows nightly/release builds.

`set -u` (does not allow unbound variables) has been removed from all scripts.
This is due to Docker on Windows treating variables in an env file,
set to an empty value (`MY_VAR=`), as unbound variables. Consequently,
these variables, even though they are "set", do not make it into the Docker
container at all, and various checks for those variables fail outright.

PiperOrigin-RevId: 713717958

(cherry picked from commit fa3b3c1a0d1d0d81e31bdb92e1fa3dc2f440c23f)

* Fix up the 2022 Win RBE config.

PiperOrigin-RevId: 718920772

(cherry picked from commit 82ba59a6465b2e1e30c0d41a8a43347187ff3b17)

* Adjust the wheel.sh, libtensorflow.sh scripts to be Win-compatible for upload.

Temporary workaround.

PiperOrigin-RevId: 719027529
(cherry picked from commit 7513f771aa0b5b75b799aaf09d361ff90adc3d49)

* Add a workaround for gsutil not working properly on MSYS2.

PiperOrigin-RevId: 719389902
(cherry picked from commit 9ab2fee32ac8d611a946c70e0ded8f0e9d95e1ab)

* Add the missing wheel name specification for Windows.

PiperOrigin-RevId: 720176067
(cherry picked from commit 768059fbc581c6d80ac260e8ad4a2d8dc86bbcec)

* Allow building identical wheels under additional names.

Currently only needed for Windows, since the same wheel is uploaded
to both tensorflow_cpu, and tensorflow PyPi repos,
but different names/metadata are needed.

PiperOrigin-RevId: 720313792

(cherry picked from commit a93dc78944554b2c74149b31eebf06ef01c41526)

* Actually copy the extra wheels into the expected directory afterwards.

PiperOrigin-RevId: 720753829
(cherry picked from commit 6ba7e4e33ddfa5027fdc8016db623af35f5beec3)
47 files changed
tree: e49007b296bfa84c6694d408a2cb53c5b3cfc015
  1. .github/
  2. ci/
  3. tensorflow/
  4. third_party/
  5. tools/
  6. .bazelignore
  7. .bazelrc
  8. .bazelversion
  9. .clang-format
  10. .gitignore
  11. .zenodo.json
  12. arm_compiler.BUILD
  13. AUTHORS
  14. BUILD
  15. CITATION.cff
  16. CODE_OF_CONDUCT.md
  17. CODEOWNERS
  18. configure
  19. configure.cmd
  20. configure.py
  21. CONTRIBUTING.md
  22. ISSUES.md
  23. LICENSE
  24. models.BUILD
  25. README.md
  26. RELEASE.md
  27. requirements_lock_3_10.txt
  28. requirements_lock_3_11.txt
  29. requirements_lock_3_12.txt
  30. requirements_lock_3_9.txt
  31. SECURITY.md
  32. WORKSPACE
README.md

Python PyPI DOI CII Best Practices OpenSSF Scorecard Fuzzing Status Fuzzing Status OSSRank Contributor Covenant TF Official Continuous TF Official Nightly

Documentation
Documentation

TensorFlow is an end-to-end open source platform for machine learning. It has a comprehensive, flexible ecosystem of tools, libraries, and community resources that lets researchers push the state-of-the-art in ML and developers easily build and deploy ML-powered applications.

TensorFlow was originally developed by researchers and engineers working within the Machine Intelligence team at Google Brain to conduct research in machine learning and neural networks. However, the framework is versatile enough to be used in other areas as well.

TensorFlow provides stable Python and C++ APIs, as well as a non-guaranteed backward compatible API for other languages.

Keep up-to-date with release announcements and security updates by subscribing to announce@tensorflow.org. See all the mailing lists.

Install

See the TensorFlow install guide for the pip package, to enable GPU support, use a Docker container, and build from source.

To install the current release, which includes support for CUDA-enabled GPU cards (Ubuntu and Windows):

$ pip install tensorflow

Other devices (DirectX and MacOS-metal) are supported using Device plugins.

A smaller CPU-only package is also available:

$ pip install tensorflow-cpu

To update TensorFlow to the latest version, add --upgrade flag to the above commands.

Nightly binaries are available for testing using the tf-nightly and tf-nightly-cpu packages on PyPi.

Try your first TensorFlow program

$ python
>>> import tensorflow as tf
>>> tf.add(1, 2).numpy()
3
>>> hello = tf.constant('Hello, TensorFlow!')
>>> hello.numpy()
b'Hello, TensorFlow!'

For more examples, see the TensorFlow tutorials.

Contribution guidelines

If you want to contribute to TensorFlow, be sure to review the contribution guidelines. This project adheres to TensorFlow's code of conduct. By participating, you are expected to uphold this code.

We use GitHub issues for tracking requests and bugs, please see TensorFlow Forum for general questions and discussion, and please direct specific questions to Stack Overflow.

The TensorFlow project strives to abide by generally accepted best practices in open-source software development.

Patching guidelines

Follow these steps to patch a specific version of TensorFlow, for example, to apply fixes to bugs or security vulnerabilities:

  • Clone the TensorFlow repo and switch to the corresponding branch for your desired TensorFlow version, for example, branch r2.8 for version 2.8.
  • Apply (that is, cherry-pick) the desired changes and resolve any code conflicts.
  • Run TensorFlow tests and ensure they pass.
  • Build the TensorFlow pip package from source.

Continuous build status

You can find more community-supported platforms and configurations in the TensorFlow SIG Build community builds table.

Official Builds

Build TypeStatusArtifacts
Linux CPUStatusPyPI
Linux GPUStatusPyPI
Linux XLAStatusTBA
macOSStatusPyPI
Windows CPUStatusPyPI
Windows GPUStatusPyPI
AndroidStatusDownload
Raspberry Pi 0 and 1StatusPy3
Raspberry Pi 2 and 3StatusPy3
Libtensorflow MacOS CPUStatus Temporarily UnavailableNightly Binary Official GCS
Libtensorflow Linux CPUStatus Temporarily UnavailableNightly Binary Official GCS
Libtensorflow Linux GPUStatus Temporarily UnavailableNightly Binary Official GCS
Libtensorflow Windows CPUStatus Temporarily UnavailableNightly Binary Official GCS
Libtensorflow Windows GPUStatus Temporarily UnavailableNightly Binary Official GCS

Resources

Learn more about the TensorFlow community and how to contribute.

Courses

License

Apache License 2.0