-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6776 from hqucms/dev/CMSSW_11_3_X/onnx-gpu
Add GPU support for ONNXRuntime
- Loading branch information
Showing
5 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
### RPM external cudnn-toolfile 1.0 | ||
Requires: cudnn | ||
%prep | ||
|
||
%build | ||
|
||
%install | ||
mkdir -p %i/etc/scram.d | ||
cat << \EOF_TOOLFILE >%i/etc/scram.d/cudnn.xml | ||
<tool name="cudnn" version="@TOOL_VERSION@"> | ||
<info url="https://docs.nvidia.com/deeplearning/cudnn/index.html"/> | ||
<lib name="cudnn"/> | ||
<client> | ||
<environment name="CUDNN_BASE" default="@TOOL_ROOT@"/> | ||
<environment name="INCLUDE" default="$CUDNN_BASE/include"/> | ||
<environment name="LIBDIR" default="$CUDNN_BASE/lib64"/> | ||
</client> | ||
<use name="cuda"/> | ||
</tool> | ||
EOF_TOOLFILE | ||
|
||
## IMPORT scram-tools-post |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
### RPM external cudnn 8.1.1.33 | ||
## INITENV +PATH LD_LIBRARY_PATH %i/lib64 | ||
|
||
%define cudaver 11.2 | ||
%define cudnnver_maj %(echo %{realversion} | cut -f1,2,3 -d.) | ||
|
||
%ifarch x86_64 | ||
Source: https://developer.download.nvidia.com/compute/redist/cudnn/v%{cudnnver_maj}/cudnn-%{cudaver}-linux-x64-v%{realversion}.tgz | ||
%endif | ||
%ifarch ppc64le | ||
Source: https://developer.download.nvidia.com/compute/redist/cudnn/v%{cudnnver_maj}/cudnn-%{cudaver}-linux-ppc64le-v%{realversion}.tgz | ||
%endif | ||
%ifarch aarch64 | ||
Source: https://developer.download.nvidia.com/compute/redist/cudnn/v%{cudnnver_maj}/cudnn-%{cudaver}-linux-aarch64sbsa-v%{realversion}.tgz | ||
%endif | ||
Requires: cuda | ||
|
||
%prep | ||
%setup -n cuda | ||
|
||
if [ "${CUDA_VERSION%.*}" != %{cudaver} ]; then | ||
echo 'Incompatible CUDA version in cudnn.spec!' | ||
exit 1 | ||
fi | ||
|
||
%build | ||
|
||
%install | ||
%ifarch ppc64le | ||
rm -f %_builddir/cuda/targets/ppc64le-linux/lib/*.a | ||
mv %_builddir/cuda/targets/ppc64le-linux/lib %{i}/lib64 | ||
mv %_builddir/cuda/targets/ppc64le-linux/* %{i}/ | ||
%else | ||
rm -f %_builddir/cuda/lib64/*.a | ||
mv %_builddir/cuda/* %{i}/ | ||
%endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters