summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlilac2020-10-01 05:37:07 +0800
committerlilac2020-10-01 05:37:07 +0800
commit28cd00f131aef235d4ecdde89b6f17e29e7a163f (patch)
tree26f6a64ba3277e8529347a4be6f0ccf27a6136b9
parent978405e1cc7badf3c4d661963c7b850f80dec649 (diff)
downloadaur-28cd00f131aef235d4ecdde89b6f17e29e7a163f.tar.gz
[lilac] updated to 1.5.1-2
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD6
-rw-r--r--build-fixes.patch14
-rw-r--r--gcc10.diff12
-rw-r--r--nlohmann-json.diff11
-rw-r--r--protobuf-debundle.patch308
6 files changed, 19 insertions, 339 deletions
diff --git a/.SRCINFO b/.SRCINFO
index aeb1e1b5eeb..e7df597a032 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = python-onnxruntime
pkgdesc = Cross-platform, high performance scoring engine for ML models
- pkgver = 1.4.0
+ pkgver = 1.5.1
pkgrel = 2
url = https://github.com/microsoft/onnxruntime
arch = x86_64
@@ -15,10 +15,11 @@ pkgbase = python-onnxruntime
makedepends = chrono-date
depends = nsync
depends = re2
+ depends = flatbuffers
depends = python-numpy
depends = python-onnx
depends = python-protobuf
- source = git+https://github.com/microsoft/onnxruntime#tag=v1.4.0
+ source = git+https://github.com/microsoft/onnxruntime#tag=v1.5.1
source = git+https://gitlab.com/libeigen/eigen.git
source = git+https://github.com/google/gemmlowp.git
source = git+https://github.com/onnx/onnx.git
@@ -29,7 +30,7 @@ pkgbase = python-onnxruntime
sha512sums = SKIP
sha512sums = SKIP
sha512sums = SKIP
- sha512sums = 6e696c527fb616145910689d5b7ac2090365cedd5e4d9c76baaacbe55ac9bc8d6acc8759874e1eb0f817e0ecaa29e6b66ad2e967785fa00b2d5da50b8c1ffb15
+ sha512sums = 978d01b73610aa75fe2c02046f8bce4d26b35a7e0d499bebbb067ba7397388b4bb50280ddd1ae639207478a395c577a343f41c3e2954a1ca7155c98fa91a2cf8
pkgname = python-onnxruntime
diff --git a/PKGBUILD b/PKGBUILD
index 8f6cf9d2bb7..698538134e6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,13 +1,13 @@
# Maintainer: Chih-Hsuan Yen <yan12125@gmail.com>
pkgname=python-onnxruntime
-pkgver=1.4.0
+pkgver=1.5.1
pkgdesc='Cross-platform, high performance scoring engine for ML models'
pkgrel=2
arch=(x86_64)
url='https://github.com/microsoft/onnxruntime'
license=(MIT)
-depends=(nsync re2 python-numpy python-onnx python-protobuf)
+depends=(nsync re2 flatbuffers 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
@@ -24,7 +24,7 @@ sha512sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
- '6e696c527fb616145910689d5b7ac2090365cedd5e4d9c76baaacbe55ac9bc8d6acc8759874e1eb0f817e0ecaa29e6b66ad2e967785fa00b2d5da50b8c1ffb15')
+ '978d01b73610aa75fe2c02046f8bce4d26b35a7e0d499bebbb067ba7397388b4bb50280ddd1ae639207478a395c577a343f41c3e2954a1ca7155c98fa91a2cf8')
prepare() {
cd onnxruntime
diff --git a/build-fixes.patch b/build-fixes.patch
index 2a0487ca606..0e7af3e3778 100644
--- a/build-fixes.patch
+++ b/build-fixes.patch
@@ -20,6 +20,16 @@ index 3cee60f3..3328fc06 100644
if(onnxruntime_PREFER_SYSTEM_LIB)
find_package(re2)
+@@ -802,7 +802,8 @@
+ set(FLATBUFFERS_INSTALL OFF CACHE BOOL "FLATBUFFERS_INSTALL" FORCE)
+ set(FLATBUFFERS_BUILD_FLATHASH OFF CACHE BOOL "FLATBUFFERS_BUILD_FLATHASH" FORCE)
+ set(FLATBUFFERS_BUILD_FLATLIB ON CACHE BOOL "FLATBUFFERS_BUILD_FLATLIB" FORCE)
+-add_subdirectory(external/flatbuffers EXCLUDE_FROM_ALL)
++find_package(Flatbuffers REQUIRED)
++add_library(flatbuffers ALIAS flatbuffers::flatbuffers_shared)
+ list(APPEND onnxruntime_EXTERNAL_DEPENDENCIES flatbuffers)
+ list(APPEND onnxruntime_EXTERNAL_LIBRARIES flatbuffers)
+
diff --git a/cmake/external/Findre2.cmake b/cmake/external/Findre2.cmake
new file mode 100644
index 00000000..4c91696c
@@ -50,8 +60,8 @@ index d1bd347c..0c4b81e4 100644
else()
target_link_libraries(${_UT_TARGET} PRIVATE ${_UT_LIBS} GTest::gtest GTest::gmock ${onnxruntime_EXTERNAL_LIBRARIES})
endif()
-- onnxruntime_add_include_to_target(${_UT_TARGET} date_interface)
-+ onnxruntime_add_include_to_target(${_UT_TARGET} date::date)
+- onnxruntime_add_include_to_target(${_UT_TARGET} date_interface flatbuffers)
++ onnxruntime_add_include_to_target(${_UT_TARGET} date::date flatbuffers)
target_include_directories(${_UT_TARGET} PRIVATE ${TEST_INC_DIR})
if (onnxruntime_USE_CUDA)
target_include_directories(${_UT_TARGET} PRIVATE ${CUDA_INCLUDE_DIRS} ${onnxruntime_CUDNN_HOME}/include)
diff --git a/gcc10.diff b/gcc10.diff
deleted file mode 100644
index cfa85fa05f4..00000000000
--- a/gcc10.diff
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/onnxruntime/test/onnx/heap_buffer.h b/onnxruntime/test/onnx/heap_buffer.h
-index b4abf131b1..380a65b5aa 100644
---- a/onnxruntime/test/onnx/heap_buffer.h
-+++ b/onnxruntime/test/onnx/heap_buffer.h
-@@ -4,6 +4,7 @@
- #pragma once
- #include <vector>
- #include <memory>
-+#include <stdlib.h>
-
- namespace onnxruntime {
- namespace test {
diff --git a/nlohmann-json.diff b/nlohmann-json.diff
deleted file mode 100644
index fdab11dd031..00000000000
--- a/nlohmann-json.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/onnxruntime/core/session/inference_session_utils.h 2019-12-20 15:13:30.265861841 +0800
-+++ b/onnxruntime/core/session/inference_session_utils.h 2019-12-20 15:13:22.132528563 +0800
-@@ -6,7 +6,7 @@
- #include "core/session/inference_session.h"
- #include "core/framework/session_options.h"
- #include "core/common/common.h"
--#include "single_include/nlohmann/json.hpp"
-+#include <nlohmann/json.hpp>
-
- using json = nlohmann::json;
-
diff --git a/protobuf-debundle.patch b/protobuf-debundle.patch
deleted file mode 100644
index 5a957e960bd..00000000000
--- a/protobuf-debundle.patch
+++ /dev/null
@@ -1,308 +0,0 @@
-From a859dc422c17c71bf147e7dde1648e1c6bcfbaae Mon Sep 17 00:00:00 2001
-From: Changming Sun <chasun@microsoft.com>
-Date: Thu, 28 May 2020 10:05:47 -0700
-Subject: [PATCH] Delete google::protobuf::io::FileInputStream class from our
- source code (#4067)
-
-This class is already part of the protobuf-lite library. We don't need a copy here.
-And if we do, we must ensure the signature of every function is exactly the same as the original. However, the upstream code may get changed over time. For example, recently protobuf added a "const" modifier to the FileInputStream::GetErrno(), which may break the build if a user want to use the latest protobuf.
----
- .../core/util/protobuf_parsing_utils.h | 288 +-----------------
- 1 file changed, 5 insertions(+), 283 deletions(-)
-
-diff --git a/onnxruntime/core/util/protobuf_parsing_utils.h b/onnxruntime/core/util/protobuf_parsing_utils.h
-index 4c97562653..f09857d107 100644
---- a/onnxruntime/core/util/protobuf_parsing_utils.h
-+++ b/onnxruntime/core/util/protobuf_parsing_utils.h
-@@ -1,286 +1,8 @@
-+// Copyright (c) Microsoft Corporation. All rights reserved.
-+// Licensed under the MIT License.
-
- #pragma once
-
--#include <string>
--#include <iosfwd>
--#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
--#include <google/protobuf/stubs/common.h>
--
--namespace google {
--namespace protobuf {
--namespace io {
--
--// ===================================================================
--
--// A ZeroCopyInputStream which reads from a file descriptor.
--//
--// FileInputStream is preferred over using an ifstream with IstreamInputStream.
--// The latter will introduce an extra layer of buffering, harming performance.
--// Also, it's conceivable that FileInputStream could someday be enhanced
--// to use zero-copy file descriptors on OSs which support them.
--class LIBPROTOBUF_EXPORT FileInputStream : public ZeroCopyInputStream {
-- public:
-- // Creates a stream that reads from the given Unix file descriptor.
-- // If a block_size is given, it specifies the number of bytes that
-- // should be read and returned with each call to Next(). Otherwise,
-- // a reasonable default is used.
-- explicit FileInputStream(int file_descriptor, int block_size = -1);
--
-- // Flushes any buffers and closes the underlying file. Returns false if
-- // an error occurs during the process; use GetErrno() to examine the error.
-- // Even if an error occurs, the file descriptor is closed when this returns.
-- bool Close();
--
-- // By default, the file descriptor is not closed when the stream is
-- // destroyed. Call SetCloseOnDelete(true) to change that. WARNING:
-- // This leaves no way for the caller to detect if close() fails. If
-- // detecting close() errors is important to you, you should arrange
-- // to close the descriptor yourself.
-- void SetCloseOnDelete(bool value) { copying_input_.SetCloseOnDelete(value); }
--
-- // If an I/O error has occurred on this file descriptor, this is the
-- // errno from that error. Otherwise, this is zero. Once an error
-- // occurs, the stream is broken and all subsequent operations will
-- // fail.
-- int GetErrno() { return copying_input_.GetErrno(); }
--
-- // implements ZeroCopyInputStream ----------------------------------
-- bool Next(const void** data, int* size) override;
-- void BackUp(int count) override;
-- bool Skip(int count) override;
-- int64 ByteCount() const override;
--
-- private:
-- class LIBPROTOBUF_EXPORT CopyingFileInputStream : public CopyingInputStream {
-- public:
-- CopyingFileInputStream(int file_descriptor);
-- ~CopyingFileInputStream() override;
--
-- bool Close();
-- void SetCloseOnDelete(bool value) { close_on_delete_ = value; }
-- int GetErrno() { return errno_; }
--
-- // implements CopyingInputStream ---------------------------------
-- int Read(void* buffer, int size) override;
-- int Skip(int count) override;
--
-- private:
-- // The file descriptor.
-- const int file_;
-- bool close_on_delete_;
-- bool is_closed_;
--
-- // The errno of the I/O error, if one has occurred. Otherwise, zero.
-- int errno_;
--
-- // Did we try to seek once and fail? If so, we assume this file descriptor
-- // doesn't support seeking and won't try again.
-- bool previous_seek_failed_;
--
-- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CopyingFileInputStream);
-- };
--
-- CopyingFileInputStream copying_input_;
-- CopyingInputStreamAdaptor impl_;
--
-- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileInputStream);
--};
--
--// ===================================================================
--
--// A ZeroCopyOutputStream which writes to a file descriptor.
--//
--// FileOutputStream is preferred over using an ofstream with
--// OstreamOutputStream. The latter will introduce an extra layer of buffering,
--// harming performance. Also, it's conceivable that FileOutputStream could
--// someday be enhanced to use zero-copy file descriptors on OSs which
--// support them.
--class LIBPROTOBUF_EXPORT FileOutputStream : public ZeroCopyOutputStream {
-- public:
-- // Creates a stream that writes to the given Unix file descriptor.
-- // If a block_size is given, it specifies the size of the buffers
-- // that should be returned by Next(). Otherwise, a reasonable default
-- // is used.
-- explicit FileOutputStream(int file_descriptor, int block_size = -1);
-- ~FileOutputStream() override;
--
-- // Flushes any buffers and closes the underlying file. Returns false if
-- // an error occurs during the process; use GetErrno() to examine the error.
-- // Even if an error occurs, the file descriptor is closed when this returns.
-- bool Close();
--
-- // Flushes FileOutputStream's buffers but does not close the
-- // underlying file. No special measures are taken to ensure that
-- // underlying operating system file object is synchronized to disk.
-- bool Flush();
--
-- // By default, the file descriptor is not closed when the stream is
-- // destroyed. Call SetCloseOnDelete(true) to change that. WARNING:
-- // This leaves no way for the caller to detect if close() fails. If
-- // detecting close() errors is important to you, you should arrange
-- // to close the descriptor yourself.
-- void SetCloseOnDelete(bool value) { copying_output_.SetCloseOnDelete(value); }
--
-- // If an I/O error has occurred on this file descriptor, this is the
-- // errno from that error. Otherwise, this is zero. Once an error
-- // occurs, the stream is broken and all subsequent operations will
-- // fail.
-- int GetErrno() { return copying_output_.GetErrno(); }
--
-- // implements ZeroCopyOutputStream ---------------------------------
-- bool Next(void** data, int* size) override;
-- void BackUp(int count) override;
-- int64 ByteCount() const override;
--
-- private:
-- class LIBPROTOBUF_EXPORT CopyingFileOutputStream : public CopyingOutputStream {
-- public:
-- CopyingFileOutputStream(int file_descriptor);
-- ~CopyingFileOutputStream() override;
--
-- bool Close();
-- void SetCloseOnDelete(bool value) { close_on_delete_ = value; }
-- int GetErrno() { return errno_; }
--
-- // implements CopyingOutputStream --------------------------------
-- bool Write(const void* buffer, int size) override;
--
-- private:
-- // The file descriptor.
-- const int file_;
-- bool close_on_delete_;
-- bool is_closed_;
--
-- // The errno of the I/O error, if one has occurred. Otherwise, zero.
-- int errno_;
--
-- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CopyingFileOutputStream);
-- };
--
-- CopyingFileOutputStream copying_output_;
-- CopyingOutputStreamAdaptor impl_;
--
-- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileOutputStream);
--};
--
--// ===================================================================
--
--// A ZeroCopyInputStream which reads from a C++ istream.
--//
--// Note that for reading files (or anything represented by a file descriptor),
--// FileInputStream is more efficient.
--class LIBPROTOBUF_EXPORT IstreamInputStream : public ZeroCopyInputStream {
-- public:
-- // Creates a stream that reads from the given C++ istream.
-- // If a block_size is given, it specifies the number of bytes that
-- // should be read and returned with each call to Next(). Otherwise,
-- // a reasonable default is used.
-- explicit IstreamInputStream(std::istream* stream, int block_size = -1);
--
-- // implements ZeroCopyInputStream ----------------------------------
-- bool Next(const void** data, int* size) override;
-- void BackUp(int count) override;
-- bool Skip(int count) override;
-- int64 ByteCount() const override;
--
-- private:
-- class LIBPROTOBUF_EXPORT CopyingIstreamInputStream : public CopyingInputStream {
-- public:
-- CopyingIstreamInputStream(std::istream* input);
-- ~CopyingIstreamInputStream() override;
--
-- // implements CopyingInputStream ---------------------------------
-- int Read(void* buffer, int size) override;
-- // (We use the default implementation of Skip().)
--
-- private:
-- // The stream.
-- std::istream* input_;
--
-- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CopyingIstreamInputStream);
-- };
--
-- CopyingIstreamInputStream copying_input_;
-- CopyingInputStreamAdaptor impl_;
--
-- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(IstreamInputStream);
--};
--
--// ===================================================================
--
--// A ZeroCopyOutputStream which writes to a C++ ostream.
--//
--// Note that for writing files (or anything represented by a file descriptor),
--// FileOutputStream is more efficient.
--class LIBPROTOBUF_EXPORT OstreamOutputStream : public ZeroCopyOutputStream {
-- public:
-- // Creates a stream that writes to the given C++ ostream.
-- // If a block_size is given, it specifies the size of the buffers
-- // that should be returned by Next(). Otherwise, a reasonable default
-- // is used.
-- explicit OstreamOutputStream(std::ostream* stream, int block_size = -1);
-- ~OstreamOutputStream() override;
--
-- // implements ZeroCopyOutputStream ---------------------------------
-- bool Next(void** data, int* size) override;
-- void BackUp(int count) override;
-- int64 ByteCount() const override;
--
-- private:
-- class LIBPROTOBUF_EXPORT CopyingOstreamOutputStream : public CopyingOutputStream {
-- public:
-- CopyingOstreamOutputStream(std::ostream* output);
-- ~CopyingOstreamOutputStream() override;
--
-- // implements CopyingOutputStream --------------------------------
-- bool Write(const void* buffer, int size) override;
--
-- private:
-- // The stream.
-- std::ostream* output_;
--
-- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CopyingOstreamOutputStream);
-- };
--
-- CopyingOstreamOutputStream copying_output_;
-- CopyingOutputStreamAdaptor impl_;
--
-- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(OstreamOutputStream);
--};
--
--// ===================================================================
--
--// A ZeroCopyInputStream which reads from several other streams in sequence.
--// ConcatenatingInputStream is unable to distinguish between end-of-stream
--// and read errors in the underlying streams, so it assumes any errors mean
--// end-of-stream. So, if the underlying streams fail for any other reason,
--// ConcatenatingInputStream may do odd things. It is suggested that you do
--// not use ConcatenatingInputStream on streams that might produce read errors
--// other than end-of-stream.
--class LIBPROTOBUF_EXPORT ConcatenatingInputStream : public ZeroCopyInputStream {
-- public:
-- // All streams passed in as well as the array itself must remain valid
-- // until the ConcatenatingInputStream is destroyed.
-- ConcatenatingInputStream(ZeroCopyInputStream* const streams[], int count);
--
-- // implements ZeroCopyInputStream ----------------------------------
-- bool Next(const void** data, int* size) override;
-- void BackUp(int count) override;
-- bool Skip(int count) override;
-- int64 ByteCount() const override;
--
-- private:
-- // As streams are retired, streams_ is incremented and count_ is
-- // decremented.
-- ZeroCopyInputStream* const* streams_;
-- int stream_count_;
-- int64 bytes_retired_; // Bytes read from previous streams.
--
-- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ConcatenatingInputStream);
--};
--
--
--} // namespace io
--} // namespace protobuf
--
--} // namespace google
-+#include <google/protobuf/io/zero_copy_stream_impl.h>
-+
-+