Add build from source for DML (#20384)

This commit is contained in:
Nat Kershaw (MSFT) 2024-04-21 15:00:46 -07:00 committed by GitHub
parent f8e689f5f2
commit a3eceb52f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -87,12 +87,18 @@ Build from source and copy the include and libraries into `ORT_HOME`
On Windows
```cmd
build.bat --build_shared_lib --skip_tests --parallel [--use_cuda] --config Release
build.bat --build_shared_lib --skip_tests --parallel [--use_dml | --use_cuda] --config Release
copy include\onnxruntime\core\session\onnxruntime_c_api.h <ORT_HOME>\include
copy build\Windows\Release\Release\*.dll <ORT_HOME>\lib
copy build\Windows\Release\Release\onnxruntime.lib <ORTHOME>\lib
```
If building for DirectML
```cmd
copy include\onnxruntime\core\providers\dml\dml_provider_factory.h <ORT_HOME>\include
```
On Linux
```bash
@ -127,6 +133,13 @@ These instructions assume you already have CUDA installed.
cd ..
python build.py --cuda_home <path to cuda home> [--ort_home <ORT_HOME>]
```
### Build for DirectML
```bash
cd ..
python build.py --use_dml
```
## Install the library into your application