Skip to content

Commit

Permalink
[directml] Update to 1.13.1 (#174)
Browse files Browse the repository at this point in the history
* [directml] update to 1.13.1

* support x64-xbox-scarlett

* [directml] update baseline

* [directml] remove debug bin/lib install

* ci: test onnxruntime[directml]

* Revert "ci: test onnxruntime[directml]"

This reverts commit ec9f018.

* ci: test onnxruntime[directml] in ARM Windows
  • Loading branch information
luncliff authored Feb 13, 2024
1 parent f879429 commit 62f3782
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
15 changes: 9 additions & 6 deletions ports/directml/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set(ENV{NUGET_PACKAGES} "${BUILDTREES_DIR}/nuget")

# see https://www.nuget.org/packages/Microsoft.AI.DirectML/
set(PACKAGE_NAME "Microsoft.AI.DirectML")
set(PACKAGE_VERSION "1.13.0")
set(PACKAGE_VERSION "1.13.1")

file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${PACKAGE_NAME}")
vcpkg_execute_required_process(
Expand All @@ -17,11 +17,16 @@ vcpkg_execute_required_process(

get_filename_component(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${PACKAGE_NAME}.${PACKAGE_VERSION}" ABSOLUTE)
if(VCPKG_TARGET_IS_WINDOWS)
# todo: x64-xbox?
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(TRIPLE "x64-win")
# check community triplets...
if(DEFINED VCPKG_XBOX_CONSOLE_TARGET AND (VCPKG_XBOX_CONSOLE_TARGET MATCHES "scarlett"))
set(TRIPLE "x64-xbox-scarlett-231000")
endif()
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(TRIPLE "x86-win")
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64ec")
set(TRIPLE "arm64ec-win")
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
set(TRIPLE "arm64-win")
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
Expand All @@ -45,20 +50,18 @@ if(VCPKG_TARGET_IS_WINDOWS)
file(INSTALL "${SOURCE_PATH}/bin/${TRIPLE}/DirectML.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
file(INSTALL "${SOURCE_PATH}/bin/${TRIPLE}/DirectML.Debug.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
file(INSTALL "${SOURCE_PATH}/bin/${TRIPLE}/DirectML.Debug.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
# debug/release will use same copy
file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin")
file(INSTALL "${CURRENT_PACKAGES_DIR}/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
elseif(VCPKG_TARGET_IS_LINUX)
file(INSTALL "${SOURCE_PATH}/bin/${TRIPLE}/libdirectml.so" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
else()
message(FATAL_ERROR "The target platform is not supported")
endif()

file(INSTALL "${SOURCE_PATH}/include/" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")

file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
file(INSTALL "${SOURCE_PATH}/LICENSE-CODE.txt"
"${SOURCE_PATH}/README.md"
"${SOURCE_PATH}/ThirdPartyNotices.txt"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
2 changes: 1 addition & 1 deletion ports/directml/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "directml",
"version-semver": "1.13.0",
"version-semver": "1.13.1",
"description": [
"DirectML is a high-performance, hardware-accelerated DirectX 12 library for machine learning.",
"DirectML provides GPU acceleration for common machine learning tasks across a broad range of supported hardware and drivers, ",
Expand Down
1 change: 1 addition & 0 deletions test/azure-port-arm64-windows.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
libdispatch
tensorflow-lite
onnxruntime[directml]
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"port-version": 0
},
"directml": {
"baseline": "1.13.0",
"baseline": "1.13.1",
"port-version": 0
},
"dlpack": {
Expand Down
5 changes: 5 additions & 0 deletions versions/d-/directml.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "aa4bc85c9d05b6aecb312b23f26f9d3c5014f5c8",
"version-semver": "1.13.1",
"port-version": 0
},
{
"git-tree": "b8621fdac36cd2db3cea051d27b8b2e8eb8dfb33",
"version-semver": "1.13.0",
Expand Down

0 comments on commit 62f3782

Please sign in to comment.