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: 3 months 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 (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-12-19T01:50:18.000Z (5 months ago)
- Last Synced: 2024-12-19T02:34:20.607Z (5 months ago)
- Topics: directml, onnx, onnxruntime
- Language: C++
- Homepage:
- Size: 315 KB
- Stars: 19
- 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/