[mnn] Fix feature opencl compilation error under Linux (#39794)

This commit is contained in:
jim wang 2024-07-09 17:32:44 +00:00 committed by GitHub
parent 34ff6613a7
commit 9967bb4996
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 52 additions and 2 deletions

44
ports/mnn/fix-linux.patch Normal file
View File

@ -0,0 +1,44 @@
diff --git a/source/backend/cpu/CPUFixedPoint.hpp b/source/backend/cpu/CPUFixedPoint.hpp
index a5c44f9..fd2e979 100644
--- a/source/backend/cpu/CPUFixedPoint.hpp
+++ b/source/backend/cpu/CPUFixedPoint.hpp
@@ -17,7 +17,7 @@ limitations under the License.
#define CPUFixedPoint_HPP
#include <math.h>
-#include <stdint.h>
+#include <cstdint>
#include <limits>
#include <stdexcept>
#include <algorithm>
diff --git a/source/backend/opencl/schema/current/CLCache_generated.h b/source/backend/opencl/schema/current/CLCache_generated.h
index 434a666..fc972b5 100644
--- a/source/backend/opencl/schema/current/CLCache_generated.h
+++ b/source/backend/opencl/schema/current/CLCache_generated.h
@@ -403,7 +403,7 @@ inline const flatbuffers::TypeTable *ShaderTypeTable() {
"buildInfo"
};
static const flatbuffers::TypeTable tt = {
- flatbuffers::ST_TABLE, 3, type_codes, nullptr, nullptr, names
+ flatbuffers::ST_TABLE, 3, type_codes, nullptr, nullptr, nullptr, names
};
return &tt;
}
@@ -420,7 +420,7 @@ inline const flatbuffers::TypeTable *AutotuningTypeTable() {
"localSize"
};
static const flatbuffers::TypeTable tt = {
- flatbuffers::ST_TABLE, 3, type_codes, nullptr, nullptr, names
+ flatbuffers::ST_TABLE, 3, type_codes, nullptr, nullptr, nullptr, names
};
return &tt;
}
@@ -439,7 +439,7 @@ inline const flatbuffers::TypeTable *CacheTypeTable() {
"tunings"
};
static const flatbuffers::TypeTable tt = {
- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names
+ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names
};
return &tt;
}

View File

@ -10,6 +10,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
use-package-and-install.patch
fix-linux.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS

View File

@ -1,7 +1,7 @@
{
"name": "mnn",
"version": "1.1.0",
"port-version": 5,
"port-version": 6,
"description": "MNN is a blazing fast, lightweight deep learning framework, battle-tested by business-critical use cases in Alibaba",
"homepage": "https://www.mnn.zone/",
"license": "Apache-2.0",

View File

@ -5866,7 +5866,7 @@
},
"mnn": {
"baseline": "1.1.0",
"port-version": 5
"port-version": 6
},
"modern-cpp-kafka": {
"baseline": "2023.03.07",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "af18b8b69d85424bc490584793f69b7abb368947",
"version": "1.1.0",
"port-version": 6
},
{
"git-tree": "4f755e0b91f277b483ce9b157d7e10fb99b49878",
"version": "1.1.0",