From a3eceb52f3be77f7ba2a3f3e12951e87f1257baf Mon Sep 17 00:00:00 2001 From: "Nat Kershaw (MSFT)" Date: Sun, 21 Apr 2024 15:00:46 -0700 Subject: [PATCH] Add build from source for DML (#20384) --- docs/genai/howto/build-from-source.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/genai/howto/build-from-source.md b/docs/genai/howto/build-from-source.md index a8b2b9e559..1b0abf2fca 100644 --- a/docs/genai/howto/build-from-source.md +++ b/docs/genai/howto/build-from-source.md @@ -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 \include copy build\Windows\Release\Release\*.dll \lib copy build\Windows\Release\Release\onnxruntime.lib \lib ``` +If building for DirectML + +```cmd +copy include\onnxruntime\core\providers\dml\dml_provider_factory.h \include +``` + On Linux ```bash @@ -127,6 +133,13 @@ These instructions assume you already have CUDA installed. cd .. python build.py --cuda_home [--ort_home ] ``` + +### Build for DirectML + +```bash +cd .. +python build.py --use_dml +``` ## Install the library into your application