Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

PyTorch with DirectML

DirectML acceleration for PyTorch is currently available for Public Preview. PyTorch with DirectML enables training and inference of complex machine learning models on a wide range of DirectX 12-compatible hardware.

DirectML is a high-performance, hardware-accelerated DirectX 12 library for machine learning. DirectML provides GPU acceleration for common machine learning tasks across a broad range of supported hardware and drivers, including all DirectX 12-capable GPUs from vendors such as AMD, Intel, NVIDIA, and Qualcomm.

More information about DirectML can be found in Introduction to DirectML.

PyTorch on DirectML is supported on both the latest versions of Windows 10 and the Windows Subsystem for Linux, and is available for download as a PyPI package. For more information about getting started, see GPU accelerated ML training (docs.microsoft.com)

Samples

Refer to the Pytorch with DirectML Samples Repo for samples.

Roadmap

torch-directml is actively under development and we're always adding more operators. For a list of all the operators we support and their data type coverage, refer to the PyTorch DirectML Operator Roadmap in the DirectML repository wiki. If you require support for an operator that isn't in this list, see the Feedback section below on how to file an issue.

Feedback

We look forward to hearing from you!

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Data Collection Notice

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. 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.

Specifically, in torch-directml, we are collecting the GPU device info and operators that fall back to CPU for improving operator coverage.

External Links

Release files for torch-directml 0.2.5.dev240914

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for torch-directml 0.2.5.dev240914
File
torch_directml-0.2.5.dev240914-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
torch_directml-0.2.5.dev240914-cp312-cp312-manylinux2010_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.12+ x86-64 Details
torch_directml-0.2.5.dev240914-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
torch_directml-0.2.5.dev240914-cp311-cp311-manylinux2010_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.12+ x86-64 Details
torch_directml-0.2.5.dev240914-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
torch_directml-0.2.5.dev240914-cp310-cp310-manylinux2010_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.12+ x86-64 Details
torch_directml-0.2.5.dev240914-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
torch_directml-0.2.5.dev240914-cp39-cp39-manylinux2010_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.12+ x86-64 Details
torch_directml-0.2.5.dev240914-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
torch_directml-0.2.5.dev240914-cp38-cp38-manylinux2010_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.12+ x86-64 Details

Total release size:211.0 MB

Release files / torch_directml-0.2.5.dev240914-cp312-cp312-win_amd64.whl

Download URL torch_directml-0.2.5.dev240914-cp312-cp312-win_amd64.whl
Size 9.0 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
ea19d11e33e9450b290311c06f7eb10924dd25c555e504d367b7b437d3eb24d0
BLAKE2b-256 checksum
How to use checksums
71f2eb7d3c601310c758f6aef891773e4a00f7388eeb613d536c0d2681fcb105
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.16

Release files / torch_directml-0.2.5.dev240914-cp312-cp312-manylinux2010_x86_64.whl

Download URL torch_directml-0.2.5.dev240914-cp312-cp312-manylinux2010_x86_64.whl
Size 24.9 MB
Tags CPython 3.12 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
26915aff5008a8567ea7641b74cf8cb53c1767d0c7163fc06e0a587e7c1c9dce
BLAKE2b-256 checksum
How to use checksums
47e1636e6bc0fbf7bf13a2a206f7b47ecce381335c90c0a761bac243db6c2a37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.16

Release files / torch_directml-0.2.5.dev240914-cp311-cp311-win_amd64.whl

Download URL torch_directml-0.2.5.dev240914-cp311-cp311-win_amd64.whl
Size 9.0 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
3315b6c7e898685827607f1d8170dacc386ac248502aba9bd36cf82e78d930bb
BLAKE2b-256 checksum
How to use checksums
848b00528e6c75e030cc5f1fc1d08c58c46ecdbec9cd406b1dfd03023e3af4aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.16

Release files / torch_directml-0.2.5.dev240914-cp311-cp311-manylinux2010_x86_64.whl

Download URL torch_directml-0.2.5.dev240914-cp311-cp311-manylinux2010_x86_64.whl
Size 25.0 MB
Tags CPython 3.11 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
6afb675585d30018c813e5ba203a3437073748919af8ab3e910092a0e0ec531f
BLAKE2b-256 checksum
How to use checksums
b582185f419c642751396b32195d352fd2410594c4401011d2b33c0399417f2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.16

Release files / torch_directml-0.2.5.dev240914-cp310-cp310-win_amd64.whl

Download URL torch_directml-0.2.5.dev240914-cp310-cp310-win_amd64.whl
Size 9.0 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
9fe494ffd2c8ab9079f13404d052fc261cd8efb639a776c9075e58d9c64d6cb2
BLAKE2b-256 checksum
How to use checksums
8ef9a188cc5e989881b98d3c3d8170ad95c783def75f2d544cebcb98507549fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.16

Release files / torch_directml-0.2.5.dev240914-cp310-cp310-manylinux2010_x86_64.whl

Download URL torch_directml-0.2.5.dev240914-cp310-cp310-manylinux2010_x86_64.whl
Size 24.9 MB
Tags CPython 3.10 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
30e29872f4d6059dd784897fa2df0cddb80f3874ed4f0860758790286e95a823
BLAKE2b-256 checksum
How to use checksums
a0ad14e084f9f4882cdae86f2773fbf95807f56a282b5aea9df8048302491b62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.16

Release files / torch_directml-0.2.5.dev240914-cp39-cp39-win_amd64.whl

Download URL torch_directml-0.2.5.dev240914-cp39-cp39-win_amd64.whl
Size 9.0 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
488509f0e8deb22f052b56f5cdad3a55878b65a7d99ee4b448fb4ab3cbb8d8ea
BLAKE2b-256 checksum
How to use checksums
a3bb1e9b55d1f56d899777e157322a585114b20b18888c05ddf23f2d48e91ee7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.16

Release files / torch_directml-0.2.5.dev240914-cp39-cp39-manylinux2010_x86_64.whl

Download URL torch_directml-0.2.5.dev240914-cp39-cp39-manylinux2010_x86_64.whl
Size 24.9 MB
Tags CPython 3.9 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
9c1988e95694520b31f1056bc038b76a62c9ca63f2d4e93f1abea1d293ec49ce
BLAKE2b-256 checksum
How to use checksums
2886746d81e55c8786ca8350224f2aacfb58c8e816d9cad73b90245859a48a2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.16

Release files / torch_directml-0.2.5.dev240914-cp38-cp38-win_amd64.whl

Download URL torch_directml-0.2.5.dev240914-cp38-cp38-win_amd64.whl
Size 9.0 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
6e18fb706d15cc6d0d3de49f46a7edc07ae669531c851d7d8f98855f4974f9e6
BLAKE2b-256 checksum
How to use checksums
b4d133c35c3017bc1e2236c20a3183fb874b0fe77309c788f9d053555cb7c4e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.16

Release files / torch_directml-0.2.5.dev240914-cp38-cp38-manylinux2010_x86_64.whl

Download URL torch_directml-0.2.5.dev240914-cp38-cp38-manylinux2010_x86_64.whl
Size 66.4 MB
Tags CPython 3.8 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
9b263c7d88ea225ce35b116441e1585fc753e9d69f64a8b6d83aabdc6c511517
BLAKE2b-256 checksum
How to use checksums
f79978828ee9b10ae7548fe77b8b11820a17868cb1a41379443dcdbe534587b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.16
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page