summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-Hsuan Yen2021-07-23 20:13:10 +0800
committerChih-Hsuan Yen2021-07-23 20:13:36 +0800
commitc6e8dfef68709bf4f97010b37bdd1a9819ff734f (patch)
treee8c4ab83e689ca3fffcce3999db59c2b86d3c493
parenta27b776909eb54d12f138798514101a4aedfb25f (diff)
downloadaur-c6e8dfef68709bf4f97010b37bdd1a9819ff734f.tar.gz
disable LTO
With LTO, linking fails after peak memory usage 33.8 GB [1]: > CMakeFiles/onnxruntime_providers_cuda.dir/build/python-onnxruntime/src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations.cc.o: file not recognized: file format not recognized [1] https://build.archlinuxcn.org/grafana/d/000000003/memory?orgId=1&from=1627032600000&to=1627034400000
-rw-r--r--.SRCINFO1
-rw-r--r--PKGBUILD2
2 files changed, 3 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e1afb7181b5..3c852f319cd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -36,6 +36,7 @@ pkgbase = python-onnxruntime
depends = python-onnx
depends = python-protobuf
depends = openmpi
+ options = !lto
source = git+https://github.com/microsoft/onnxruntime#tag=v1.8.1
source = git+https://gitlab.com/libeigen/eigen.git
source = git+https://github.com/onnx/onnx.git
diff --git a/PKGBUILD b/PKGBUILD
index f3f384e930c..b6fef682ce4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -35,6 +35,8 @@ sha512sums=('SKIP'
'SKIP'
'685f0235abed6e1277dd0eb9bda56c464d1987fe7fc90a3550e17ec70cc49fd15f34996a0e159f9622c4ca3e6bf29917fe51b7849342531fa2a6808d782f1e06'
'55ba879c015df11582ff4afaa9ccca19c0e3d3a8be503629718402dbdc826e36bc3ec3ce4dd589705371d7fcf250ba2a9b30c5a3dd0cfccb8e008346f1bd6252')
+# CUDA seems not working with LTO
+options+=('!lto')
# Check PKGBUILDs of python-pytorch and tensorflow for CUDA architectures built by official packages
_CUDA_ARCHITECTURES="52-real;53-real;60-real;61-real;62-real;70-real;72-real;75-real;80-real;86-real;86-virtual"