https://github.com/fdwr/onnxruntimedirectmlepsample
Little console app to run an ONNX model through ONNX Runtime via the DirectML execution provider.
https://github.com/fdwr/onnxruntimedirectmlepsample
directml onnx onnxruntime
Last synced: about 1 year ago
JSON representation
Little console app to run an ONNX model through ONNX Runtime via the DirectML execution provider.
- Host: GitHub
- URL: https://github.com/fdwr/onnxruntimedirectmlepsample
- Owner: fdwr
- License: cc0-1.0
- Created: 2022-04-06T16:54:31.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-03-18T21:13:54.000Z (over 1 year ago)
- Last Synced: 2025-03-31T22:32:45.226Z (over 1 year ago)
- Topics: directml, onnx, onnxruntime
- Language: C++
- Homepage:
- Size: 103 KB
- Stars: 23
- Watchers: 2
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: License.txt
Awesome Lists containing this project
README
# ONNX Runtime DirectML Execution Provider Sample
Dwayne Robinson 2022-04-06..2023-06-22
## What is it?
Just testing the DirectML execution provider in ONNX Runtime via D3D resources instead of CPU tensors (which incur synchronization costs). All the code is in `MainFullExample.cpp`, with `MainMinimalExample.cpp` being a much simpler introductory sample (no GPU binding and hard-coded to the given model).
## Usage
- **OS**: Windows 10+.
- **GPU**: DirectX 12 compute capable.
- **Running**: Command line app.
- **License**: [License.txt](License.txt) tldr: Do whatever you want with the code.
## Building
- Standard Visual Studio msbuild project.
- The Nuget dependencies [onnxruntime.dll 1.13](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.DirectML/) and [directml.dll 1.10.1](https://www.nuget.org/packages/Microsoft.AI.DirectML/) should automatically be copied into your build folder (and after building, it all just works 🤞).
## Related
- https://github.com/microsoft/DirectML
- https://docs.microsoft.com/en-us/windows/ai/directml/dml-intro
- https://www.nuget.org/packages/Microsoft.AI.DirectML/1.10.1
- https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.DirectML/
- https://github.com/microsoft/onnxruntime/
- https://onnx.ai/