From 7fba5c36d440bfad4d5d23b4828fe16a4c56ef3e Mon Sep 17 00:00:00 2001 From: luncliff Date: Sun, 21 Feb 2021 16:44:47 +0900 Subject: [PATCH 1/5] [psimd] create a new port --- ports/psimd/portfile.cmake | 15 +++++++++++++++ ports/psimd/vcpkg.json | 6 ++++++ 2 files changed, 21 insertions(+) create mode 100644 ports/psimd/portfile.cmake create mode 100644 ports/psimd/vcpkg.json diff --git a/ports/psimd/portfile.cmake b/ports/psimd/portfile.cmake new file mode 100644 index 00000000000000..f68dacb838f692 --- /dev/null +++ b/ports/psimd/portfile.cmake @@ -0,0 +1,15 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Maratyszcza/psimd + REF 072586a71b55b7f8c584153d223e95687148a900 + SHA512 a18faea093423dd9fe19ece8b228e011dccce0a2a22222f777ea19b023a13173966d4a8aea01147e8fc58de5d39cffcedeb2221a1572ae52bd5aba1295f86a94 +) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) diff --git a/ports/psimd/vcpkg.json b/ports/psimd/vcpkg.json new file mode 100644 index 00000000000000..c5068ba48b3ca7 --- /dev/null +++ b/ports/psimd/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "psimd", + "version-string": "2021-02-21", + "homepage": "https://github.com/Maratyszcza/psimd", + "description": "Portable 128-bit SIMD intrinsics" +} From 23c77acddefea0f0e29952389ed6aa66d0d08b16 Mon Sep 17 00:00:00 2001 From: luncliff Date: Sun, 21 Feb 2021 16:45:19 +0900 Subject: [PATCH 2/5] [psimd] update baseline and port SHA --- ports/psimd/vcpkg.json | 4 ++-- versions/baseline.json | 4 ++++ versions/p-/psimd.json | 9 +++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 versions/p-/psimd.json diff --git a/ports/psimd/vcpkg.json b/ports/psimd/vcpkg.json index c5068ba48b3ca7..49fc6e93d97a65 100644 --- a/ports/psimd/vcpkg.json +++ b/ports/psimd/vcpkg.json @@ -1,6 +1,6 @@ { "name": "psimd", "version-string": "2021-02-21", - "homepage": "https://github.com/Maratyszcza/psimd", - "description": "Portable 128-bit SIMD intrinsics" + "description": "Portable 128-bit SIMD intrinsics", + "homepage": "https://github.com/Maratyszcza/psimd" } diff --git a/versions/baseline.json b/versions/baseline.json index e0a25ac7df8276..09a973a49fb625 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4752,6 +4752,10 @@ "baseline": "1.0.0", "port-version": 0 }, + "psimd": { + "baseline": "2021-02-21", + "port-version": 0 + }, "ptex": { "baseline": "2.3.2", "port-version": 2 diff --git a/versions/p-/psimd.json b/versions/p-/psimd.json new file mode 100644 index 00000000000000..4271f0bfe88b2b --- /dev/null +++ b/versions/p-/psimd.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "c54624730c6c8ae43a4d77d74a9771543863ba4d", + "version-string": "2021-02-21", + "port-version": 0 + } + ] +} From 14b25a6fb55ee33e8e0cac8128a429a95136cd15 Mon Sep 17 00:00:00 2001 From: luncliff Date: Sun, 21 Feb 2021 17:02:21 +0900 Subject: [PATCH 3/5] [fp16] create a new port --- ports/fp16/find-psimd.patch | 31 +++++++++++++++++++++++++++++++ ports/fp16/portfile.cmake | 20 ++++++++++++++++++++ ports/fp16/vcpkg.json | 9 +++++++++ 3 files changed, 60 insertions(+) create mode 100644 ports/fp16/find-psimd.patch create mode 100644 ports/fp16/portfile.cmake create mode 100644 ports/fp16/vcpkg.json diff --git a/ports/fp16/find-psimd.patch b/ports/fp16/find-psimd.patch new file mode 100644 index 00000000000000..6eeed9aa714ac6 --- /dev/null +++ b/ports/fp16/find-psimd.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -33,7 +33,8 @@ SET(CONFU_DEPENDENCIES_SOURCE_DIR ${CMAKE_SOURCE_DIR}/deps + SET(CONFU_DEPENDENCIES_BINARY_DIR ${CMAKE_BINARY_DIR}/deps + CACHE PATH "Confu-style dependencies binary directory") + +-IF(NOT DEFINED PSIMD_SOURCE_DIR) ++find_path(PSIMD_INCLUDE_DIRS "psimd.h") ++IF(FALSE) + MESSAGE(STATUS "Downloading PSimd to ${CONFU_DEPENDENCIES_SOURCE_DIR}/psimd (define PSIMD_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadPSimd.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/psimd-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -76,7 +77,7 @@ ELSE() + ENDIF() + TARGET_INCLUDE_DIRECTORIES(fp16 INTERFACE + $ +- $) ++ $ $) + + INSTALL(FILES include/fp16.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +@@ -90,7 +91,7 @@ INSTALL(FILES + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/fp16) + + # ---[ Configure psimd +-IF(NOT TARGET psimd) ++IF(FALSE) + ADD_SUBDIRECTORY( + "${PSIMD_SOURCE_DIR}" + "${CONFU_DEPENDENCIES_BINARY_DIR}/psimd") diff --git a/ports/fp16/portfile.cmake b/ports/fp16/portfile.cmake new file mode 100644 index 00000000000000..cdbeca69585917 --- /dev/null +++ b/ports/fp16/portfile.cmake @@ -0,0 +1,20 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Maratyszcza/fp16 + REF 4dfe081cf6bcd15db339cf2680b9281b8451eeb3 + SHA512 e79a1f6f8d4aeca85982158d5b070923d31d4f2062ed84cfa6f26c47a34f2e8ac49e0f330b7d49f5732d5e1eec6e7afccdac43645070060fb7827e2ce261dd3e + PATCHES + find-psimd.patch +) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFP16_BUILD_TESTS=OFF + -DFP16_BUILD_BENCHMARKS=OFF +) +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) diff --git a/ports/fp16/vcpkg.json b/ports/fp16/vcpkg.json new file mode 100644 index 00000000000000..9ff3e95f504afd --- /dev/null +++ b/ports/fp16/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "fp16", + "version-string": "2021-02-21", + "description": "Conversion to/from half-precision floating point formats", + "homepage": "https://github.com/Maratyszcza/FP16", + "dependencies": [ + "psimd" + ] +} From cc8488c7e3c4e39c260d8f377fbc628ee33fa199 Mon Sep 17 00:00:00 2001 From: luncliff Date: Sun, 21 Feb 2021 17:02:59 +0900 Subject: [PATCH 4/5] [fp16] update baseline and port SHA --- versions/baseline.json | 4 ++++ versions/f-/fp16.json | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 versions/f-/fp16.json diff --git a/versions/baseline.json b/versions/baseline.json index 09a973a49fb625..237be7a4fc7d60 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2020,6 +2020,10 @@ "baseline": "1.0.5", "port-version": 0 }, + "fp16": { + "baseline": "2021-02-21", + "port-version": 0 + }, "fplus": { "baseline": "0.2.3-p0", "port-version": 0 diff --git a/versions/f-/fp16.json b/versions/f-/fp16.json new file mode 100644 index 00000000000000..9b486f3d21666c --- /dev/null +++ b/versions/f-/fp16.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "e4e945808018cb1bbc0a54c8d8f186e61bd97bc1", + "version-string": "2021-02-21", + "port-version": 0 + } + ] +} From 4cdaa9d6c3748752ba829ab1b583ad96336742a1 Mon Sep 17 00:00:00 2001 From: luncliff Date: Fri, 26 Feb 2021 16:51:57 +0900 Subject: [PATCH 5/5] [fp16] apply PR feedback --- ports/fp16/portfile.cmake | 1 - ports/fp16/vcpkg.json | 4 ++-- versions/f-/fp16.json | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ports/fp16/portfile.cmake b/ports/fp16/portfile.cmake index cdbeca69585917..101255b8b908bf 100644 --- a/ports/fp16/portfile.cmake +++ b/ports/fp16/portfile.cmake @@ -1,4 +1,3 @@ - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Maratyszcza/fp16 diff --git a/ports/fp16/vcpkg.json b/ports/fp16/vcpkg.json index 9ff3e95f504afd..76eac902f7e055 100644 --- a/ports/fp16/vcpkg.json +++ b/ports/fp16/vcpkg.json @@ -1,7 +1,7 @@ { "name": "fp16", - "version-string": "2021-02-21", - "description": "Conversion to/from half-precision floating point formats", + "version-date": "2021-02-21", + "description": "Header-only library for conversion to/from half-precision floating point formats", "homepage": "https://github.com/Maratyszcza/FP16", "dependencies": [ "psimd" diff --git a/versions/f-/fp16.json b/versions/f-/fp16.json index 9b486f3d21666c..2785c93e5b7465 100644 --- a/versions/f-/fp16.json +++ b/versions/f-/fp16.json @@ -1,8 +1,8 @@ { "versions": [ { - "git-tree": "e4e945808018cb1bbc0a54c8d8f186e61bd97bc1", - "version-string": "2021-02-21", + "git-tree": "849acf1f87e0194fda4cd5459e51c564874c60ed", + "version-date": "2021-02-21", "port-version": 0 } ]