torch-directml
by Microsoft · Framework · Text & code
A PyTorch plugin that runs model training and inference on AMD, Intel or Nvidia graphics cards under Windows through DirectX 12.
Latest · Nov 28Training an e5-small-shaped encoder at batch 16x128 ran at 582 ms/step on the RX 6700 XT with DirectML on Windows
AccessOpen codeLicenseMIT
Seen running on
| Machine | Speed | How | Seen by |
|---|---|---|---|
| 1 run on 12 GB | |||
Evidence
- Nov 28Same probe (e5-small-shaped encoder, batch 16x128): 582 ms/step on RX 6700 XT via DirectML versus 1,598 ms/step on the Ryzen 5700G CPUHands-on test
shige888 - Nov 28A training-script smoke run finished 8 steps in 12.2 s, then completed ONNX export, int8 quantization and evaluationHands-on test
shige888 - Nov 28Wheels did not match Python 3.14; a dedicated Python 3.11 venv with torch 2.4.1 and torch-directml 0.2.5 workedHands-on test
shige888 - Nov 28With an iGPU and a discrete GPU, both show up (gpu[0] iGPU, gpu[1] RX 6700 XT); without an explicit index the slower one may be pickedHands-on test
shige888 - Nov 28Known limitation confirmed: AdamW's lerp op falls back to CPU, though training still runsHands-on test
shige888