microsoft / DirectML

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.
MIT License
2.16k stars 286 forks source link

Will DirectML inside WSL supported on Windows-on-Arm? #24

Open ZHOUYue67 opened 4 years ago

ZHOUYue67 commented 4 years ago

It will be great to be able to develop using Surface Pro X!

jstoecker commented 4 years ago

@MikeChou : we do expect DirectML to support ARM64 in WSL at some point, but it isn't an initial focus. The hurdle isn't building libdirectml.so for ARM, but rather that driver support and (to a lesser extent) ML framework support is required before this scenario is useful.

SpontaneousDuck commented 4 years ago

The first paragraph of the README states they will support Qualcomm GPUS so that would suggest ARM maybe?

jstoecker commented 4 years ago

DirectML already supports ARM (and Qualcomm GPUs) on Windows, but there's an extra piece when it comes to WSL: each hardware vendor must implement their Direct3D 12 user-mode driver as a native Linux library. You can find more technical details on how the DirectX stack works in WSL in this blog post. Secondly, each ML framework -- or application/library built on top of DML -- must also compile for ARM. We've started by building DML support in TensorFlow, but there aren't any official ARM builds of (non-lite) TF at the moment.

These are two of the reasons we haven't prioritized this particular scenario, but it is unique and definitely would be cool!

DX in WSL

Gerdya commented 4 years ago

Can you confirm the following summary: 1) UMD d3d12 driver from Qualcomm is missing 2) libdirectml compiles for ARM without issues (but is possibly not tested) 3) tensorflow-directML framework compiles for ARM without issues (but is possibly not tested)

Thanks in advance!

jstoecker commented 4 years ago
  1. UMD d3d12 driver from Qualcomm is missing

Yes (assuming you mean in WSL).

  1. libdirectml compiles for ARM without issues (but is possibly not tested)

Yes.

  1. tensorflow-directML framework compiles for ARM without issues (but is possibly not tested)

Not quite. We haven't even tried building TF for ARM. I suspect it would require at least a few minor changes to get TF to compile for ARM, but the exact extent isn't clear to me. Once we have the source opened up (working on it) this could be minor issue to address.

Gerdya commented 4 years ago

Thanks for the feedback. Yes, i did mean the UM driver on the Linux side. I use WSL2 one my Surface Pro X very regular- i did even compile VcXsrv (X-Server) for native ARM64 under Windows such that i have a fast Linux GUI :)