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.17k stars 288 forks source link

A numpy/cupy project on top of Directml #32

Open limapedro opened 4 years ago

limapedro commented 4 years ago

Hi, I'd like to know if the team behind directml has plans to release a like-numpy/cupy library using Directx 12 for computing, this would open up for a lot of possibilities, since a lot of numerical libraries use numpy for computing, having an option to accelarate such operations, I can see pandas using this, and many researchers implementing tools for this. I also would like to have info on how to use the low-level math ops from directml.

wchao1115 commented 4 years ago

@limapedro Thanks for the suggestion. We currently have no plan for a Cupy-like library on DX, but it's an interesting thought. I can see how that can be useful to libraries already supporting numpy semantics but want compute to run on all the GPU.

As for your last sentence, it sounds like you're asking how to access directml core functionality without passing through TensorFlow? Can you tell me more about the scenario you have in mind?

PhoenixDai commented 2 years ago

@wchao1115 I'm also very interested in using low-level math ops from directml. Our team developped an algorithm realies heavily on numpy's tensor / matrix operations like einsum, tensordot, matmul etc. because the numpy APIs are so easy to get started. Now we need to speed up the algorithm to meet real-time needs in a production environment that has no Nvidia GPUs. So we are looking into directml now but can't figure out how to do tensor (matrix) multiplications with directml.