summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlilac2021-09-25 22:33:51 +0800
committerlilac2021-09-25 22:33:51 +0800
commit556920a226d47e007261dc3a03a29d74a1b1a9e7 (patch)
tree452e1a07e75395e93747ec96bbeb9d024f5b1abc
parente1d4f26bb5f457fc5a6bb43acaf773307bb85c85 (diff)
downloadaur-556920a226d47e007261dc3a03a29d74a1b1a9e7.tar.gz
[lilac] updated to 1.9.0-2
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD23
-rw-r--r--clang.patch18
-rw-r--r--notes.txt10
4 files changed, 31 insertions, 33 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a1a4330155c..3f10525afcd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = python-onnxruntime
pkgdesc = Cross-platform, high performance scoring engine for ML models
- pkgver = 1.8.2
- pkgrel = 3
+ pkgver = 1.9.0
+ pkgrel = 2
url = https://github.com/microsoft/onnxruntime
arch = x86_64
license = MIT
@@ -24,6 +24,7 @@ pkgbase = python-onnxruntime
makedepends = nlohmann-json
makedepends = chrono-date
makedepends = boost
+ makedepends = eigen
makedepends = flatbuffers
makedepends = cuda
makedepends = cudnn
@@ -37,14 +38,14 @@ pkgbase = python-onnxruntime
depends = python-protobuf
depends = openmpi
options = !lto
- source = git+https://github.com/microsoft/onnxruntime#tag=v1.8.2
- source = git+https://gitlab.com/libeigen/eigen.git
+ source = git+https://github.com/microsoft/onnxruntime#tag=v1.9.0
source = git+https://github.com/onnx/onnx.git
source = git+https://github.com/dcleblanc/SafeInt.git
source = git+https://github.com/martinmoene/optional-lite.git
source = git+https://github.com/tensorflow/tensorboard.git
source = git+https://github.com/dmlc/dlpack.git
source = git+https://github.com/jarro2783/cxxopts.git
+ source = pytorch_cpuinfo::git+https://github.com/pytorch/cpuinfo.git
source = build-fixes.patch
source = clang.patch
sha512sums = SKIP
@@ -56,7 +57,7 @@ pkgbase = python-onnxruntime
sha512sums = SKIP
sha512sums = SKIP
sha512sums = 685f0235abed6e1277dd0eb9bda56c464d1987fe7fc90a3550e17ec70cc49fd15f34996a0e159f9622c4ca3e6bf29917fe51b7849342531fa2a6808d782f1e06
- sha512sums = 55ba879c015df11582ff4afaa9ccca19c0e3d3a8be503629718402dbdc826e36bc3ec3ce4dd589705371d7fcf250ba2a9b30c5a3dd0cfccb8e008346f1bd6252
+ sha512sums = ad94af8bb25744b244c4f82e9a06189741f82b295a88523ca0e8005568fac710c2299d783989457e9cf96ef8da0593fb4f70c8792d416f44ab29d6493e204f13
pkgname = python-onnxruntime
@@ -71,5 +72,5 @@ pkgname = python-onnxruntime-cuda
depends = cuda
depends = cudnn
depends = nccl
- provides = python-onnxruntime=1.8.2
+ provides = python-onnxruntime=1.9.0
conflicts = python-onnxruntime
diff --git a/PKGBUILD b/PKGBUILD
index 1a876f562bf..e2765479fd3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,27 +2,25 @@
pkgbase=python-onnxruntime
pkgname=(python-onnxruntime python-onnxruntime-cuda)
-pkgver=1.8.2
+pkgver=1.9.0
pkgdesc='Cross-platform, high performance scoring engine for ML models'
-pkgrel=3
+pkgrel=2
arch=(x86_64)
url='https://github.com/microsoft/onnxruntime'
license=(MIT)
depends=(nsync re2 python-flatbuffers python-numpy python-onnx python-protobuf openmpi)
-makedepends=(git cmake gtest gmock pybind11 python-setuptools nlohmann-json chrono-date boost flatbuffers cuda cudnn nccl clang)
+makedepends=(git cmake gtest gmock pybind11 python-setuptools nlohmann-json chrono-date boost eigen flatbuffers cuda cudnn nccl clang)
checkdepends=(python-pytest python-pytorch python-h5py python-pandas python-psutil python-tqdm python-sympy python-torchvision tensorboard python-cerberus)
# not de-vendored libraries
-# eigen: API changes a lot since extra/eigen 3.3.7 to the commit onnxruntime uses
# onnx: needs shared libonnx (https://github.com/onnx/onnx/issues/3030)
-# https://github.com/microsoft/onnxruntime/blob/v1.1.2/onnxruntime/core/protobuf/onnx-ml.proto#L250-L251
source=("git+https://github.com/microsoft/onnxruntime#tag=v$pkgver"
- "git+https://gitlab.com/libeigen/eigen.git"
"git+https://github.com/onnx/onnx.git"
"git+https://github.com/dcleblanc/SafeInt.git"
"git+https://github.com/martinmoene/optional-lite.git"
"git+https://github.com/tensorflow/tensorboard.git"
"git+https://github.com/dmlc/dlpack.git"
"git+https://github.com/jarro2783/cxxopts.git"
+ "pytorch_cpuinfo::git+https://github.com/pytorch/cpuinfo.git"
build-fixes.patch
clang.patch)
sha512sums=('SKIP'
@@ -34,7 +32,7 @@ sha512sums=('SKIP'
'SKIP'
'SKIP'
'685f0235abed6e1277dd0eb9bda56c464d1987fe7fc90a3550e17ec70cc49fd15f34996a0e159f9622c4ca3e6bf29917fe51b7849342531fa2a6808d782f1e06'
- '55ba879c015df11582ff4afaa9ccca19c0e3d3a8be503629718402dbdc826e36bc3ec3ce4dd589705371d7fcf250ba2a9b30c5a3dd0cfccb8e008346f1bd6252')
+ 'ad94af8bb25744b244c4f82e9a06189741f82b295a88523ca0e8005568fac710c2299d783989457e9cf96ef8da0593fb4f70c8792d416f44ab29d6493e204f13')
# CUDA seems not working with LTO
options+=('!lto')
@@ -47,8 +45,12 @@ prepare() {
patch -Np1 -i ../build-fixes.patch
patch -Np1 -i ../clang.patch
+ # 1.9.0 is marked as 1.10.0 https://github.com/microsoft/onnxruntime/blob/v1.9.0/VERSION_NUMBER
+ # Official wheels are not affected, though
+ echo $pkgver > VERSION_NUMBER
+
git submodule init
- for mod in eigen onnx SafeInt optional-lite tensorboard dlpack cxxopts; do
+ for mod in onnx SafeInt optional-lite tensorboard dlpack cxxopts pytorch_cpuinfo; do
git config submodule.cmake/external/$mod.url "$srcdir"/$mod
git submodule update cmake/external/$mod
done
@@ -71,6 +73,8 @@ _build() {
-Donnxruntime_BUILD_SHARED_LIB=ON \
-Donnxruntime_ENABLE_TRAINING=ON \
-Donnxruntime_USE_MPI=ON \
+ -Donnxruntime_USE_PREINSTALLED_EIGEN=ON \
+ -Deigen_SOURCE_PATH=/usr/include/eigen3 \
"$@"
cd $build_dir
@@ -115,7 +119,8 @@ _check() {
LD_LIBRARY_PATH="$PWD" pytest \
--ignore launch_test.py \
--ignore orttraining_run_bert_pretrain.py \
- --ignore orttraining_run_frontend_batch_size_test.py || echo Test failed!!
+ --ignore orttraining_run_frontend_batch_size_test.py \
+ --ignore transformers
}
check() {
diff --git a/clang.patch b/clang.patch
index e1445eb36df..ab6bb90fa31 100644
--- a/clang.patch
+++ b/clang.patch
@@ -2,15 +2,6 @@ diff --git a/onnxruntime/core/providers/cuda/reduction/reduction_functions.cc b/
index 955df6d9a..f9fd53e15 100644
--- a/onnxruntime/core/providers/cuda/reduction/reduction_functions.cc
+++ b/onnxruntime/core/providers/cuda/reduction/reduction_functions.cc
-@@ -17,7 +17,7 @@ namespace cuda {
-
- namespace {
- // std::make_reverse_iterator is not implemented in older versions of GCC
--#if !defined(__GNUC__) || __GNUC__ >= 5
-+#if !defined(__GNUC__) || __GNUC__ >= 5 || defined(__clang__)
- using std::make_reverse_iterator;
- #else
- template <typename It>
@@ -39,7 +39,7 @@ optional<std::pair<int64_t, int64_t>> GetMinAndMaxContiguousAxes(
}
@@ -20,15 +11,6 @@ index 955df6d9a..f9fd53e15 100644
std::vector<int64_t> result(original_axes);
std::for_each(
result.begin(), result.end(),
-@@ -73,7 +73,7 @@ optional<std::pair<int64_t, int64_t>> GetMinAndMaxContiguousAxes(
- }
-
- // expand axes over surrounding dimensions with value of 1
-- const int64_t min_axis = [&dims, &axes, &is_dim_one]() {
-+ const int64_t min_axis = [&dims, &axes, &is_dim_one]() -> int64_t {
- const auto& min_given_axis = axes.front();
- // note that std::reverse_iterator(it) refers to the element at (it-1)
- // it -> reverse it: element offset of -1
@@ -85,7 +85,7 @@ optional<std::pair<int64_t, int64_t>> GetMinAndMaxContiguousAxes(
return std::distance(dims.begin(), before_min_axis_rit.base());
}();
diff --git a/notes.txt b/notes.txt
new file mode 100644
index 00000000000..cc19868adbd
--- /dev/null
+++ b/notes.txt
@@ -0,0 +1,10 @@
+Merging two builds?
+ Since 1.9.0, "GPU package can be used on both CPU-only and GPU machines" [1]
+ Package size considerations: make libonnxruntime_providers_cuda.so a separate package
+ There will be warnings from the CUDA build on non-CUDA machines
+ /usr/lib/python3.9/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py:352: UserWarning: Deprecation warning. This ORT build has ['CUDAExecutionProvider', 'CPUExecutionProvider'] enabled. The next release (ORT 1.10) will require explicitly setting the providers parameter (as opposed to the current behavior of providers getting set/registered by default based on the build flags) when instantiating InferenceSession.For example, onnxruntime.InferenceSession(..., providers=["CUDAExecutionProvider"], ...)
+ warnings.warn("Deprecation warning. This ORT build has {} enabled. ".format(available_providers) +
+ 2021-09-23 23:47:08.573828136 [E:onnxruntime:Default, provider_bridge_ort.cc:944 Get] Failed to load library libonnxruntime_providers_cuda.so with error: libcublas.so.11: cannot open shared object file: No such file or directory
+ 2021-09-23 23:47:08.574000870 [E:onnxruntime:Default, provider_bridge_ort.cc:944 Get] Failed to load library libonnxruntime_providers_cuda.so with error: libcublas.so.11: cannot open shared object file: No such file or directory
+
+ [1] https://github.com/microsoft/onnxruntime/releases/tag/v1.9.0