Skip to content

Commit

Permalink
Add build from source for DML (#20384)
Browse files Browse the repository at this point in the history
  • Loading branch information
natke authored Apr 21, 2024
1 parent f8e689f commit a3eceb5
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion docs/genai/howto/build-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit a3eceb5

Please sign in to comment.