Skip to content

Commit

Permalink
Enable the use of cuDNN in ONNX on ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
fwyzard committed Sep 8, 2021
1 parent b872f7c commit d6919fb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
5 changes: 1 addition & 4 deletions cmssw-tool-conf.spec
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,9 @@ Requires: gperftools
Requires: cuda
Requires: alpaka
Requires: cupla

%if "%{cmsos}" != "slc7_aarch64"
Requires: cudnn
%endif

Requires: libunwind

%ifnarch ppc64le
Requires: igprof
Requires: openloops
Expand Down
6 changes: 0 additions & 6 deletions onnxruntime.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ 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}
Expand All @@ -20,11 +18,7 @@ patch -p1 < %{_sourcedir}/de4089f8cbe0baffe56a363cc3a41595cc8f0809.patch
%build
rm -rf ../build; mkdir ../build; cd ../build

%if "%{cmsos}" != "slc7_aarch64"
USE_CUDA=ON
%else
USE_CUDA=OFF
%endif

cmake ../%{n}-%{realversion}/cmake -GNinja \
-DPYTHON_EXECUTABLE=${PYTHON3_ROOT}/bin/python3 \
Expand Down
6 changes: 2 additions & 4 deletions scram-tools.file/tools/onnxruntime/onnxruntime.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
<environment name="LIBDIR" default="$ONNXRUNTIME_BASE/lib"/>
</client>
<use name="protobuf"/>
<ifarchitecture name="!aarch64">
<use name="cuda"/>
<use name="cudnn"/>
</ifarchitecture>
<use name="cuda"/>
<use name="cudnn"/>
<runtime name="MLAS_DYNAMIC_CPU_ARCH" value="2"/>
</tool>

0 comments on commit d6919fb

Please sign in to comment.