Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cuda-nvdisasm, cuda-nvprof, cuda-nvvp recipes #22820

Merged
merged 17 commits into from
Jun 2, 2023
2 changes: 2 additions & 0 deletions recipes/cuda-nvdisasm/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
arm_variant_type: # [aarch64]
- sbsa # [aarch64]
59 changes: 59 additions & 0 deletions recipes/cuda-nvdisasm/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{% set name = "cuda-nvdisasm" %}
{% set version = "12.0.76" %}
{% set cuda_version = "12.0" %}
{% set platform = "linux-x86_64" %} # [linux64]
{% set platform = "linux-ppc64le" %} # [ppc64le]
{% set platform = "linux-sbsa" %} # [aarch64]
{% set platform = "windows-x86_64" %} # [win]
{% set extension = "tar.xz" %} # [not win]
{% set extension = "zip" %} # [win]

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvdisasm/{{ platform }}/cuda_nvdisasm-{{ platform }}-{{ version }}-archive.{{ extension }}
sha256: 0e0660100b052248529ee07353479a7d703258ef3200ac52e9676298511d10c3 # [linux64]
sha256: aca86a9b2b7678884aa58e7a29881044e6d12dbf790b46266f08f6855a10ac79 # [ppc64le]
sha256: 4991a102fd8d7d3aa632cf5a28df6368f4074a4ced952e7665c382c6dbdec1fd # [aarch64]
sha256: 7d716f14dc1342d62c9c67d4636cc1dbd496d7648b6097a53d05e1d6864a487c # [win]

build:
number: 0
skip: true # [osx]
script:
- cp -rv bin $PREFIX # [linux]
- move bin\* %LIBRARY_BIN% # [win]

requirements:
build:
- {{ compiler("c") }}
- {{ compiler("cxx") }}
- arm-variant * {{ arm_variant_type }} # [aarch64]
host:
- cuda-version {{ cuda_version }}
run:
- {{ pin_compatible("cuda-version", max_pin="x.x") }}
run_constrained:
- arm-variant * {{ arm_variant_type }} # [aarch64]

test:
commands:
- test -f $PREFIX/bin/nvdisasm # [linux]
- if not exist %LIBRARY_BIN%\nvdisasm.exe exit 1 # [win]

about:
home: https://developer.nvidia.com/cuda-toolkit
license_file: LICENSE
license: LicenseRef-NVIDIA-End-User-License-Agreement
license_url: https://docs.nvidia.com/cuda/eula/index.html
summary: nvdisasm extracts information from standalone cubin files
description: |
nvdisasm extracts information from standalone cubin files and presents them in
human readable format.
doc_url: https://docs.nvidia.com/cuda/cuda-binary-utilities/

extra:
recipe-maintainers:
- adibbley
3 changes: 3 additions & 0 deletions recipes/cuda-nvprof/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if not exist %PREFIX% mkdir %PREFIX%

move bin\* %LIBRARY_BIN%
34 changes: 34 additions & 0 deletions recipes/cuda-nvprof/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

# Install to conda style directories
[[ -d lib64 ]] && mv lib64 lib
mkdir -p ${PREFIX}/lib
[[ -d pkg-config ]] && mv pkg-config ${PREFIX}/lib/pkgconfig
[[ -d "$PREFIX/lib/pkgconfig" ]] && sed -E -i "s|cudaroot=.+|cudaroot=$PREFIX|g" $PREFIX/lib/pkgconfig/cuinj64*.pc
[[ -d "$PREFIX/lib/pkgconfig" ]] && sed -E -i "s|cudaroot=.+|cudaroot=$PREFIX|g" $PREFIX/lib/pkgconfig/accinj64*.pc

[[ ${target_platform} == "linux-64" ]] && targetsDir="targets/x86_64-linux"
[[ ${target_platform} == "linux-ppc64le" ]] && targetsDir="targets/ppc64le-linux"
[[ ${target_platform} == "linux-aarch64" ]] && targetsDir="targets/sbsa-linux"

