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

[ncnn] Update to 20240102 #35978

Merged
merged 6 commits into from
Feb 22, 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
42 changes: 42 additions & 0 deletions ports/ncnn/fix_uwp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
diff --git a/src/cpu.cpp b/src/cpu.cpp
index e56cd67..3ca1189 100644
--- a/src/cpu.cpp
+++ b/src/cpu.cpp
@@ -184,6 +184,13 @@ static int g_cpu_is_arm_a53_a55;
#endif // defined __ANDROID__ || defined __linux__

#if defined _WIN32
+#if WINAPI_FAMILY == WINAPI_FAMILY_APP
+static int detectisa(const void* /*some_inst*/)
+{
+ // uwp does not support seh :(
+ return 0;
+}
+#else // WINAPI_FAMILY == WINAPI_FAMILY_APP
static int g_sigill_caught = 0;
static jmp_buf g_jmpbuf;

@@ -213,6 +220,7 @@ static int detectisa(const void* some_inst)

return g_sigill_caught ? 0 : 1;
}
+#endif // WINAPI_FAMILY == WINAPI_FAMILY_APP

#if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64)
#ifdef _MSC_VER
@@ -1966,12 +1974,12 @@ static void initialize_global_cpu_info()

#if defined _WIN32
#if __arm__
- g_cpu_support_arm_neon = detectisa(some_neon);
+ g_cpu_support_arm_neon = 1; // all modern windows arm devices have neon
g_cpu_support_arm_vfpv4 = detectisa(some_vfpv4);
#if __aarch64__
g_cpu_support_arm_cpuid = detectisa(some_cpuid);
- g_cpu_support_arm_asimdhp = detectisa(some_asimdhp);
- g_cpu_support_arm_asimddp = detectisa(some_asimddp);
+ g_cpu_support_arm_asimdhp = detectisa(some_asimdhp) || IsProcessorFeaturePresent(43); // dp implies hp
+ g_cpu_support_arm_asimddp = detectisa(some_asimddp) || IsProcessorFeaturePresent(43); // 43 is PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE
g_cpu_support_arm_asimdfhm = detectisa(some_asimdfhm);
g_cpu_support_arm_bf16 = detectisa(some_bf16);
g_cpu_support_arm_i8mm = detectisa(some_i8mm);
4 changes: 3 additions & 1 deletion ports/ncnn/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 Tencent/ncnn
REF "${VERSION}"
SHA512 722966b3b30c5a4df81c6d45237b1821acc69db0c78350a41e3bc60e3f40c3dc64587ae0ab223635c468314c665e477ee7e0c2d3d4cccbc72bb15aeb56dcda6c
SHA512 31bc3c2f461a00241fb8f69ca6ea8cc590af6618856b1b84a048bde924e4b474fd883ad5d54dbfbdd1e5b59015889e15ffc4fbafccb3e42e052a02071f2017b1
HEAD_REF master
PATCHES
fix_uwp.patch #https://github.com/Tencent/ncnn/pull/5328
)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
Expand Down
2 changes: 1 addition & 1 deletion ports/ncnn/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ncnn",
"version": "20231027",
"version": "20240102",
"description": "ncnn is a high-performance neural network inference computing framework.",
"homepage": "https://github.com/Tencent/ncnn",
"license": "BSD-3-Clause",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5905,7 +5905,7 @@
"port-version": 2
},
"ncnn": {
"baseline": "20231027",
"baseline": "20240102",
"port-version": 0
},
"ncurses": {
Expand Down
5 changes: 5 additions & 0 deletions versions/n-/ncnn.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "322a0f4cfc94f9d73060a9636854a8e1260796fd",
"version": "20240102",
"port-version": 0
},
{
"git-tree": "2a6a2a9cc4c71cac799469f587478b987a63e0ed",
"version": "20231027",
Expand Down