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

Adding cuda-nvtx recipe #22052

Merged
merged 18 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions recipes/cuda-nvtx/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if not exist %PREFIX% mkdir %PREFIX%

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

# Install to conda style directories
[[ -d lib64 ]] && mv lib64 lib
[[ -d pkg-config ]] && mkdir -p ${PREFIX}/lib && mv pkg-config ${PREFIX}/lib/pkgconfig
[[ -d "$PREFIX/lib/pkgconfig" ]] && sed -E -i "s|cudaroot=.+|cudaroot=$PREFIX|g" $PREFIX/lib/pkgconfig/nvToolsExt*.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
mkdir -p ${PREFIX}/${targetsDir}
mkdir -p ${PREFIX}/$i
cp -rv $i ${PREFIX}/${targetsDir}
for j in `ls $i`; do
ln -s ../${targetsDir}/$i/$j ${PREFIX}/$i/$j
done
else
cp -rv $i ${PREFIX}
fi
done
96 changes: 96 additions & 0 deletions recipes/cuda-nvtx/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{% set name = "cuda-nvtx" %}
{% set version = "12.0.76" %}
adibbley marked this conversation as resolved.
Show resolved Hide resolved
{% 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_nvtx/{{ platform }}/cuda_nvtx-{{ platform }}-{{ version }}-archive.{{ extension }}
sha256: 1d2cbcb05a2e8a04b51a866b6997cb73ed90e61ffa183669d3f9ff7a0c7fd654 # [linux64]
sha256: 2a8aef88030147cd0a394d6fe1ceb2d26aa9694aa751e10d58e39623f27cf7e2 # [ppc64le]
sha256: 2cb31f10cf0e58d296611bac2bb6e2f9ccb498753bb148b487defbd95e11f3e8 # [aarch64]
sha256: e16c1214fb7ae1bb60a9224e07b70aa5fd03310226140672ab3b409ddf4ae2a7 # [win]

build:
number: 0
skip: true # [osx]
run_exports: # [linux]
strong: # [linux]
- __glibc >=2.17 # [linux]

requirements:
build:
- {{ compiler("c") }}
- {{ compiler("cxx") }}
host:
- sysroot_{{ target_platform }} 2.17 # [linux]
- __glibc >=2.17 # [linux]
run:
- sysroot_{{ target_platform }} 2.17 # [linux]
- __glibc >=2.17 # [linux]

outputs:
- name: cuda-nvtx
adibbley marked this conversation as resolved.
Show resolved Hide resolved
jakirkham marked this conversation as resolved.
Show resolved Hide resolved
requirements:
run:
- cuda-version =12.0
adibbley marked this conversation as resolved.
Show resolved Hide resolved
test:
commands:
- test -f $PREFIX/lib/libnvToolsExt.so.1.0.0 # [linux]
files:
- lib/*.so.* # [linux]
- targets/*/lib/*.so.* # [linux]

- name: cuda-nvtx-dev
run_exports:
- {{ pin_subpackage("cuda-nvtx", max_pin='x') }}
requirements:
run:
- cuda-nvtx >={{ version }}
- cuda-nvtx-dev_{{ target_platform }} =={{ version }}
adibbley marked this conversation as resolved.
Show resolved Hide resolved
- cuda-version =12.0
adibbley marked this conversation as resolved.
Show resolved Hide resolved
test:
commands:
- test -d $PREFIX/lib/pkgconfig # [linux]
files:
- lib/*.so # [linux]
- include # [linux]
- lib/pkgconfig # [linux]

- name: cuda-nvtx-dev_{{ target_platform }}
run_exports:
- {{ pin_subpackage("cuda-nvtx", max_pin='x') }}
adibbley marked this conversation as resolved.
Show resolved Hide resolved
requirements:
run:
- cuda-version =12.0
adibbley marked this conversation as resolved.
Show resolved Hide resolved
test:
commands:
- test -d $PREFIX/targets # [linux]
files:
- targets/*/lib/*.so # [linux]
- targets/*/include # [linux]
- targets/*/lib/pkgconfig # [linux]
- Library/include # [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: A C-based API for annotating events, code ranges, and resources
description: |
A C-based API for annotating events, code ranges, and resources in your
applications. Applications which integrate NVTX can use the Visual Profiler
to capture and visualize these events and ranges.
doc_url: https://docs.nvidia.com/cuda/index.html
adibbley marked this conversation as resolved.
Show resolved Hide resolved

extra:
recipe-maintainers:
- adibbley