From 68968d0894bc71c32f0848f90d20e23a862c90c5 Mon Sep 17 00:00:00 2001 From: ddaina Date: Mon, 25 Oct 2021 14:23:55 +0200 Subject: [PATCH] dont build cudnn on slc7_aarch64 --- onnxruntime.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/onnxruntime.spec b/onnxruntime.spec index 2111224cf36..211003137d6 100644 --- a/onnxruntime.spec +++ b/onnxruntime.spec @@ -9,7 +9,9 @@ Source1: https://github.com/microsoft/onnxruntime/commit/de4089f8cbe0baffe56a363 BuildRequires: cmake ninja Requires: protobuf py3-numpy py3-wheel py3-onnx zlib libpng py3-pybind11 +%if "%{cmsos}" != "slc7_aarch64" Requires: cuda cudnn +%endif %prep %setup -q -n %{n}-%{realversion} @@ -18,11 +20,11 @@ patch -p1 < %{_sourcedir}/de4089f8cbe0baffe56a363cc3a41595cc8f0809.patch %build rm -rf ../build; mkdir ../build; cd ../build -if [ $(%{cuda_gcc_support}) = true ]; then +%if "%{cmsos}" != "slc7_aarch64" USE_CUDA=ON -else +%else USE_CUDA=OFF -fi +%endif cmake ../%{n}-%{realversion}/cmake -GNinja \ -DPYTHON_EXECUTABLE=${PYTHON3_ROOT}/bin/python3 \