for i in `ls`; do
[[ $i == "build_env_setup.sh" ]] && continue
[[ $i == "conda_build.sh" ]] && continue
[[ $i == "metadata_conda_debug.yaml" ]] && continue
if [[ $i == "lib" ]] || [[ $i == "include" ]]; then
# Headers and libraries are installed to targetsDir
mkdir -p ${PREFIX}/${targetsDir}
mkdir -p ${PREFIX}/$i
cp -rv $i ${PREFIX}/${targetsDir}
if [[ $i == "lib" ]]; then
for j in "$i"/*.so*; do
# Shared libraries are symlinked in $PREFIX/lib
ln -s ${PREFIX}/${targetsDir}/$j ${PREFIX}/$j
done
fi
else
# Leaving bin in PREFIX
mkdir -p ${PREFIX}
cp -rv $i ${PREFIX}
fi
done
75 changes: 75 additions & 0 deletions recipes/cuda-nvprof/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{% set name = "cuda-nvprof" %}
{% set version = "12.0.90" %}
{% set cuda_version = "12.0" %}
{% set platform = "linux-x86_64" %} # [linux64]
{% set platform = "linux-ppc64le" %} # [ppc64le]
{% set platform = "windows-x86_64" %} # [win]
{% set target_name = "x86_64-linux" %} # [linux64]
{% set target_name = "ppc64le-linux" %} # [ppc64le]
{% set target_name = "sbsa-linux" %} # [aarch64]
{% set extension = "tar.xz" %} # [not win]
{% set extension = "zip" %} # [win]

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvprof/{{ platform }}/cuda_nvprof-{{ platform }}-{{ version }}-archive.{{ extension }}
sha256: e3313459ff03f17836fc43e53fa7bc1d3ba4079e6089c48ac9d91009c762f196 # [linux64]
sha256: b1067e82bbf4ce592fd94c8b654d91a72e5b70c2ec407348ce7f7cf462acd6a4 # [ppc64le]
sha256: d509046b6670105bc11a6a31e412a07c7ceb2f76f5248d1d5699be1544dc6221 # [win]

build:
number: 0
skip: true # [osx or aarch64]
missing_dso_whitelist:
# This is a driver file, might be able to use cuda-compat to remove this
- '*/libcuda.so.1' # [linux]
- '*/nvcuda.dll' # [win]

requirements:
build:
- {{ compiler("c") }}
- {{ compiler("cxx") }}
host:
- cuda-version {{ cuda_version }}
- cuda-cupti
run:
- {{ pin_compatible("cuda-version", max_pin="x.x") }}
- cuda-cupti

test:
commands:
- test -f $PREFIX/bin/nvprof # [linux]
- test -f $PREFIX/lib/pkgconfig/cuinj64*.pc # [linux]
- test -f $PREFIX/lib/pkgconfig/accinj64*.pc # [linux]
- test -L $PREFIX/lib/libaccinj64.so # [linux]
- test -L $PREFIX/lib/libaccinj64.so.{{ version.split(".")[0] }}.{{ version.split(".")[1] }} # [linux]
- test -L $PREFIX/lib/libaccinj64.so.{{ version }} # [linux]
- test -L $PREFIX/lib/libcuinj64.so # [linux]
- test -L $PREFIX/lib/libcuinj64.so.{{ version.split(".")[0] }}.{{ version.split(".")[1] }} # [linux]
- test -L $PREFIX/lib/libcuinj64.so.{{ version }} # [linux]
- test -L $PREFIX/targets/{{ target_name }}/lib/libaccinj64.so # [linux]
- test -L $PREFIX/targets/{{ target_name }}/lib/libaccinj64.so.{{ version.split(".")[0] }}.{{ version.split(".")[1] }} # [linux]
- test -f $PREFIX/targets/{{ target_name }}/lib/libaccinj64.so.{{ version }} # [linux]
- test -L $PREFIX/targets/{{ target_name }}/lib/libcuinj64.so # [linux]
- test -L $PREFIX/targets/{{ target_name }}/lib/libcuinj64.so.{{ version.split(".")[0] }}.{{ version.split(".")[1] }} # [linux]
- test -f $PREFIX/targets/{{ target_name }}/lib/libcuinj64.so.{{ version }} # [linux]
- if not exist %LIBRARY_BIN%\nvprof.exe exit 1 # [win]
- if not exist %LIBRARY_BIN%\cuinj64_*.dll exit 1 # [win]

