Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
/ dxpy Public archive

DirectX Python Runtime

License

Notifications You must be signed in to change notification settings

wenxcs-msft/dxpy

Repository files navigation

dxpy : Native WSL DirectX Python Runtime

dxpy is a simple runtime to test your DirectX kernel in WSL.

git clone --recursive https://github.com/wenxcs/dxpy.git
pip install -r dxpy/requirements.txt
git clone git@github.com:microsoft/nnfusion.git
python dxpy --operator-name=TopK --nnfusion-home=nnfusion/src/contrib

Source code comment

src/runtime : Native DirectX Runtime to 1. Compile HLSL into DXIL kernel; 2. Launch DXIL kernel through /dev/dxg;
src/pybind : Source code for binding above runtime with Python module;
__main__.py : 1. Compile above native code if necessary; 2. Invoke script in NNFUSION_HOME/src/contrib/script to get operator's test cases and kernels; 3. Check kernel correctness;

Requirement

  1. WSL and DirectX user mode driver: Link
  2. Python3 enviroment
  3. CMake and C++ compiler

Related Projects

  1. DirectX Shader Compiler
    In Linux, original DirectX Shader Compiler (1)disables reflection blob and (2)has different IUnknown interface. So we have a patched repo in here: https://github.com/nnfusion/DirectXShaderCompiler
  2. DirectX-Headers
    Original d3d12shader.h has some issue in WSL but it works in Windows.

About

DirectX Python Runtime

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published