From 8c03f78a66b4de62aea4455a0653b627709675b4 Mon Sep 17 00:00:00 2001 From: Park DongHa Date: Sat, 2 Apr 2022 23:43:27 +0900 Subject: [PATCH 01/14] [cpuinfo] update to latest * use official support of CMake find_package --- ports/cpuinfo/fix-install.patch | 81 --------------------------------- ports/cpuinfo/portfile.cmake | 47 +++++++++++-------- ports/cpuinfo/vcpkg.json | 13 +++++- 3 files changed, 41 insertions(+), 100 deletions(-) delete mode 100644 ports/cpuinfo/fix-install.patch diff --git a/ports/cpuinfo/fix-install.patch b/ports/cpuinfo/fix-install.patch deleted file mode 100644 index 86080f52290151..00000000000000 --- a/ports/cpuinfo/fix-install.patch +++ /dev/null @@ -1,81 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e2d7d53..6d380e9 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -15,6 +15,28 @@ OPTION(CPUINFO_BUILD_UNIT_TESTS "Build cpuinfo unit tests" ON) - OPTION(CPUINFO_BUILD_MOCK_TESTS "Build cpuinfo mock tests" ON) - OPTION(CPUINFO_BUILD_BENCHMARKS "Build cpuinfo micro-benchmarks" ON) - -+# Configuration -+set(config_install_dir "lib/cmake/unofficial-${PROJECT_NAME}") -+set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated") -+set(project_config "${generated_dir}/unofficial-${PROJECT_NAME}Config.cmake") -+set(targets_export_name "unofficial-${PROJECT_NAME}Targets") -+set(namespace "unofficial::${PROJECT_NAME}::") -+ -+# Include module with fuction 'write_basic_package_version_file' -+include(CMakePackageConfigHelpers) -+configure_package_config_file( -+ "cmake/Config.cmake.in" -+ "${project_config}" -+ INSTALL_DESTINATION "${config_install_dir}" -+) -+install(FILES "${project_config}" -+ DESTINATION "${config_install_dir}" -+) -+install(EXPORT "${targets_export_name}" -+ NAMESPACE "${namespace}" -+ DESTINATION "${config_install_dir}" -+) -+ - # ---[ CMake options - INCLUDE(GNUInstallDirs) - -@@ -210,7 +232,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN|MSYS)$") - TARGET_COMPILE_DEFINITIONS(cpuinfo_internals PRIVATE _WIN32_WINNT=0x0601) - ENDIF() - SET_TARGET_PROPERTIES(cpuinfo PROPERTIES PUBLIC_HEADER include/cpuinfo.h) --TARGET_INCLUDE_DIRECTORIES(cpuinfo BEFORE PUBLIC include) -+TARGET_INCLUDE_DIRECTORIES(cpuinfo BEFORE PUBLIC $ $) - TARGET_INCLUDE_DIRECTORIES(cpuinfo BEFORE PRIVATE src) - TARGET_INCLUDE_DIRECTORIES(cpuinfo_internals BEFORE PUBLIC include src) - IF(CPUINFO_LOG_LEVEL STREQUAL "default") -@@ -261,6 +283,7 @@ TARGET_LINK_LIBRARIES(cpuinfo PRIVATE clog) - TARGET_LINK_LIBRARIES(cpuinfo_internals PRIVATE clog) - - INSTALL(TARGETS cpuinfo -+ EXPORT "${targets_export_name}" - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in -new file mode 100644 -index 0000000..9b4c9ee ---- /dev/null -+++ b/cmake/Config.cmake.in -@@ -0,0 +1,4 @@ -+@PACKAGE_INIT@ -+ -+include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") -+check_required_components("@PROJECT_NAME@") -diff --git a/deps/clog/CMakeLists.txt b/deps/clog/CMakeLists.txt -index 083f519..43b5c78 100644 ---- a/deps/clog/CMakeLists.txt -+++ b/deps/clog/CMakeLists.txt -@@ -57,7 +57,7 @@ SET_TARGET_PROPERTIES(clog PROPERTIES - C_EXTENSIONS NO) - CLOG_TARGET_RUNTIME_LIBRARY(clog) - SET_TARGET_PROPERTIES(clog PROPERTIES PUBLIC_HEADER include/clog.h) --TARGET_INCLUDE_DIRECTORIES(clog BEFORE PUBLIC include) -+TARGET_INCLUDE_DIRECTORIES(clog PUBLIC $ $) - IF(CLOG_LOG_TO_STDIO) - TARGET_COMPILE_DEFINITIONS(clog PRIVATE CLOG_LOG_TO_STDIO=1) - ELSE() -@@ -68,6 +68,7 @@ IF(ANDROID AND NOT CLOG_LOG_TO_STDIO) - ENDIF() - - INSTALL(TARGETS clog -+ EXPORT ${targets_export_name} - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" - PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") diff --git a/ports/cpuinfo/portfile.cmake b/ports/cpuinfo/portfile.cmake index c670c0459b0d54..a8c3078c69248a 100644 --- a/ports/cpuinfo/portfile.cmake +++ b/ports/cpuinfo/portfile.cmake @@ -1,14 +1,14 @@ # On Windows, we can get a cpuinfo.dll, but it exports no symbols. -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pytorch/cpuinfo - REF 5916273f79a21551890fd3d56fc5375a78d1598d - SHA512 50e537b61d991e8579577fb1ecf8d9ceb2171dbad96dfe159a062eadfdc0b2372b94988fc6f223c20e327453c7f55042ee06779f5b5fe0922f4470f746c9686b + REF b40bae27785787b6dd70788986fd96434cf90ae2 + SHA512 dbbe4f3e1d5ae74ffc8ba2cba0ab745a23f4993788f4947825ef5125dd1cbed3e13e0c98e020e6fcfa9879f54f06d7cba4de73ec29f77649b6a27b4ab82c8f1c HEAD_REF master - PATCHES - fix-install.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS @@ -16,23 +16,35 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS tools CPUINFO_BUILD_TOOLS ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG - -DCPUINFO_BUILD_TOOLS=OFF - -DCPUINFO_LOG_LEVEL=debug - OPTIONS_RELEASE - ${FEATURE_OPTIONS} - -DCPUINFO_LOG_LEVEL=default +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + list(APPEND LINK_OPTIONS -DCPUINFO_LIBRARY_TYPE=shared) +else() + list(APPEND LINK_OPTIONS -DCPUINFO_LIBRARY_TYPE=static) +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + list(APPEND LINK_OPTIONS -DCPUINFO_RUNTIME_TYPE=shared) +else() + list(APPEND LINK_OPTIONS -DCPUINFO_RUNTIME_TYPE=static) +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS + ${FEATURE_OPTIONS} + ${LINK_OPTIONS} -DCPUINFO_BUILD_UNIT_TESTS=OFF -DCPUINFO_BUILD_MOCK_TESTS=OFF -DCPUINFO_BUILD_BENCHMARKS=OFF + OPTIONS_DEBUG + -DCPUINFO_LOG_LEVEL=debug + OPTIONS_RELEASE + -DCPUINFO_LOG_LEVEL=default ) -vcpkg_install_cmake() +vcpkg_cmake_install() +vcpkg_cmake_config_fixup() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) +vcpkg_fixup_pkgconfig() # pkg_check_modules(libcpuinfo) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -43,5 +55,4 @@ if("tools" IN_LIST FEATURES) ) endif() -# Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/cpuinfo/vcpkg.json b/ports/cpuinfo/vcpkg.json index a67a77bae077b1..3c0138267a22a3 100644 --- a/ports/cpuinfo/vcpkg.json +++ b/ports/cpuinfo/vcpkg.json @@ -1,8 +1,19 @@ { "name": "cpuinfo", - "version-date": "2021-04-04", + "version-date": "2022-04-02", "description": "CPU INFOrmation library (x86/x86-64/ARM/ARM64, Linux/Windows/Android/macOS/iOS)", "homepage": "https://github.com/pytorch/cpuinfo", + "supports": "!(arm & windows)", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], "features": { "tools": { "description": "Build cpuinfo command-line tools" From 1e1634cf328a7434b904ae7fc6b38c093460bc55 Mon Sep 17 00:00:00 2001 From: Park DongHa Date: Sat, 2 Apr 2022 23:44:11 +0900 Subject: [PATCH 02/14] [cpuinfo] update triplet support --- ports/cpuinfo/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/c-/cpuinfo.json | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ports/cpuinfo/vcpkg.json b/ports/cpuinfo/vcpkg.json index 3c0138267a22a3..5e2dba93fc535d 100644 --- a/ports/cpuinfo/vcpkg.json +++ b/ports/cpuinfo/vcpkg.json @@ -3,7 +3,7 @@ "version-date": "2022-04-02", "description": "CPU INFOrmation library (x86/x86-64/ARM/ARM64, Linux/Windows/Android/macOS/iOS)", "homepage": "https://github.com/pytorch/cpuinfo", - "supports": "!(arm & windows)", + "supports": "!(arm & windows) | (arm & uwp)", "dependencies": [ { "name": "vcpkg-cmake", diff --git a/versions/baseline.json b/versions/baseline.json index 9b5c1056e7a70b..dc7ee5ee550754 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1649,7 +1649,7 @@ "port-version": 3 }, "cpuinfo": { - "baseline": "2021-04-04", + "baseline": "2022-04-02", "port-version": 0 }, "cr": { diff --git a/versions/c-/cpuinfo.json b/versions/c-/cpuinfo.json index 7c3abd38ecb5c2..9f5cb07f5fdb95 100644 --- a/versions/c-/cpuinfo.json +++ b/versions/c-/cpuinfo.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "306a7105587720326b1eecff185f5683d05ca746", + "version-date": "2022-04-02", + "port-version": 0 + }, { "git-tree": "28dbefcc9131ff8ce6fa939f7fcdb5cf0d4ee7fd", "version-date": "2021-04-04", From 9b87d9c285a5767acff4cd3176f0e62e624d7586 Mon Sep 17 00:00:00 2001 From: Park DongHa Date: Sat, 2 Apr 2022 23:59:58 +0900 Subject: [PATCH 03/14] [nnpack] fix cpuinfo usage --- ports/nnpack/fix-cmakelists.patch | 4 ++-- ports/nnpack/vcpkg.json | 4 ++-- versions/baseline.json | 2 +- versions/n-/nnpack.json | 5 +++++ 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ports/nnpack/fix-cmakelists.patch b/ports/nnpack/fix-cmakelists.patch index 046443d80279ab..bd80f1000db0c5 100644 --- a/ports/nnpack/fix-cmakelists.patch +++ b/ports/nnpack/fix-cmakelists.patch @@ -42,8 +42,8 @@ index 5ecd2df..8565044 100644 "${CONFU_DEPENDENCIES_BINARY_DIR}/cpuinfo") ENDIF() -TARGET_LINK_LIBRARIES(nnpack PRIVATE cpuinfo) -+find_package(unofficial-cpuinfo CONFIG REQUIRED) -+target_link_libraries(nnpack PUBLIC unofficial::cpuinfo::cpuinfo) ++find_package(cpuinfo CONFIG REQUIRED) ++target_link_libraries(nnpack PUBLIC cpuinfo::cpuinfo) # ---[ Configure pthreadpool -IF(NOT TARGET pthreadpool) diff --git a/ports/nnpack/vcpkg.json b/ports/nnpack/vcpkg.json index e039985aea5282..d4751cea7a106b 100644 --- a/ports/nnpack/vcpkg.json +++ b/ports/nnpack/vcpkg.json @@ -1,10 +1,10 @@ { "name": "nnpack", "version-date": "2021-02-21", - "port-version": 2, + "port-version": 3, "description": "Acceleration package for neural networks on multi-core CPUs", "homepage": "https://github.com/Maratyszcza/NNPACK", - "supports": "linux & osx", + "supports": "linux | osx", "dependencies": [ "cpuinfo", "fp16", diff --git a/versions/baseline.json b/versions/baseline.json index dc7ee5ee550754..075af2555fddcb 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4838,7 +4838,7 @@ }, "nnpack": { "baseline": "2021-02-21", - "port-version": 2 + "port-version": 3 }, "nonius": { "baseline": "2019-04-20", diff --git a/versions/n-/nnpack.json b/versions/n-/nnpack.json index 28a12083ae0fa0..4598dd7a542bd4 100644 --- a/versions/n-/nnpack.json +++ b/versions/n-/nnpack.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "4ec5e175a2608e3e0ff021309dded3c0a7812bb1", + "version-date": "2021-02-21", + "port-version": 3 + }, { "git-tree": "2479c1088fd75df5e9f06e85086c748aefae9e11", "version-date": "2021-02-21", From c3645001f3559599b3b3ecd3f2c8d1b1456a82bd Mon Sep 17 00:00:00 2001 From: Park DongHa Date: Sun, 3 Apr 2022 00:00:27 +0900 Subject: [PATCH 04/14] [qnnpack] fix cpuinfo usage --- ports/qnnpack/use-packages.patch | 4 ++-- ports/qnnpack/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/q-/qnnpack.json | 5 +++++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ports/qnnpack/use-packages.patch b/ports/qnnpack/use-packages.patch index 33456516261ef0..2591e1331573df 100644 --- a/ports/qnnpack/use-packages.patch +++ b/ports/qnnpack/use-packages.patch @@ -123,8 +123,8 @@ index a5ddc49..05e1279 100644 ENDIF() -TARGET_LINK_LIBRARIES(qnnpack PRIVATE cpuinfo) + -+find_package(unofficial-cpuinfo CONFIG REQUIRED) -+target_link_libraries(qnnpack PUBLIC unofficial::cpuinfo::clog unofficial::cpuinfo::cpuinfo) ++find_package(cpuinfo CONFIG REQUIRED) ++target_link_libraries(qnnpack PUBLIC cpuinfo::clog cpuinfo::cpuinfo) # ---[ Configure pthreadpool -IF(NOT TARGET pthreadpool) diff --git a/ports/qnnpack/vcpkg.json b/ports/qnnpack/vcpkg.json index 75ec67e2ac5a64..c9a6e512e0b345 100644 --- a/ports/qnnpack/vcpkg.json +++ b/ports/qnnpack/vcpkg.json @@ -1,7 +1,7 @@ { "name": "qnnpack", "version-date": "2021-02-26", - "port-version": 1, + "port-version": 2, "description": "Quantized Neural Network PACKage - mobile-optimized implementation of quantized neural network operators", "homepage": "https://github.com/pytorch/QNNPACK", "supports": "linux | osx", diff --git a/versions/baseline.json b/versions/baseline.json index 075af2555fddcb..40b670d0cb1b4e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5618,7 +5618,7 @@ }, "qnnpack": { "baseline": "2021-02-26", - "port-version": 1 + "port-version": 2 }, "qpid-proton": { "baseline": "0.32.0", diff --git a/versions/q-/qnnpack.json b/versions/q-/qnnpack.json index ee1cf4c89ef5a1..bf0a75fe32c00f 100644 --- a/versions/q-/qnnpack.json +++ b/versions/q-/qnnpack.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "dbc05e72e67af54d2ee51e63ee3bf3da02658edb", + "version-date": "2021-02-26", + "port-version": 2 + }, { "git-tree": "8dbc0dd7bdcf36b48124351fbc2ecc44d0b2e961", "version-date": "2021-02-26", From e697c5bcd8eec07daafc6c4840c11acfb65ce563 Mon Sep 17 00:00:00 2001 From: Park DongHa Date: Sun, 3 Apr 2022 00:00:46 +0900 Subject: [PATCH 05/14] [fbgemm] fix cpuinfo usage --- ports/fbgemm/fix-cmakelists.patch | 10 +++++----- ports/fbgemm/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/f-/fbgemm.json | 5 +++++ 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ports/fbgemm/fix-cmakelists.patch b/ports/fbgemm/fix-cmakelists.patch index 1d26e80a9628ec..3f0b9015c71850 100644 --- a/ports/fbgemm/fix-cmakelists.patch +++ b/ports/fbgemm/fix-cmakelists.patch @@ -56,7 +56,7 @@ index 6f19a16..3c758d2 100644 endif() -if(NOT TARGET cpuinfo) -+find_package(unofficial-cpuinfo CONFIG REQUIRED) # target 'unofficial::cpuinfo::cpuinfo' ++find_package(cpuinfo CONFIG REQUIRED) # target 'cpuinfo::cpuinfo' +if(FALSE) #Download cpuinfo from github if CPUINFO_SOURCE_DIR is not specified. if(NOT DEFINED CPUINFO_SOURCE_DIR) @@ -68,7 +68,7 @@ index 6f19a16..3c758d2 100644 - PRIVATE "${ASMJIT_SRC_DIR}/src" - PRIVATE "${CPUINFO_SOURCE_DIR}/include") +) -+target_link_libraries(fbgemm_generic PUBLIC asmjit::asmjit unofficial::cpuinfo::cpuinfo) ++target_link_libraries(fbgemm_generic PUBLIC asmjit::asmjit cpuinfo::cpuinfo) target_include_directories(fbgemm_avx2 BEFORE PUBLIC $ @@ -76,7 +76,7 @@ index 6f19a16..3c758d2 100644 - PRIVATE "${ASMJIT_SRC_DIR}/src" - PRIVATE "${CPUINFO_SOURCE_DIR}/include") +) -+target_link_libraries(fbgemm_avx2 PUBLIC asmjit::asmjit unofficial::cpuinfo::cpuinfo) ++target_link_libraries(fbgemm_avx2 PUBLIC asmjit::asmjit cpuinfo::cpuinfo) target_include_directories(fbgemm_avx512 BEFORE PUBLIC $ @@ -95,7 +95,7 @@ index 6f19a16..3c758d2 100644 - $ - $) +) -+target_link_libraries(fbgemm_avx512 PUBLIC asmjit::asmjit unofficial::cpuinfo::cpuinfo) ++target_link_libraries(fbgemm_avx512 PUBLIC asmjit::asmjit cpuinfo::cpuinfo) + +add_library(fbgemm + $ @@ -131,7 +131,7 @@ index 6f19a16..3c758d2 100644 -target_link_libraries(fbgemm $ - $) -add_dependencies(fbgemm asmjit cpuinfo) -+target_link_libraries(fbgemm PUBLIC asmjit::asmjit unofficial::cpuinfo::cpuinfo) ++target_link_libraries(fbgemm PUBLIC asmjit::asmjit cpuinfo::cpuinfo) install(TARGETS fbgemm EXPORT fbgemmLibraryConfig ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} diff --git a/ports/fbgemm/vcpkg.json b/ports/fbgemm/vcpkg.json index 42d1375eaee085..1630392d203865 100644 --- a/ports/fbgemm/vcpkg.json +++ b/ports/fbgemm/vcpkg.json @@ -1,7 +1,7 @@ { "name": "fbgemm", "version-date": "2021-03-18", - "port-version": 3, + "port-version": 4, "description": "FB (Facebook) + GEMM (General Matrix-Matrix Multiplication)", "homepage": "https://code.fb.com/ml-applications/fbgemm/", "supports": "!(x86 | uwp)", diff --git a/versions/baseline.json b/versions/baseline.json index 40b670d0cb1b4e..e0a875e69842ab 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2158,7 +2158,7 @@ }, "fbgemm": { "baseline": "2021-03-18", - "port-version": 3 + "port-version": 4 }, "fbthrift": { "baseline": "2022.03.21.00", diff --git a/versions/f-/fbgemm.json b/versions/f-/fbgemm.json index 1fcf80162d2f7c..e11cff079352a8 100644 --- a/versions/f-/fbgemm.json +++ b/versions/f-/fbgemm.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "80485c113a4cf859fda0e566822527c399c279fd", + "version-date": "2021-03-18", + "port-version": 4 + }, { "git-tree": "89489c3afc56789dd2a8344dc89455723ec0eec3", "version-date": "2021-03-18", From 32e78aca9de62d78d82d7a294e4cf46f1dc7fc87 Mon Sep 17 00:00:00 2001 From: Park DongHa Date: Sun, 3 Apr 2022 00:01:10 +0900 Subject: [PATCH 06/14] [xnnpack] fix cpuinfo usage --- ports/xnnpack/use-packages.patch | 4 ++-- ports/xnnpack/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/x-/xnnpack.json | 5 +++++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ports/xnnpack/use-packages.patch b/ports/xnnpack/use-packages.patch index 17d274c994ca82..e31fbc74566da8 100644 --- a/ports/xnnpack/use-packages.patch +++ b/ports/xnnpack/use-packages.patch @@ -37,8 +37,8 @@ index b69ce50c..1e8938b7 100755 ENDIF() ENDIF() -TARGET_LINK_LIBRARIES(XNNPACK PRIVATE cpuinfo) -+find_package(unofficial-cpuinfo CONFIG REQUIRED) -+target_link_libraries(XNNPACK PUBLIC unofficial::cpuinfo::clog unofficial::cpuinfo::cpuinfo) ++find_package(cpuinfo CONFIG REQUIRED) ++target_link_libraries(XNNPACK PUBLIC cpuinfo::clog cpuinfo::cpuinfo) # ---[ Configure pthreadpool -IF(NOT TARGET pthreadpool) diff --git a/ports/xnnpack/vcpkg.json b/ports/xnnpack/vcpkg.json index cb0339e2829053..ccf26c9fecc75b 100644 --- a/ports/xnnpack/vcpkg.json +++ b/ports/xnnpack/vcpkg.json @@ -1,7 +1,7 @@ { "name": "xnnpack", "version-date": "2021-05-17", - "port-version": 1, + "port-version": 2, "description": "High-efficiency floating-point neural network inference operators for mobile, server, and Web", "homepage": "https://github.com/google/XNNPACK", "supports": "!(arm & windows) & !uwp", diff --git a/versions/baseline.json b/versions/baseline.json index e0a875e69842ab..b7d0802a734466 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7522,7 +7522,7 @@ }, "xnnpack": { "baseline": "2021-05-17", - "port-version": 1 + "port-version": 2 }, "xorstr": { "baseline": "2021-10-23", diff --git a/versions/x-/xnnpack.json b/versions/x-/xnnpack.json index b5261f4f60f613..9add68c166d5e4 100644 --- a/versions/x-/xnnpack.json +++ b/versions/x-/xnnpack.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "24b8fdd62a2ee491dd579f624c7f60f95a9cf576", + "version-date": "2021-05-17", + "port-version": 2 + }, { "git-tree": "d998602ed266e9cf140fb6740fea8625276a48f5", "version-date": "2021-05-17", From d8aae0e1bab514e9113f0ddf49bdd8de1041150b Mon Sep 17 00:00:00 2001 From: Park DongHa Date: Sun, 3 Apr 2022 00:08:35 +0900 Subject: [PATCH 07/14] [cpuinfo] add license --- ports/cpuinfo/vcpkg.json | 1 + versions/c-/cpuinfo.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/cpuinfo/vcpkg.json b/ports/cpuinfo/vcpkg.json index 5e2dba93fc535d..2980dea4c2f37a 100644 --- a/ports/cpuinfo/vcpkg.json +++ b/ports/cpuinfo/vcpkg.json @@ -3,6 +3,7 @@ "version-date": "2022-04-02", "description": "CPU INFOrmation library (x86/x86-64/ARM/ARM64, Linux/Windows/Android/macOS/iOS)", "homepage": "https://github.com/pytorch/cpuinfo", + "license": "BSD-2-Clause", "supports": "!(arm & windows) | (arm & uwp)", "dependencies": [ { diff --git a/versions/c-/cpuinfo.json b/versions/c-/cpuinfo.json index 9f5cb07f5fdb95..a962e954806f8f 100644 --- a/versions/c-/cpuinfo.json +++ b/versions/c-/cpuinfo.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "306a7105587720326b1eecff185f5683d05ca746", + "git-tree": "db70f0810a8dec170297cd293ea3764cd8d58a0a", "version-date": "2022-04-02", "port-version": 0 }, From 70884986923e320b03d07809fcda4760784e8fc3 Mon Sep 17 00:00:00 2001 From: Park DongHa Date: Sun, 3 Apr 2022 00:10:58 +0900 Subject: [PATCH 08/14] [nnpack] port license/dependencies --- ports/nnpack/portfile.cmake | 5 ++--- ports/nnpack/vcpkg.json | 7 ++++++- versions/n-/nnpack.json | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ports/nnpack/portfile.cmake b/ports/nnpack/portfile.cmake index 9cde055f9337ce..7e3203223b1674 100644 --- a/ports/nnpack/portfile.cmake +++ b/ports/nnpack/portfile.cmake @@ -7,16 +7,15 @@ vcpkg_from_github( fix-cmakelists.patch ) -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS -DNNPACK_BACKEND=psimd -DNNPACK_BUILD_TESTS=OFF -DNNPACK_BUILD_BENCHMARKS=OFF -DNNPACK_CUSTOM_THREADPOOL=OFF ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/nnpack/vcpkg.json b/ports/nnpack/vcpkg.json index d4751cea7a106b..fe1878175e1b74 100644 --- a/ports/nnpack/vcpkg.json +++ b/ports/nnpack/vcpkg.json @@ -4,12 +4,17 @@ "port-version": 3, "description": "Acceleration package for neural networks on multi-core CPUs", "homepage": "https://github.com/Maratyszcza/NNPACK", + "license": "BSD-2-Clause", "supports": "linux | osx", "dependencies": [ "cpuinfo", "fp16", "fxdiv", "psimd", - "pthreadpool" + "pthreadpool", + { + "name": "vcpkg-cmake", + "host": true + } ] } diff --git a/versions/n-/nnpack.json b/versions/n-/nnpack.json index 4598dd7a542bd4..853644ff305263 100644 --- a/versions/n-/nnpack.json +++ b/versions/n-/nnpack.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "4ec5e175a2608e3e0ff021309dded3c0a7812bb1", + "git-tree": "7d9e236a8f7e71e46c901da4f8a250c47221bd91", "version-date": "2021-02-21", "port-version": 3 }, From e514c6403cc51c76b3b6730e5807a0d058018c39 Mon Sep 17 00:00:00 2001 From: Park DongHa Date: Sun, 3 Apr 2022 00:11:28 +0900 Subject: [PATCH 09/14] [qnnpack] port license --- ports/qnnpack/vcpkg.json | 1 + versions/q-/qnnpack.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/qnnpack/vcpkg.json b/ports/qnnpack/vcpkg.json index c9a6e512e0b345..ea8b98f7aeb921 100644 --- a/ports/qnnpack/vcpkg.json +++ b/ports/qnnpack/vcpkg.json @@ -4,6 +4,7 @@ "port-version": 2, "description": "Quantized Neural Network PACKage - mobile-optimized implementation of quantized neural network operators", "homepage": "https://github.com/pytorch/QNNPACK", + "license": "BSD-3-Clause", "supports": "linux | osx", "dependencies": [ "cpuinfo", diff --git a/versions/q-/qnnpack.json b/versions/q-/qnnpack.json index bf0a75fe32c00f..802a45951b563a 100644 --- a/versions/q-/qnnpack.json +++ b/versions/q-/qnnpack.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "dbc05e72e67af54d2ee51e63ee3bf3da02658edb", + "git-tree": "907c113d0c35b674976b5c3b7dc96b2c71084061", "version-date": "2021-02-26", "port-version": 2 }, From 638d6b20597a3fd196ec1ecb2d267c2fedbda2ed Mon Sep 17 00:00:00 2001 From: Park DongHa Date: Sun, 3 Apr 2022 00:11:52 +0900 Subject: [PATCH 10/14] [xnnpack] port license --- ports/xnnpack/vcpkg.json | 1 + versions/x-/xnnpack.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/xnnpack/vcpkg.json b/ports/xnnpack/vcpkg.json index ccf26c9fecc75b..6c692a05b2ee39 100644 --- a/ports/xnnpack/vcpkg.json +++ b/ports/xnnpack/vcpkg.json @@ -4,6 +4,7 @@ "port-version": 2, "description": "High-efficiency floating-point neural network inference operators for mobile, server, and Web", "homepage": "https://github.com/google/XNNPACK", + "license": "BSD-3-Clause", "supports": "!(arm & windows) & !uwp", "dependencies": [ "cpuinfo", diff --git a/versions/x-/xnnpack.json b/versions/x-/xnnpack.json index 9add68c166d5e4..aab502fa727f97 100644 --- a/versions/x-/xnnpack.json +++ b/versions/x-/xnnpack.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "24b8fdd62a2ee491dd579f624c7f60f95a9cf576", + "git-tree": "dba10dfefac481caee9f94c49fc60878c5bb57a1", "version-date": "2021-05-17", "port-version": 2 }, From 6724fc0203762c618feef01d06a4358dd0eb8b0b Mon Sep 17 00:00:00 2001 From: Park DongHa Date: Sun, 3 Apr 2022 00:18:36 +0900 Subject: [PATCH 11/14] [fbgemm] port license --- ports/fbgemm/vcpkg.json | 1 + versions/f-/fbgemm.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/fbgemm/vcpkg.json b/ports/fbgemm/vcpkg.json index 1630392d203865..40cef65267b7e1 100644 --- a/ports/fbgemm/vcpkg.json +++ b/ports/fbgemm/vcpkg.json @@ -4,6 +4,7 @@ "port-version": 4, "description": "FB (Facebook) + GEMM (General Matrix-Matrix Multiplication)", "homepage": "https://code.fb.com/ml-applications/fbgemm/", + "license": "BSD-3-Clause", "supports": "!(x86 | uwp)", "dependencies": [ "asmjit", diff --git a/versions/f-/fbgemm.json b/versions/f-/fbgemm.json index e11cff079352a8..5f34b896ff21e9 100644 --- a/versions/f-/fbgemm.json +++ b/versions/f-/fbgemm.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "80485c113a4cf859fda0e566822527c399c279fd", + "git-tree": "e3afaf099d4759d2d2a57caccb7d54ca2d5b2359", "version-date": "2021-03-18", "port-version": 4 }, From 8f948cf20541b7a3d8547445d59e73d963cca971 Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Mon, 11 Apr 2022 09:03:51 -0700 Subject: [PATCH 12/14] fix supports --- ports/cpuinfo/vcpkg.json | 1 - scripts/ci.baseline.txt | 1 - 2 files changed, 2 deletions(-) diff --git a/ports/cpuinfo/vcpkg.json b/ports/cpuinfo/vcpkg.json index 2980dea4c2f37a..72b7b746038bb7 100644 --- a/ports/cpuinfo/vcpkg.json +++ b/ports/cpuinfo/vcpkg.json @@ -4,7 +4,6 @@ "description": "CPU INFOrmation library (x86/x86-64/ARM/ARM64, Linux/Windows/Android/macOS/iOS)", "homepage": "https://github.com/pytorch/cpuinfo", "license": "BSD-2-Clause", - "supports": "!(arm & windows) | (arm & uwp)", "dependencies": [ { "name": "vcpkg-cmake", diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 2597ccae1bbc4a..f57bf31d254e9d 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -190,7 +190,6 @@ cppcoro:x64-uwp=fail # The x64-linux pipeline uses gcc 9.3.0, which lacks C++20 coroutine support. # This is known to work on x64-linux as of gcc 10.3.0. cppgraphqlgen:x64-linux=fail -cpuinfo:arm64-windows=fail crashpad:arm64-windows=fail crashpad:arm-uwp=fail crashpad:x64-linux=fail From 9a7dfe892891950c9696f737b0e63fdb7bea86b2 Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Tue, 12 Apr 2022 09:27:14 -0700 Subject: [PATCH 13/14] I think this should work? --- ports/cpuinfo/portfile.cmake | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/ports/cpuinfo/portfile.cmake b/ports/cpuinfo/portfile.cmake index a8c3078c69248a..924873695cb76a 100644 --- a/ports/cpuinfo/portfile.cmake +++ b/ports/cpuinfo/portfile.cmake @@ -28,11 +28,41 @@ else() list(APPEND LINK_OPTIONS -DCPUINFO_RUNTIME_TYPE=static) endif() +# hack to get around that toolchains/windows.cmake doesn't set CMAKE_SYSTEM_ARCHITECTURE +if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(CPUINFO_TARGET_PROCESSOR_param "-DCPUINFO_TARGET_PROCESSOR=x86_64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(CPUINFO_TARGET_PROCESSOR_param "-DCPUINFO_TARGET_PROCESSOR=armv7") + else() + set(CPUINFO_TARGET_PROCESSOR_param "-DCPUINFO_TARGET_PROCESSOR=${VCPKG_TARGET_ARCHITECTURE}") + endif() + + vcpkg_replace_string( + "${SOURCE_PATH}/src/arm/api.h" + "[restrict static " + "[" + ) + vcpkg_replace_string( + "${SOURCE_PATH}/src/arm/cache.c" + "[restrict static " + "[" + ) + vcpkg_replace_string( + "${SOURCE_PATH}/src/arm/uarch.c" + "[restrict static " + "[" + ) +else() + set(CPUINFO_TARGET_PROCESSOR_param "") +endif() + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} ${LINK_OPTIONS} + ${CPUINFO_TARGET_PROCESSOR_param} -DCPUINFO_BUILD_UNIT_TESTS=OFF -DCPUINFO_BUILD_MOCK_TESTS=OFF -DCPUINFO_BUILD_BENCHMARKS=OFF From 35c7b955bb6a8dcf6e9dea531aacbc32c3172df6 Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Tue, 12 Apr 2022 09:50:38 -0700 Subject: [PATCH 14/14] alright, arm&windows is unsupported... for now --- ports/cpuinfo/portfile.cmake | 34 +++++++++++----------------------- ports/cpuinfo/vcpkg.json | 1 + versions/c-/cpuinfo.json | 2 +- 3 files changed, 13 insertions(+), 24 deletions(-) diff --git a/ports/cpuinfo/portfile.cmake b/ports/cpuinfo/portfile.cmake index 924873695cb76a..aa964e6e17d08b 100644 --- a/ports/cpuinfo/portfile.cmake +++ b/ports/cpuinfo/portfile.cmake @@ -29,32 +29,20 @@ else() endif() # hack to get around that toolchains/windows.cmake doesn't set CMAKE_SYSTEM_ARCHITECTURE +set(CPUINFO_TARGET_PROCESSOR_param "") if(VCPKG_TARGET_IS_WINDOWS) - if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - set(CPUINFO_TARGET_PROCESSOR_param "-DCPUINFO_TARGET_PROCESSOR=x86_64") + # NOTE: arm64-windows is unsupported for now; + # see https://github.com/pytorch/cpuinfo/pull/82 for updates + # NOTE: arm-windows is unsupported + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(CPUINFO_TARGET_PROCESSOR_param "-DCPUINFO_TARGET_PROCESSOR=x86") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(CPUINFO_TARGET_PROCESSOR_param "-DCPUINFO_TARGET_PROCESSOR=AMD64") elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - set(CPUINFO_TARGET_PROCESSOR_param "-DCPUINFO_TARGET_PROCESSOR=armv7") - else() - set(CPUINFO_TARGET_PROCESSOR_param "-DCPUINFO_TARGET_PROCESSOR=${VCPKG_TARGET_ARCHITECTURE}") + set(CPUINFO_TARGET_PROCESSOR_param "-DCPUINFO_TARGET_PROCESSOR=ARM") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(CPUINFO_TARGET_PROCESSOR_param "-DCPUINFO_TARGET_PROCESSOR=ARM64") endif() - - vcpkg_replace_string( - "${SOURCE_PATH}/src/arm/api.h" - "[restrict static " - "[" - ) - vcpkg_replace_string( - "${SOURCE_PATH}/src/arm/cache.c" - "[restrict static " - "[" - ) - vcpkg_replace_string( - "${SOURCE_PATH}/src/arm/uarch.c" - "[restrict static " - "[" - ) -else() - set(CPUINFO_TARGET_PROCESSOR_param "") endif() vcpkg_cmake_configure( diff --git a/ports/cpuinfo/vcpkg.json b/ports/cpuinfo/vcpkg.json index 72b7b746038bb7..d718f9393058a2 100644 --- a/ports/cpuinfo/vcpkg.json +++ b/ports/cpuinfo/vcpkg.json @@ -4,6 +4,7 @@ "description": "CPU INFOrmation library (x86/x86-64/ARM/ARM64, Linux/Windows/Android/macOS/iOS)", "homepage": "https://github.com/pytorch/cpuinfo", "license": "BSD-2-Clause", + "supports": "!(arm & windows)", "dependencies": [ { "name": "vcpkg-cmake", diff --git a/versions/c-/cpuinfo.json b/versions/c-/cpuinfo.json index a962e954806f8f..fef8a68d0b663f 100644 --- a/versions/c-/cpuinfo.json +++ b/versions/c-/cpuinfo.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "db70f0810a8dec170297cd293ea3764cd8d58a0a", + "git-tree": "69febccb10ae5b789dd6c5af2b85740617fc34f4", "version-date": "2022-04-02", "port-version": 0 },