about:
home: https://developer.nvidia.com/cuda-toolkit
license_file: LICENSE
license: LicenseRef-NVIDIA-End-User-License-Agreement
license_url: https://docs.nvidia.com/cuda/eula/index.html
summary: Tool for collecting and viewing CUDA application profiling data
description: |
Tool for collecting and viewing CUDA application profiling data from
the command-line.
doc_url: https://docs.nvidia.com/cuda/index.html

extra:
recipe-maintainers:
- adibbley
5 changes: 5 additions & 0 deletions recipes/cuda-nvvp/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if not exist %PREFIX% mkdir %PREFIX%

move bin\* %LIBRARY_BIN%
move libnvvp %PREFIX%

11 changes: 11 additions & 0 deletions recipes/cuda-nvvp/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# Install to conda style directories
[[ -d lib64 ]] && mv lib64 lib

for i in `ls`; do
[[ $i == "build_env_setup.sh" ]] && continue
[[ $i == "conda_build.sh" ]] && continue
[[ $i == "metadata_conda_debug.yaml" ]] && continue
cp -r $i ${PREFIX}
done
55 changes: 55 additions & 0 deletions recipes/cuda-nvvp/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{% set name = "cuda-nvvp" %}
{% set version = "12.0.90" %}
{% set cuda_version = "12.0" %}
{% set platform = "linux-x86_64" %} # [linux64]
{% set platform = "linux-ppc64le" %} # [ppc64le]
{% set platform = "windows-x86_64" %} # [win]
{% set extension = "tar.xz" %} # [not win]
{% set extension = "zip" %} # [win]

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvvp/{{ platform }}/cuda_nvvp-{{ platform }}-{{ version }}-archive.{{ extension }}
sha256: 3139235d52d0a41c56cb5caead9481154895754205b7ded7f96137fae3a9e9b1 # [linux64]
sha256: 48928f3b3103c2fe47e557b4bd9966049b637c563af7a171358700cecf84d609 # [ppc64le]
sha256: edc4302461ba6f9b716e146d6bb5f10f7dc776ae1268bfd383cfd74ee94fdf19 # [win]

build:
number: 0
skip: true # [osx or aarch64]

requirements:
build:
- {{ compiler("c") }}
- {{ compiler("cxx") }}
host:
- cuda-version {{ cuda_version }}
run:
- {{ pin_compatible("cuda-version", max_pin="x.x") }}
- cuda-nvdisasm
- cuda-nvprof

test:
commands:
- test -f $PREFIX/bin/nvvp # [linux]
- test -f $PREFIX/libnvvp/nvvp # [linux]
- if not exist %LIBRARY_BIN%\nvvp.bat exit 1 # [win]
- if not exist %PREFIX%\libnvvp\nvvp.exe exit 1 # [win]

about:
home: https://developer.nvidia.com/nvidia-visual-profiler
license_file: LICENSE
license: LicenseRef-NVIDIA-End-User-License-Agreement
license_url: https://docs.nvidia.com/cuda/eula/index.html
summary: NVIDIA Visual Profiler to visualize and optimize the performance of your application.
description: |
NVIDIA Visual Profiler to visualize and optimize the performance of your
application.
doc_url: https://docs.nvidia.com/cuda/profiler-users-guide/index.html

extra:
recipe-maintainers:
- adibbley