summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlilac2020-07-18 19:01:05 +0800
committerlilac2020-07-18 19:01:05 +0800
commit978405e1cc7badf3c4d661963c7b850f80dec649 (patch)
treeabcdc509af44b85da7e897dfa40a3ebe911cbff0
parentd218a459beecc1e2845309c3fdb52cfbf459e2fb (diff)
downloadaur-978405e1cc7badf3c4d661963c7b850f80dec649.tar.gz
[lilac] updated to 1.4.0-2
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD33
-rw-r--r--build-fixes.patch64
3 files changed, 22 insertions, 97 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9de83653f38..aeb1e1b5eeb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,39 +1,35 @@
pkgbase = python-onnxruntime
pkgdesc = Cross-platform, high performance scoring engine for ML models
- pkgver = 1.3.1
- pkgrel = 1
+ pkgver = 1.4.0
+ pkgrel = 2
url = https://github.com/microsoft/onnxruntime
arch = x86_64
license = MIT
makedepends = git
makedepends = cmake
+ makedepends = gtest
+ makedepends = gmock
makedepends = pybind11
makedepends = python-setuptools
makedepends = nlohmann-json
makedepends = chrono-date
- depends = protobuf
+ depends = nsync
depends = re2
depends = python-numpy
- source = git+https://github.com/microsoft/onnxruntime#tag=v1.3.1
+ depends = python-onnx
+ depends = python-protobuf
+ source = git+https://github.com/microsoft/onnxruntime#tag=v1.4.0
source = git+https://gitlab.com/libeigen/eigen.git
source = git+https://github.com/google/gemmlowp.git
- source = git+https://github.com/google/nsync.git
source = git+https://github.com/onnx/onnx.git
source = git+https://github.com/dcleblanc/SafeInt.git
- source = git+https://github.com/microsoft/wil.git
source = build-fixes.patch
- source = gcc10.diff
- source = protobuf-debundle.patch
sha512sums = SKIP
sha512sums = SKIP
sha512sums = SKIP
sha512sums = SKIP
sha512sums = SKIP
- sha512sums = SKIP
- sha512sums = SKIP
- sha512sums = 8ece04a7f2ffc89aa9da0a34db1febf31a0516dc2271f2fa711e8160577b2195ba746c150ed76506ce378e913be2888947e21d5745e52fe6d248b1d5aa7f2a83
- sha512sums = cc4fe39dba1d1565ebea51c90fa81ea18975d12db60468d6508b386d1423e5500b3579bce7c5d633a5504163248f5278aaaca6374b90c282344575b911dd852a
- sha512sums = a147afdd18d68f7aa5ba06f69993d06876e9c80bfe42dedf7e279576a2fc19a177f6441122cde905771b57fc747a561d215df8729cd0ca6289cf1fbc398efd30
+ sha512sums = 6e696c527fb616145910689d5b7ac2090365cedd5e4d9c76baaacbe55ac9bc8d6acc8759874e1eb0f817e0ecaa29e6b66ad2e967785fa00b2d5da50b8c1ffb15
pkgname = python-onnxruntime
diff --git a/PKGBUILD b/PKGBUILD
index 3cda6787d0b..8f6cf9d2bb7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,14 +1,14 @@
# Maintainer: Chih-Hsuan Yen <yan12125@gmail.com>
pkgname=python-onnxruntime
-pkgver=1.3.1
+pkgver=1.4.0
pkgdesc='Cross-platform, high performance scoring engine for ML models'
-pkgrel=1
+pkgrel=2
arch=(x86_64)
url='https://github.com/microsoft/onnxruntime'
license=(MIT)
-depends=(protobuf re2 python-numpy)
-makedepends=(git cmake pybind11 python-setuptools nlohmann-json chrono-date)
+depends=(nsync re2 python-numpy python-onnx python-protobuf)
+makedepends=(git cmake gtest gmock pybind11 python-setuptools nlohmann-json chrono-date)
# not de-vendored libraries
# eigen: API changes a lot since extra/eigen 3.3.7 to the commit onnxruntime uses
# onnx: onnxruntime uses different protobuf files than upstream onnx
@@ -16,34 +16,23 @@ makedepends=(git cmake pybind11 python-setuptools nlohmann-json chrono-date)
source=("git+https://github.com/microsoft/onnxruntime#tag=v$pkgver"
"git+https://gitlab.com/libeigen/eigen.git"
"git+https://github.com/google/gemmlowp.git"
- "git+https://github.com/google/nsync.git"
"git+https://github.com/onnx/onnx.git"
"git+https://github.com/dcleblanc/SafeInt.git"
- "git+https://github.com/microsoft/wil.git"
- build-fixes.patch
- gcc10.diff
- protobuf-debundle.patch)
+ build-fixes.patch)
sha512sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
- 'SKIP'
- 'SKIP'
- '8ece04a7f2ffc89aa9da0a34db1febf31a0516dc2271f2fa711e8160577b2195ba746c150ed76506ce378e913be2888947e21d5745e52fe6d248b1d5aa7f2a83'
- 'cc4fe39dba1d1565ebea51c90fa81ea18975d12db60468d6508b386d1423e5500b3579bce7c5d633a5504163248f5278aaaca6374b90c282344575b911dd852a'
- 'a147afdd18d68f7aa5ba06f69993d06876e9c80bfe42dedf7e279576a2fc19a177f6441122cde905771b57fc747a561d215df8729cd0ca6289cf1fbc398efd30')
+ '6e696c527fb616145910689d5b7ac2090365cedd5e4d9c76baaacbe55ac9bc8d6acc8759874e1eb0f817e0ecaa29e6b66ad2e967785fa00b2d5da50b8c1ffb15')
prepare() {
cd onnxruntime
patch -Np1 -i ../build-fixes.patch
- # part of https://github.com/microsoft/onnxruntime/commit/e86214e5c00ffbb95b85478c111c8eb21de94fe9
- patch -Np1 -i ../gcc10.diff
- patch -Np1 -i ../protobuf-debundle.patch
git submodule init
- for mod in eigen gemmlowp nsync onnx SafeInt wil; do
+ for mod in eigen gemmlowp onnx SafeInt; do
git config submodule.cmake/external/$mod.url "$srcdir"/$mod
git submodule update cmake/external/$mod
done
@@ -57,14 +46,18 @@ build() {
-Donnxruntime_ENABLE_PYTHON=ON \
-DONNX_CUSTOM_PROTOC_EXECUTABLE=/usr/bin/protoc \
-Donnxruntime_PREFER_SYSTEM_LIB=ON \
- -Donnxruntime_USE_FULL_PROTOBUF=OFF \
- -Donnxruntime_BUILD_UNIT_TESTS=OFF
+ -Donnxruntime_USE_FULL_PROTOBUF=OFF
cd build
make
python ../setup.py build
}
+check() {
+ cd onnxruntime/build
+ make test
+}
+
package() {
cd onnxruntime/build
python ../setup.py install --root="$pkgdir" --skip-build --optimize=1
diff --git a/build-fixes.patch b/build-fixes.patch
index dc1e234dcda..2a0487ca606 100644
--- a/build-fixes.patch
+++ b/build-fixes.patch
@@ -2,15 +2,6 @@ diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 3cee60f3..3328fc06 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
-@@ -314,7 +314,7 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/external)
-
- if(onnxruntime_PREFER_SYSTEM_LIB)
- set(protobuf_MODULE_COMPATIBLE ON)
-- find_package(protobuf)
-+ find_package(Protobuf)
- endif()
-
-
@@ -327,7 +327,7 @@ if(Protobuf_FOUND OR Protobuf_FOUND)
if(NOT Protobuf_USE_STATIC_LIBS)
#Indeed here should be a warning, not a fatal error. ONNX Runtime itself can work in such a
@@ -29,32 +20,6 @@ index 3cee60f3..3328fc06 100644
if(onnxruntime_PREFER_SYSTEM_LIB)
find_package(re2)
-@@ -1009,18 +1009,19 @@
- # some of the tests rely on the shared libs to be
- # built; hence the ordering
- if (onnxruntime_BUILD_UNIT_TESTS)
-- if (onnxruntime_ENABLE_PYTHON)
-- if(UNIX)
-- set(CMAKE_SKIP_BUILD_RPATH ON)
-- endif()
-- include(onnxruntime_python.cmake)
-- endif()
- # we need to make sure this is turned off since it
- # turned ON by the previous step when building a shared lib
- set(CMAKE_SKIP_BUILD_RPATH OFF)
- include(onnxruntime_unittests.cmake)
- endif()
-
-+if (onnxruntime_ENABLE_PYTHON)
-+ if(UNIX)
-+ set(CMAKE_SKIP_BUILD_RPATH ON)
-+ endif()
-+ include(onnxruntime_python.cmake)
-+endif()
-+
- if (onnxruntime_ENABLE_TRAINING)
- include(onnxruntime_training.cmake)
- if (onnxruntime_ENABLE_TRAINING_E2E_TESTS)
diff --git a/cmake/external/Findre2.cmake b/cmake/external/Findre2.cmake
new file mode 100644
index 00000000..4c91696c
@@ -77,35 +42,6 @@ index d33e9e14..5770e818 100644
target_include_directories(onnxruntime_common
PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${ONNXRUNTIME_ROOT} ${eigen_INCLUDE_DIRS}
# safeint is part of onnxruntime_common public interface, so we want to propagate its includes
-diff --git a/cmake/onnxruntime_python.cmake b/cmake/onnxruntime_python.cmake
-index 7dce1309..7102975b 100644
---- a/cmake/onnxruntime_python.cmake
-+++ b/cmake/onnxruntime_python.cmake
-@@ -1,7 +1,6 @@
- # Copyright (c) Microsoft Corporation. All rights reserved.
- # Licensed under the MIT License.
-
--include(pybind11)
- FIND_PACKAGE(NumPy)
-
- if(NOT PYTHON_INCLUDE_DIR)
-@@ -99,7 +98,6 @@ endif()
-
- set(onnxruntime_pybind11_state_dependencies
- ${onnxruntime_EXTERNAL_DEPENDENCIES}
-- ${pybind11_dep}
- )
- set_property(TARGET onnxruntime_pybind11_state APPEND_STRING PROPERTY LINK_FLAGS ${ONNXRUNTIME_SO_LINK_FLAG} ${onnxruntime_DELAYLOAD_FLAGS})
- add_dependencies(onnxruntime_pybind11_state ${onnxruntime_pybind11_state_dependencies})
-@@ -192,7 +190,7 @@
- "${ONNXRUNTIME_ROOT}/python/datasets/*.onnx"
- )
-
--set(test_data_target onnxruntime_test_all)
-+set(test_data_target onnxruntime_pybind11_state)
-
- add_custom_command(
- TARGET onnxruntime_pybind11_state POST_BUILD
diff --git a/cmake/onnxruntime_unittests.cmake b/cmake/onnxruntime_unittests.cmake
index d1bd347c..0c4b81e4 100644
--- a/cmake/onnxruntime_unittests.cmake