summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD7
-rw-r--r--protobuf-3.20.diff13
3 files changed, 23 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 95eb96db7d8d..e3190713ee85 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -24,6 +24,7 @@ pkgbase = python-onnxruntime
depends = python-protobuf
depends = openmpi
depends = onednn
+ depends = libprotobuf-lite.so
optdepends = python-onnx: for the backend API, quantization, orttraining, transformers and various tools
optdepends = python-coloredlogs: for transformers
optdepends = python-psutil: for transformers
@@ -46,6 +47,7 @@ pkgbase = python-onnxruntime
source = pytorch_cpuinfo::git+https://github.com/pytorch/cpuinfo.git
source = build-fixes.patch
source = install-orttraining-files.diff
+ source = protobuf-3.20.diff
source = system-dnnl.diff
sha512sums = SKIP
sha512sums = SKIP
@@ -56,20 +58,15 @@ pkgbase = python-onnxruntime
sha512sums = SKIP
sha512sums = 80ea85ea20bbbdec7991f965a66b627a5f42828bc0c72be0913078d927833a82402fb1af6c5c9f6ecae861b45582fa42c98ce83b02768e4bf875ab89dd1c607c
sha512sums = 06a002361cc324184d0bfcb520b472f57749c0537329f0e0dee833cc7fce2f08b14590b77bc0211422dfb933dbef6f249f19939f9e0df465c48ee8fc7827e31c
+ sha512sums = 5b1b5c20efb2df48c651b957824d497e5465b2e572c9f12bf43546301ecc55f3ff5bb1004b491283a3957c18ff23220bad664dbcf6bcab9dc38cd77cdac30f6e
sha512sums = 6735c7aca2ba2f1f2a5286eb064125bf7f2c68a575d572dd157769d15778ff3e717b3a53d696c767748229f23ee6c3a7c82679df1d86283d7c4dd0ec9103ae08
pkgname = python-onnxruntime
pkgname = python-onnxruntime-cuda
pkgdesc = Cross-platform, high performance scoring engine for ML models (CUDA execution provider)
- depends = nsync
- depends = re2
- depends = python-flatbuffers
- depends = python-numpy
- depends = python-protobuf
- depends = openmpi
- depends = onednn
depends = cuda
depends = cudnn
depends = nccl
- depends = python-onnxruntime
+ depends = openmpi
+ depends = nsync
diff --git a/PKGBUILD b/PKGBUILD
index 644901d6819c..c59ef1b82a23 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,7 +10,7 @@ pkgrel=1
arch=(x86_64)
url='https://github.com/microsoft/onnxruntime'
license=(MIT)
-depends=(nsync re2 python-flatbuffers python-numpy python-protobuf openmpi onednn)
+depends=(nsync re2 python-flatbuffers python-numpy python-protobuf openmpi onednn libprotobuf-lite.so)
makedepends=(git cmake pybind11 python-setuptools nlohmann-json chrono-date boost eigen flatbuffers cuda cudnn nccl)
optdepends=(
# https://github.com/microsoft/onnxruntime/pull/9969
@@ -38,6 +38,7 @@ source=("git+https://github.com/microsoft/onnxruntime#tag=v$pkgver"
"pytorch_cpuinfo::git+https://github.com/pytorch/cpuinfo.git"
build-fixes.patch
install-orttraining-files.diff
+ protobuf-3.20.diff
system-dnnl.diff)
sha512sums=('SKIP'
'SKIP'
@@ -48,6 +49,7 @@ sha512sums=('SKIP'
'SKIP'
'80ea85ea20bbbdec7991f965a66b627a5f42828bc0c72be0913078d927833a82402fb1af6c5c9f6ecae861b45582fa42c98ce83b02768e4bf875ab89dd1c607c'
'06a002361cc324184d0bfcb520b472f57749c0537329f0e0dee833cc7fce2f08b14590b77bc0211422dfb933dbef6f249f19939f9e0df465c48ee8fc7827e31c'
+ '5b1b5c20efb2df48c651b957824d497e5465b2e572c9f12bf43546301ecc55f3ff5bb1004b491283a3957c18ff23220bad664dbcf6bcab9dc38cd77cdac30f6e'
'6735c7aca2ba2f1f2a5286eb064125bf7f2c68a575d572dd157769d15778ff3e717b3a53d696c767748229f23ee6c3a7c82679df1d86283d7c4dd0ec9103ae08')
# CUDA seems not working with LTO
options+=('!lto')
@@ -60,6 +62,7 @@ prepare() {
patch -Np1 -i ../build-fixes.patch
patch -Np1 -i ../install-orttraining-files.diff
+ patch -Np1 -i ../protobuf-3.20.diff
patch -Np1 -i ../system-dnnl.diff
git submodule init
@@ -138,7 +141,7 @@ package_python-onnxruntime() {
}
package_python-onnxruntime-cuda() {
- depends+=(cuda cudnn nccl python-onnxruntime)
+ depends=(cuda cudnn nccl openmpi nsync)
pkgdesc+=' (CUDA execution provider)'
cd onnxruntime/build
diff --git a/protobuf-3.20.diff b/protobuf-3.20.diff
new file mode 100644
index 000000000000..908f06e14105
--- /dev/null
+++ b/protobuf-3.20.diff
@@ -0,0 +1,13 @@
+diff --git a/onnxruntime/core/framework/tensorprotoutils.cc b/onnxruntime/core/framework/tensorprotoutils.cc
+index 085c1ffbe..a9070d5e4 100644
+--- a/onnxruntime/core/framework/tensorprotoutils.cc
++++ b/onnxruntime/core/framework/tensorprotoutils.cc
+@@ -256,7 +256,7 @@ Status UnpackTensor(const ONNX_NAMESPACE::TensorProto& tensor, const void* raw_d
+ ") does not match the data size(", tensor.field_size(), ") in proto"); \
+ auto& data = tensor.field_name(); \
+ for (auto data_iter = data.cbegin(); data_iter != data.cend(); ++data_iter) \
+- *p_data++ = *reinterpret_cast<const T*>(data_iter); \
++ *p_data++ = *data_iter; \
+ return Status::OK(); \
+ }
+