Skip to content

Commit

Permalink
Improve generate() API build instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
natke committed Apr 2, 2024
1 parent 405d75a commit 47a3503
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions docs/genai/howto/build-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,29 +117,6 @@ 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

Two extra files are required for the DirectML build of onnxruntime-genai `dml_provider_factory.h` and `DirectML.dll`.

```cmd
cd <ORT_HOME>
curl -L https://github.com/microsoft/onnxruntime/releases/download/v1.17.1/Microsoft.ML.OnnxRuntime.DirectML.1.17.1.zip > Microsoft.ML.OnnxRuntime.DirectML.1.17.1.zip
mkdir Microsoft.ML.OnnxRuntime.DirectML.1.17.1
tar xvf Microsoft.ML.OnnxRuntime.DirectML.1.17.1.zip -C Microsoft.ML.OnnxRuntime.DirectML.1.17.1
copy Microsoft.ML.OnnxRuntime.DirectML.1.17.1\build\native\include\dml_provider_factory.h include
curl -L https://www.nuget.org/api/v2/package/Microsoft.AI.DirectML/1.13.1 > Microsoft.AI.DirectML.1.13.1.nupkg
mkdir Microsoft.AI.DirectML.1.13.1
tar xvf Microsoft.AI.DirectML.1.13.1.nupkg -C Microsoft.AI.DirectML.1.13.1
copy Microsoft.AI.DirectML.1.13.1\bin\x64-win\DirectML.dll lib
```

After the extra files have been copied into <ORT HOME>, build onnxruntime-genai as follows:

```bash
python build.py --use_dml [--ort_home <ORT_HOME>]
```


### Install the library into your application

Expand Down

0 comments on commit 47a3503

Please sign in to comment.