Skip to content

Commit

Permalink
Merge pull request #23001 from adibbley/nsight-compute
Browse files Browse the repository at this point in the history
Add nsight-compute recipe
  • Loading branch information
jakirkham authored Jul 11, 2023
2 parents 7119855 + 9d29863 commit d6b6664
Show file tree
Hide file tree
Showing 4 changed files with 135 additions and 0 deletions.
19 changes: 19 additions & 0 deletions recipes/nsight-compute/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
if not exist %PREFIX% mkdir %PREFIX%
if not exist %LIBRARY_PREFIX% mkdir %LIBRARY_PREFIX%
if not exist %SCRIPTS% mkdir %SCRIPTS%

setlocal enableDelayedExpansion
for /F "tokens=1,2,3 delims=. " %%a in ("%PKG_VERSION%") do (
set "version=%%a.%%b.%%c"
)
rmdir /q /s nsight-compute\!version!\lib

move nsight-compute %LIBRARY_PREFIX%

:: Create bat links for all exe files in %LIBRARY_PREFIX%\nsight-compute
cd %SCRIPTS%
for /r "%LIBRARY_PREFIX%\nsight-compute" %%f in (*.exe) do (
echo @echo off > %%~nf.bat
echo %%~dp0..\Library\nsight-compute\!version!\%%~nf.bat %%* >> %%~nf.bat
if errorlevel 1 exit 1
)
15 changes: 15 additions & 0 deletions recipes/nsight-compute/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

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

nsightVersion=$(echo $PKG_VERSION | cut -d. -f1-3)
nsightLib32="nsight-compute/${nsightVersion}/target/linux-desktop-glibc_2_11_3-x86/"

# Remove 32bit libraries
[[ -d "${nsightLib32}" ]] && rm -rf ${nsightLib32}

mkdir -p $PREFIX/bin
cp -rv bin/ncu $PREFIX/bin
cp -rv bin/ncu-ui $PREFIX/bin
cp -rv nsight-compute/$nsightVersion $PREFIX/nsight-compute-$nsightVersion
2 changes: 2 additions & 0 deletions recipes/nsight-compute/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
arm_variant_type: # [aarch64]
- sbsa # [aarch64]
99 changes: 99 additions & 0 deletions recipes/nsight-compute/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{% set name = "nsight-compute" %}
{% set version = "2022.4.0.15" %}
{% set version_split = version.split(".")[0]+"."+version.split(".")[1]+"."+version.split(".")[2] %}
{% 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/nsight_compute/{{ platform }}/nsight_compute-{{ platform }}-{{ version }}-archive.{{ extension }}
sha256: f084e05eb4d2ba32aceb25e1dcfe03f2a50127630973722b65219cf9e986a139 # [linux64]
sha256: 20e58ce79681bc8fd39394cfb8f8316c177fe4175af3ae95c025996f45904732 # [ppc64le]
sha256: 7d0b3d4d01ce36657fa739496c7b0a9c627f5fa42021c1696ddd15e119bb05a4 # [aarch64]
sha256: 958da9986841c49cb5a2885d1e14e4c673ba94e4b404ef9389d083b7a0095d84 # [win]

build:
number: 0
skip: true # [osx]
missing_dso_whitelist:
- '*'

requirements:
build:
- {{ compiler("c") }}
- {{ compiler("cxx") }}
- sysroot_{{ target_platform }} 2.17 # [linux]
- arm-variant * {{ arm_variant_type }} # [aarch64]
host:
- cuda-version {{ cuda_version }}
- alsa-lib # [linux]
- dbus # [linux]
- expat
- fontconfig
- freetype
- krb5
- libglib
- libxcb
- libxkbcommon # [linux]
- libxkbfile # [linux]
- libzlib
- nspr # [linux]
- nss # [linux]
- wayland # [linux]
- xcb-util-image # [linux]
- xcb-util-keysyms # [linux]
- xcb-util-keysyms # [linux]
- xcb-util-renderutil # [linux]
- xcb-util-wm # [linux]
- xorg-libice # [linux]
- xorg-libsm # [linux]
- xorg-libx11 # [linux]
- xorg-libxcomposite # [linux]
- xorg-libxdamage # [linux]
- xorg-libxext # [linux]
- xorg-libxfixes # [linux]
- xorg-libxrandr # [linux]
- xorg-libxrender # [linux]
- xorg-libxtst # [linux]
run:
- {{ pin_compatible("cuda-version", max_pin="x.x") }}
- {{ pin_compatible("xorg-libxcomposite", max_pin="x.x") }} # [linux]
- {{ pin_compatible("xorg-libxdamage", max_pin="x.x") }} # [linux]
- {{ pin_compatible("xorg-libxfixes", max_pin="x.x") }} # [linux]
- {{ pin_compatible("xorg-libxrandr", max_pin="x.x") }} # [linux]
- {{ pin_compatible("xorg-libxtst", max_pin="x.x") }} # [linux]
- {{ pin_compatible("libxkbfile", max_pin="x.x") }} # [linux]
run_constrained:
- arm-variant * {{ arm_variant_type }} # [aarch64]

test:
commands:
- test -f $PREFIX/bin/ncu # [linux]
- if not exist %LIBRARY_PREFIX%\nsight-compute exit 1 # [win]
- if exist %LIBRARY_PREFIX%\nsight-compute\{{ version_split }}\lib exit 1 # [win]
- if not exist %PREFIX%\Scripts\ncu.bat exit 1 # [win]
- ncu --version

about:
home: https://developer.nvidia.com/nsight-compute
license_file: LICENSE
license: LicenseRef-NVIDIA-End-User-License-Agreement
license_url: https://docs.nvidia.com/cuda/eula/index.html
summary: NVIDIA Nsight Compute is an interactive kernel profiler for CUDA applications
description: |
NVIDIA Nsight Compute is an interactive kernel profiler for CUDA
applications. It provides detailed performance metrics and API
debugging via a user interface and command line tool.
doc_url: https://docs.nvidia.com/nsight-compute/NsightCompute/index.html

extra:
recipe-maintainers:
- adibbley

0 comments on commit d6b6664

Please sign in to comment.