Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[highway] Bump to 1.2.0 #39086

Merged
merged 6 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions ports/highway/fix_dll_export.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
diff --git a/hwy/contrib/thread_pool/topology.cc b/hwy/contrib/thread_pool/topology.cc
index 3d24f4f4..17f35630 100644
--- a/hwy/contrib/thread_pool/topology.cc
+++ b/hwy/contrib/thread_pool/topology.cc
@@ -64,7 +64,7 @@

namespace hwy {

-HWY_DLLEXPORT bool HaveThreadingSupport() {
+HWY_CONTRIB_DLLEXPORT bool HaveThreadingSupport() {
#if HWY_ARCH_WASM
return emscripten_has_threading_support() != 0;
#else
@@ -72,7 +72,7 @@ HWY_DLLEXPORT bool HaveThreadingSupport() {
#endif
}

-HWY_DLLEXPORT size_t TotalLogicalProcessors() {
+HWY_CONTRIB_DLLEXPORT size_t TotalLogicalProcessors() {
size_t lp = 0;
#if HWY_ARCH_WASM
const int num_cores = emscripten_num_logical_cores();
@@ -111,7 +111,7 @@ HWY_DLLEXPORT size_t TotalLogicalProcessors() {
#include <sys/syscall.h>
#endif

-HWY_DLLEXPORT bool GetThreadAffinity(LogicalProcessorSet& lps) {
+HWY_CONTRIB_DLLEXPORT bool GetThreadAffinity(LogicalProcessorSet& lps) {
#if HWY_OS_WIN
// Only support the first 64 because WINE does not support processor groups.
const HANDLE hThread = GetCurrentThread();
@@ -173,7 +173,7 @@ HWY_DLLEXPORT bool GetThreadAffinity(LogicalProcessorSet& lps) {
#endif
}

-HWY_DLLEXPORT bool SetThreadAffinity(const LogicalProcessorSet& lps) {
+HWY_CONTRIB_DLLEXPORT bool SetThreadAffinity(const LogicalProcessorSet& lps) {
#if HWY_OS_WIN
const HANDLE hThread = GetCurrentThread();
const DWORD_PTR prev = SetThreadAffinityMask(hThread, lps.Get64());
@@ -385,7 +385,7 @@ std::vector<PerPackage> DetectPackages(std::vector<Topology::LP>& lps) {
} // namespace
#endif // HWY_OS_LINUX

-HWY_DLLEXPORT Topology::Topology() {
+HWY_CONTRIB_DLLEXPORT Topology::Topology() {
#if HWY_OS_LINUX
lps.resize(TotalLogicalProcessors());
const std::vector<PerPackage>& per_package = DetectPackages(lps);
diff --git a/hwy/contrib/thread_pool/topology.h b/hwy/contrib/thread_pool/topology.h
index 95b0835b..f80fc47c 100644
--- a/hwy/contrib/thread_pool/topology.h
+++ b/hwy/contrib/thread_pool/topology.h
@@ -28,7 +28,7 @@
namespace hwy {

// Returns false if std::thread should not be used.
-HWY_DLLEXPORT bool HaveThreadingSupport();
+HWY_CONTRIB_DLLEXPORT bool HaveThreadingSupport();

// Upper bound on logical processors, including hyperthreads.
static constexpr size_t kMaxLogicalProcessors = 1024; // matches glibc
@@ -38,12 +38,12 @@ using LogicalProcessorSet = BitSet4096<kMaxLogicalProcessors>;

// Returns false, or sets `lps` to all logical processors which are online and
// available to the current thread.
-HWY_DLLEXPORT bool GetThreadAffinity(LogicalProcessorSet& lps);
+HWY_CONTRIB_DLLEXPORT bool GetThreadAffinity(LogicalProcessorSet& lps);

// Ensures the current thread can only run on the logical processors in `lps`.
// Returns false if not supported (in particular on Apple), or if the
// intersection between `lps` and `GetThreadAffinity` is the empty set.
-HWY_DLLEXPORT bool SetThreadAffinity(const LogicalProcessorSet& lps);
+HWY_CONTRIB_DLLEXPORT bool SetThreadAffinity(const LogicalProcessorSet& lps);

// Returns false, or ensures the current thread will only run on `lp`, which
// must not exceed `TotalLogicalProcessors`. Note that this merely calls
@@ -58,11 +58,11 @@ static inline bool PinThreadToLogicalProcessor(size_t lp) {
// provided by the hardware clamped to `kMaxLogicalProcessors`.
// These processors are not necessarily all usable; you can determine which are
// via GetThreadAffinity().
-HWY_DLLEXPORT size_t TotalLogicalProcessors();
+HWY_CONTRIB_DLLEXPORT size_t TotalLogicalProcessors();

struct Topology {
// Caller must check packages.empty(); if so, do not use any fields.
- HWY_DLLEXPORT Topology();
+ HWY_CONTRIB_DLLEXPORT Topology();

// Clique of cores with lower latency to each other. On Apple M1 these are
// four cores sharing an L2. On Zen4 these 'CCX' are up to eight cores sharing
4 changes: 3 additions & 1 deletion ports/highway/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/highway
REF "${VERSION}"
SHA512 513718873ca5d1be5c781f92ef943432da4677582e15d25a247c1d3def087fdbd3fe787608d76f32a9b4f9253df88b40bd8ea570159f8106c338ba37e8a50a8d
SHA512 e94b9cc51c81157ccd6bf4d6163445b1acc1a2667dc2650d1c4aea0a5021989c08dafcb92564fcbecb9445ab2f1779051260be2f5b29c3932803b8a42ed2f824
HEAD_REF master
PATCHES
fix_dll_export.patch #https://github.com/google/highway/pull/2229
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
Expand Down
2 changes: 1 addition & 1 deletion ports/highway/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "highway",
"version": "1.1.0",
"version": "1.2.0",
"description": "Performance-portable, length-agnostic SIMD with runtime dispatch",
"homepage": "https://github.com/google/highway",
"license": "Apache-2.0",
Expand Down
18 changes: 15 additions & 3 deletions ports/libjxl/fix-dependencies.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
index ea22103..bafb9b6 100644
index ea22103e..c6dbbe9f 100644
--- a/third_party/CMakeLists.txt
+++ b/third_party/CMakeLists.txt
@@ -48,7 +48,11 @@ endif()
@@ -31,8 +31,9 @@ if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/highway/CMakeLists.txt" AND
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/highway/LICENSE"
${PROJECT_BINARY_DIR}/LICENSE.highway COPYONLY)
else()
- find_package(HWY 1.0.7)
- if (NOT HWY_FOUND)
+ find_package(HWY NAMES hwy REQUIRED)
+ add_library(hwy ALIAS hwy::hwy)
+ if (NOT TARGET hwy::hwy)
message(FATAL_ERROR
"Highway library (hwy) not found. Install libhwy-dev or download it "
"to third_party/highway from https://github.com/google/highway . "
@@ -48,7 +49,11 @@ endif()
# brotli
if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/brotli/c/include/brotli/decode.h" OR
JPEGXL_FORCE_SYSTEM_BROTLI)
Expand All @@ -15,7 +27,7 @@ index ea22103..bafb9b6 100644
if (NOT Brotli_FOUND)
message(FATAL_ERROR
"Brotli not found, install brotli-dev or download brotli source code to"
@@ -106,7 +110,8 @@ if (JPEGXL_ENABLE_SKCMS)
@@ -106,7 +111,8 @@ if (JPEGXL_ENABLE_SKCMS)
endif ()
if (JPEGXL_ENABLE_VIEWERS OR NOT JPEGXL_ENABLE_SKCMS OR JPEGXL_ENABLE_PLUGINS)
if( NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/lcms/.git" OR JPEGXL_FORCE_SYSTEM_LCMS2 )
Expand Down
1 change: 1 addition & 0 deletions ports/libjxl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
"-DJPEGXL_VERSION=${JPEGXL_VERSION}"
-DJPEGXL_FORCE_SYSTEM_HWY=ON
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON
-DJPEGXL_FORCE_SYSTEM_HWY=ON
-DJPEGXL_FORCE_SYSTEM_LCMS2=ON
Expand Down
2 changes: 1 addition & 1 deletion ports/libjxl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "libjxl",
"version-semver": "0.10.2",
"port-version": 3,
"port-version": 4,
"description": "JPEG XL image format reference implementation",
"homepage": "https://github.com/libjxl/libjxl",
"license": "BSD-3-Clause",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3429,7 +3429,7 @@
"port-version": 1
},
"highway": {
"baseline": "1.1.0",
"baseline": "1.2.0",
"port-version": 0
},
"hikogui": {
Expand Down Expand Up @@ -4590,7 +4590,7 @@
},
"libjxl": {
"baseline": "0.10.2",
"port-version": 3
"port-version": 4
},
"libkeyfinder": {
"baseline": "2.2.8",
Expand Down
5 changes: 5 additions & 0 deletions versions/h-/highway.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "6084fa0969d208dd78997f44e8b4b406aa174345",
"version": "1.2.0",
"port-version": 0
},
{
"git-tree": "c5063ea7c7a83d9bb3d70a9ac0ea8e3fc96730c8",
"version": "1.1.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libjxl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "41e26aeaddac21391e72200277a3bcda04cd7072",
"version-semver": "0.10.2",
"port-version": 4
},
{
"git-tree": "d400085f5ae0a78f03ae828d6c51ea9882e80f76",
"version-semver": "0.10.2",
Expand Down