TensorFlow for macOS 11.0+ accelerated using Apple's ML Compute framework. Friday, Nov 20, 2020
GitHUB SOURCE : https://github.com/apple/tensorflow_macos/
Mac-optimized TensorFlow and TensorFlow Addons
This pre-release delivers hardware-accelerated TensorFlow and TensorFlow Addons for macOS 11.0+. Native hardware acceleration is supported on Macs with M1 and Intel-based Macs through Apple’s ML Compute framework.
- TensorFlow r2.4rc0
- TensorFlow Addons 0.11.2
- macOS 11.0+
- Python 3.8, available from the Xcode Command Line Tools
An archive containing Python packages and an installation script can be downloaded from the releases.
To quickly try this out, copy and paste the following into Terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/apple/tensorflow_macos/master/scripts/download_and_install.sh)"
This will verify your system, ask you for confirmation, then create a virtual environment with TensorFlow for macOS installed.
Alternatively, download the archive file from the releases. The archive contains an installation script, accelerated versions of TensorFlow, TensorFlow Addons, and needed dependencies.
For Macs with M1, the following packages are currently unavailable:
- SciPy and dependent packages
- Server/Client TensorBoard packages
ISSUES AND FEEDBACK
Feedback is welcomed!
Please submit feature requests or report issues via GitHub Issues.
Device Selection (Optional)
It is not necessary to make any changes to your existing TensorFlow scripts to use ML Compute as a backend for TensorFlow and TensorFlow Addons.
There is an optional
mlcompute.set_mlc_device(device_name=’any') API for ML Compute device selection. The default value for
'any’, which means ML Compute will select the best available device on your system, including multiple GPUs on multi-GPU configurations. Other available options are
‘gpu’. Please note that in eager mode, ML Compute will use the CPU. For example, to choose the CPU device, you may do the following:
# Import mlcompute module to use the optional set_mlc_device API for device selection with ML Compute. from tensorflow.python.compiler.mlcompute import mlcompute # Select CPU device. mlcompute.set_mlc_device(device_name=‘cpu’) # Available options are 'cpu', 'gpu', and ‘any'.
Article Title: TensorFlow for macOS 11.0+ accelerated using Apple's ML Compute framework.
This article URL：TensorFlow for macOS 11.0+ accelerated using Apple's ML Compute framework.
Github Trending Repositories
Explore Github Trending Repositories. See what the GitHub community is most excited about today.