Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
snnn committed Feb 7, 2025
1 parent 616f70a commit 758342a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
5 changes: 4 additions & 1 deletion cmake/external/dml.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ else()
endif()
endif()

if(onnxruntime_USE_VCPKG){
find_package(directx-headers CONFIG REQUIRED)
else()
onnxruntime_fetchcontent_declare(
directx_headers
URL ${DEP_URL_directx_headers}
Expand All @@ -109,5 +112,5 @@ onnxruntime_fetchcontent_declare(

FetchContent_Populate(directx_headers)
set(directx_headers_INCLUDE_DIRS "${directx_headers_SOURCE_DIR}/include")

include_directories(BEFORE ${directx_headers_INCLUDE_DIRS})
endif()
3 changes: 3 additions & 0 deletions cmake/onnxruntime_providers_dml.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
onnxruntime_add_include_to_target(onnxruntime_providers_dml
onnxruntime_common onnxruntime_framework onnx onnx_proto ${PROTOBUF_LIB} flatbuffers::flatbuffers Boost::mp11 safeint_interface ${WIL_TARGET}
)
if(TARGET Microsoft::DirectX-Headers)
onnxruntime_add_include_to_target(onnxruntime_providers_dml Microsoft::DirectX-Headers)
endif()
add_dependencies(onnxruntime_providers_dml ${onnxruntime_EXTERNAL_DEPENDENCIES})
target_include_directories(onnxruntime_providers_dml PRIVATE
${ONNXRUNTIME_ROOT}
Expand Down
6 changes: 6 additions & 0 deletions cmake/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@
"dependencies": [
"fp16"
]
},
"dml-ep": {
"description": "Build with CoreML EP",
"dependencies": [
"directx-headers"
]
}
},
"overrides": [
Expand Down
4 changes: 2 additions & 2 deletions tools/ci_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1077,9 +1077,9 @@ def generate_vcpkg_install_options(source_dir, args):
"--x-asset-sources=x-azurl,https://vcpkg.storage.devpackages.microsoft.io/artifacts/\\;x-block-origin"
)
if SYSTEM_COLLECTIONURI == "https://dev.azure.com/onnxruntime/":
vcpkg_install_options.append("--binarysource=x-az-universal,onnxruntime,onnxruntime,onnxruntime,rw")
vcpkg_install_options.append("--binarysource=x-az-universal,onnxruntime,onnxruntime,onnxruntime,readwrite")
elif SYSTEM_COLLECTIONURI == "https://dev.azure.com/aiinfra/" or SYSTEM_COLLECTIONURI == "https://aiinfra.visualstudio.com/":
vcpkg_install_options.append("--binarysource=x-az-universal,aiinfra,Lotus,Lotus,rw")
vcpkg_install_options.append("--binarysource=x-az-universal,aiinfra,Lotus,Lotus,readwrite")
# Config binary cache
return vcpkg_install_options

Expand Down

0 comments on commit 758342a

Please sign in to comment.