Skip to content

Commit

Permalink
Merge pull request #5512 from fwyzard/cuda_10.2
Browse files Browse the repository at this point in the history
Include the CUDA Profiling Tools Interface (CUPTI)
  • Loading branch information
smuzaffar committed Feb 1, 2020
2 parents 480ce83 + 15e4173 commit dae3ce5
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
25 changes: 25 additions & 0 deletions cuda-toolfile.spec
Expand Up @@ -152,6 +152,31 @@ cat << \EOF_TOOLFILE >%{i}/etc/scram.d/cuda-nvrtc.xml
</tool>
EOF_TOOLFILE

cat << \EOF_TOOLFILE >%{i}/etc/scram.d/cupti.xml
<tool name="cupti" version="@TOOL_VERSION@">
<info url="https://docs.nvidia.com/cupti/Cupti/index.html"/>
<lib name="cupti"/>
<client>
<environment name="CUPTI_BASE" default="@TOOL_ROOT@"/>
<environment name="LIBDIR" default="$CUPTI_BASE/lib64"/>
<environment name="INCLUDE" default="$CUPTI_BASE/include"/>
</client>
</tool>
EOF_TOOLFILE

cat << \EOF_TOOLFILE >%{i}/etc/scram.d/nvperf.xml
<tool name="nvperf" version="@TOOL_VERSION@">
<info url="https://docs.nvidia.com/cupti/Cupti/index.html"/>
<lib name="nvperf_host"/>
<lib name="nvperf_target"/>
<client>
<environment name="NVPERF_BASE" default="@TOOL_ROOT@"/>
<environment name="LIBDIR" default="$NVPERF_BASE/lib64"/>
<environment name="INCLUDE" default="$NVPERF_BASE/include"/>
</client>
</tool>
EOF_TOOLFILE

cat << \EOF_TOOLFILE >%{i}/etc/scram.d/nvidia-drivers.xml
<tool name="nvidia-drivers" version="@TOOL_VERSION@">
<info url="https://docs.nvidia.com/cuda/index.html"/>
Expand Down
10 changes: 10 additions & 0 deletions cuda.spec
Expand Up @@ -98,6 +98,16 @@ mv %_builddir/build/cuda-toolkit/lib64/* %{i}/lib64/
# package the includes
mv %_builddir/build/cuda-toolkit/include/* %{i}/include/

# package the CUDA Profiling Tools Interface includea and libraries
%ifarch x86_64 ppc64le
chmod a+x %_builddir/build/cuda-toolkit/extras/CUPTI/lib64/*.so*
mv %_builddir/build/cuda-toolkit/extras/CUPTI/lib64/*.so* %{i}/lib64/
mv %_builddir/build/cuda-toolkit/extras/CUPTI/include/*.h %{i}/include/
%endif
%ifarch aarch64
# the RPMs already have the CUPTI files under lib64/ and include/
%endif

# leave out the Nsight and NVVP graphical tools
rm -f %_builddir/build/cuda-toolkit/bin/computeprof
rm -f %_builddir/build/cuda-toolkit/bin/nsight
Expand Down

0 comments on commit dae3ce5

Please sign in to comment.