diff --git a/ports/directml/portfile.cmake b/ports/directml/portfile.cmake index 283ddaf1..b680db4c 100644 --- a/ports/directml/portfile.cmake +++ b/ports/directml/portfile.cmake @@ -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( @@ -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") @@ -45,9 +50,6 @@ 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() @@ -55,10 +57,11 @@ else() 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") diff --git a/ports/directml/vcpkg.json b/ports/directml/vcpkg.json index 5d3df4a6..d1348c4d 100644 --- a/ports/directml/vcpkg.json +++ b/ports/directml/vcpkg.json @@ -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, ", diff --git a/ports/nvidia-cutlass/fix-cmake.patch b/ports/nvidia-cutlass/fix-cmake.patch new file mode 100644 index 00000000..04544c4a --- /dev/null +++ b/ports/nvidia-cutlass/fix-cmake.patch @@ -0,0 +1,50 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 114d793..7a05453 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -668,7 +668,7 @@ include(CTest) + enable_testing() + + if (CUTLASS_ENABLE_GTEST_UNIT_TESTS) +- include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/googletest.cmake) ++ find_package(GTest CONFIG REQUIRED) # GTest::gtest GTest::gmock + endif() + + if (NOT TARGET test_all) +diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt +index 16252a0..800ffc6 100644 +--- a/test/unit/CMakeLists.txt ++++ b/test/unit/CMakeLists.txt +@@ -42,7 +42,7 @@ target_link_libraries( + CUTLASS + cutlass_tools_util_includes + $<$:nvidia::cublas> +- gtest ++ GTest::gtest + cudart + cuda_driver + ) +@@ -84,7 +84,7 @@ function(cutlass_test_unit_add_executable NAME) + target_link_libraries( + ${NAME} + PUBLIC +- gtest ++ GTest::gtest + ) + else() + target_link_libraries( +diff --git a/test/unit/core/CMakeLists.txt b/test/unit/core/CMakeLists.txt +index 965c050..a11c0e8 100644 +--- a/test/unit/core/CMakeLists.txt ++++ b/test/unit/core/CMakeLists.txt +@@ -45,6 +45,10 @@ cutlass_test_unit_add_executable( + functional.cu + ) + ++target_include_directories(cutlass_test_unit_core PUBLIC ++ $ ++ $ ++) + # + # CUTLASS 3x increases the host compiler requirements to C++17. However, there are + # certain existing integrations that will benefit from maintaining C++11 compatibility. diff --git a/ports/nvidia-cutlass/portfile.cmake b/ports/nvidia-cutlass/portfile.cmake new file mode 100644 index 00000000..8fd7d036 --- /dev/null +++ b/ports/nvidia-cutlass/portfile.cmake @@ -0,0 +1,60 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO NVIDIA/cutlass + REF v3.4.0 + SHA512 6debdfa0ffbb9c14293619a281e864ac16592f64856e4a54ae456a79cbce3ec2f5068031f4eae589e72fb10c3c61f1fa6d3fa14650754a27c4b12e14774e7f75 + PATCHES + fix-cmake.patch + HEAD_REF main +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tools CUTLASS_ENABLE_TOOLS + tools CUTLASS_ENABLE_PROFILER + test CUTLASS_ENABLE_TESTS + test CUTLASS_ENABLE_GTEST_UNIT_TESTS + test CUTLASS_INSTALL_TESTS +) + +if("tools" IN_LIST FEATURES) + x_vcpkg_get_python_packages( + PYTHON_VERSION 3 + PACKAGES numpy + OUT_PYTHON_VAR PYTHON3 + ) + get_filename_component(PYTHON_PATH "${PYTHON3}" PATH) +else() + vcpkg_find_acquire_program(PYTHON3) + get_filename_component(PYTHON_PATH "${PYTHON3}" PATH) +endif() +vcpkg_add_to_path(PREPEND "${PYTHON_PATH}") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} + -DCUTLASS_REVISION:STRING=v3.4.0 + -DCUTLASS_ENABLE_HEADERS_ONLY=ON + -DCUTLASS_ENABLE_LIBRARY=ON + -DCUTLASS_ENABLE_EXAMPLES=OFF + -DCUTLASS_ENABLE_PERFORMANCE=OFF + -DCUTLASS_LIBRARY_OPERATIONS:STRING=all + -DCUTLASS_LIBRARY_KERNELS:STRING=all + -DPython3_EXECUTABLE:FILEPATH=${PYTHON3} + MAYBE_UNUSED_VARIABLES + CUTLASS_LIBRARY_OPERATIONS +) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/NvidiaCutlass PACKAGE_NAME NvidiaCutlass) + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug" + "${CURRENT_PACKAGES_DIR}/test" + "${CURRENT_PACKAGES_DIR}/lib" +) +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt") diff --git a/ports/nvidia-cutlass/vcpkg.json b/ports/nvidia-cutlass/vcpkg.json new file mode 100644 index 00000000..9b5eee77 --- /dev/null +++ b/ports/nvidia-cutlass/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "nvidia-cutlass", + "version-semver": "3.4.0", + "description": "CUDA Templates for Linear Algebra Subroutines", + "homepage": "https://github.com/NVIDIA/cutlass", + "license": "BSD-3-Clause", + "dependencies": [ + "cuda", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/test/azure-port-arm64-windows.txt b/test/azure-port-arm64-windows.txt index 5df976da..b7298152 100644 --- a/test/azure-port-arm64-windows.txt +++ b/test/azure-port-arm64-windows.txt @@ -1,2 +1,3 @@ libdispatch tensorflow-lite +onnxruntime[directml] diff --git a/test/self-hosted-cuda.json b/test/self-hosted-cuda.json index 0210bceb..f9875958 100644 --- a/test/self-hosted-cuda.json +++ b/test/self-hosted-cuda.json @@ -14,6 +14,7 @@ "platform": "x64 & windows" }, "nvidia-cnmem", + "nvidia-cutlass", "nvidia-tools-extension-sdk", "nvidia-triton-common", "nvidia-triton-core", diff --git a/versions/baseline.json b/versions/baseline.json index 58fbf023..bc81cb8e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -25,7 +25,7 @@ "port-version": 0 }, "directml": { - "baseline": "1.13.0", + "baseline": "1.13.1", "port-version": 0 }, "dlpack": { @@ -92,6 +92,10 @@ "baseline": "2018-11-28", "port-version": 0 }, + "nvidia-cutlass": { + "baseline": "3.4.0", + "port-version": 0 + }, "nvidia-tools-extension-sdk": { "baseline": "3.1.0", "port-version": 0 diff --git a/versions/d-/directml.json b/versions/d-/directml.json index d9ba6e5e..59c8f49b 100644 --- a/versions/d-/directml.json +++ b/versions/d-/directml.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "aa4bc85c9d05b6aecb312b23f26f9d3c5014f5c8", + "version-semver": "1.13.1", + "port-version": 0 + }, { "git-tree": "b8621fdac36cd2db3cea051d27b8b2e8eb8dfb33", "version-semver": "1.13.0", diff --git a/versions/n-/nvidia-cutlass.json b/versions/n-/nvidia-cutlass.json new file mode 100644 index 00000000..d9c50cb3 --- /dev/null +++ b/versions/n-/nvidia-cutlass.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "75c26a2bd20f4cbd49b9ed5189b9eb2a21e30007", + "version-semver": "3.4.0", + "port-version": 0 + } + ] +}