Skip to content

Commit

Permalink
[onnxruntime] use GNUInstallDirs, fix xnnpack link
Browse files Browse the repository at this point in the history
  • Loading branch information
luncliff committed Jan 7, 2024
1 parent d258c96 commit 4f9f55f
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 24 deletions.
2 changes: 1 addition & 1 deletion ports/onnxruntime/fix-cmake.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ index 34355fb..8b69561 100644
include(CheckLanguage)
include(CMakeDependentOption)
-include(FetchContent)
+# include(FetchContent) # Using vcpkg. See external/onnxruntime_vcpkg_deps.cmake
+include(GNUInstallDirs) # Using vcpkg. See external/onnxruntime_vcpkg_deps.cmake
include(CheckFunctionExists)

# TODO: update this once all system adapt c++20
Expand Down
7 changes: 4 additions & 3 deletions ports/onnxruntime/onnxruntime_vcpkg_deps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ endif()

if (NOT WIN32)
find_package(nsync CONFIG REQUIRED)
list(APPEND onnxruntime_EXTERNAL_DEPENDENCIES nsync::nsync_cpp)
list(APPEND onnxruntime_EXTERNAL_LIBRARIES nsync::nsync_cpp)
endif()

find_package(Microsoft.GSL CONFIG REQUIRED)
Expand All @@ -80,9 +80,10 @@ if (onnxruntime_USE_XNNPACK)
message(FATAL_ERROR "XNNPACK EP requires the internal NHWC contrib ops to be available "
"but onnxruntime_DISABLE_CONTRIB_OPS is ON")
endif()
find_package(xnnpack CONFIG REQUIRED) # xnnpack
find_package(cpuinfo CONFIG REQUIRED)
find_library(PTHREADPOOL_LIBRARY NAMES pthreadpool REQUIRED)
list(APPEND onnxruntime_EXTERNAL_LIBRARIES xnnpack ${PTHREADPOOL_LIBRARY})
find_package(xnnpack CONFIG REQUIRED) # xnnpack
list(APPEND onnxruntime_EXTERNAL_LIBRARIES cpuinfo::cpuinfo ${PTHREADPOOL_LIBRARY} xnnpack)
endif()

if (onnxruntime_USE_MIMALLOC)
Expand Down
36 changes: 18 additions & 18 deletions ports/onnxruntime/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,43 +65,43 @@
"description": "Artifact will be Apple framework",
"supports": "osx | ios"
},
"python": {
"description": "Enable python buildings",
"mpi": {
"description": "Build with MPI support",
"dependencies": [
{
"name": "vcpkg-get-python-packages",
"host": true
}
"mpi"
]
},
"nccl": {
"description": "Build with NCCL support"
},
"openvino": {
"description": "Build with OpenVINO support",
"dependencies": [
"openvino"
]
},
"training": {
"description": "Build with NCCL support"
"python": {
"description": "Enable python buildings",
"dependencies": [
{
"name": "vcpkg-get-python-packages",
"host": true
}
]
},
"tensorrt": {
"description": "Build with NVIDIA TensorRT support"
},
"nccl": {
"description": "Build with NCCL support"
},
"mpi": {
"description": "Build with MPI support",
"dependencies": [
"mpi"
]
},
"test": {
"description": "Build ONNXRuntime unit tests",
"dependencies": [
"benchmark",
"gtest"
]
},
"training": {
"description": "Build with NCCL support"
},
"winml": {
"description": "Build with WinML support"
},
Expand All @@ -112,4 +112,4 @@
]
}
}
}
}
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
"port-version": 0
},
"onnxruntime": {
"baseline": "1.16.0",
"port-version": 1
"baseline": "2024-01-04",
"port-version": 0
},
"openssl": {
"baseline": "3.1.3",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/onnxruntime.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "c84b3a4afbe389b3452d376c7aad3abb42435710",
"version-date": "2024-01-04",
"port-version": 0
},
{
"git-tree": "e9046291855178e0aebf9728e65f233a5507c3c0",
"version-semver": "1.16.0",
Expand Down

0 comments on commit 4f9f55f

Please sign in to comment.