DirectML PluggableDevice plugin for TensorFlow 2
APACHE-2.0 License
⚠️ Development of TensorFlow-DirectML-Plugin has been paused until further notice. To take advantage of the latest DirectML features and performance improvements for inference scenarios, we recommend taking a look at ONNX Runtime. ⚠️
TensorFlow is an end-to-end open source platform for machine learning. This repository is an implementation of TensorFlow's Pluggable Device API that leverages DirectML to provide cross-vendor hardware acceleration on Windows 10 and the Windows Subsystem for Linux (WSL). TensorFlow with DirectML enables training and inference of complex machine learning models on a wide range of DirectX 12-compatible hardware.
You can also contact us directly at [email protected].
TensorFlow DirectML Plugin is in early development and is not supported for production yet. For production scenarios, use TensorFlow 1.15 with DirectML instead.
TensorFlow DirectML Plugin only works with the tensorflow-cpu>=2.12
package, not tensorflow
or tensorflow-gpu
. To install the package, run the following commands:
pip install tensorflow-directml-plugin
If tensorflow-cpu
hasn't already been already installed, version 2.10.0 will automatically be installed.
The following resources provide additional background on DirectML and TensorFlow:
If you would like to contribute to tensorflow-directml-plugin, please see our contribution guidelines and read the Microsoft Open Source Code of Conduct. We use GitHub issues for tracking requests and bugs. Please do not report security vulnerabilities through public GitHub issues. See SECURITY.md for more details.
See BUILD.md for instructions on how to produce private builds of tensorflow-directml-plugin.
This project is licensed under MIT License.
Some files and code snippets originate from the TensorFlow repository and are licensed under the Apache License 2.0.
The tensorflow-directml-plugin Python wheel binary package includes a redistributable version of the DirectML library, which is downloaded automatically as a part of the build. The use of the redistributable DirectML library is governed by a separate license that is found as part of the package (found in tensorflow-plugins/directml/DirectML_LICENSE.txt
when extracted).
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft's privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
The official builds of tensorflow-directml-plugin (hosted on PyPI) and the nightly builds uploaded by GitHub Actions have data collection enabled. This telemetry is enabled when building with --config=dml_telemetry
(i.e. the --telemetry
switch in build.py
), but it is disabled by default for local builds.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
TensorFlow, the TensorFlow logo and any related marks are trademarks of Google Inc.