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-cupti recipe #22355

Merged
merged 23 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from 12 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
7 changes: 7 additions & 0 deletions recipes/cuda-cupti/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
if not exist %PREFIX% mkdir %PREFIX%
mkdir %PREFIX%/cuda-cupti

move lib\* %LIBRARY_LIB%
move include\* %LIBRARY_INC%
move doc %PREFIX%
move samples %PREFIX%
24 changes: 24 additions & 0 deletions recipes/cuda-cupti/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

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

adibbley marked this conversation as resolved.
Show resolved Hide resolved
[[ ${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
adibbley marked this conversation as resolved.
Show resolved Hide resolved
done
else
cp -rv $i ${PREFIX}
adibbley marked this conversation as resolved.
Show resolved Hide resolved
fi
done
100 changes: 100 additions & 0 deletions recipes/cuda-cupti/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{% set name = "cuda-cupti" %}
{% set version = "12.0.90" %}
adibbley marked this conversation as resolved.
Show resolved Hide resolved
{% 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_cupti/{{ platform }}/cuda_cupti-{{ platform }}-{{ version }}-archive.{{ extension }}
sha256: 3c93a6a8c5eab3a56c1a0a514c0ac7d374807c70a9551155f089588b6c5e1d10 # [linux64]
sha256: bbabb508eb4fb0f9d98ac3ab4a40d0278de41cef95139c1bfe6436b716dd6cfc # [ppc64le]
sha256: 33b3b06cf9838fa3289c7e40f143a8f58b941ccad93f9d0640a29bb83aa2152e # [aarch64]
sha256: b65a34a3715e3ef2b835bdd36c43b21c20800325be1eda1e84ad4d80ee837c92 # [win]

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

requirements:
build:
- {{ compiler("c") }}
- {{ compiler("cxx") }}

outputs:
- name: cuda-cupti
test:
commands:
- test -f $PREFIX/lib/libcupti.so.* # [linux]
jakirkham marked this conversation as resolved.
Show resolved Hide resolved
- if not exist %LIBRARY_BIN%\cupti64_*.dll exit 1 # [win]
requirements:
host:
- cuda-version {{ cuda_version }}
run:
- {{ pin_compatible("cuda-version", max_pin="x.x") }}
files:
- lib/*.so.* # [linux]
- targets/*/lib/*.so.* # [linux]
- Library\lib\*.dll # [win]

- name: cuda-cupti-dev
test:
commands:
- test -f $PREFIX/lib/libnvperf_host.so # [linux]
adibbley marked this conversation as resolved.
Show resolved Hide resolved
- test -f $PREFIX/lib/libnvperf_target.so # [linux]
- if not exist %LIBRARY_LIB%\cupti.lib exit 1 # [win]
requirements:
build:
- {{ compiler("c") }}
- {{ compiler("cxx") }}
host:
- cuda-version {{ cuda_version }}
run:
- {{ pin_compatible("cuda-version", max_pin="x.x") }}
- cuda-cupti >={{ version }}
files:
- lib/*.so # [linux]
- targets/*/lib/*.so # [linux]
- include # [linux]
- targets/*/include # [linux]
- samples
- doc
jakirkham marked this conversation as resolved.
Show resolved Hide resolved
- Library\include # [win]
- Library\lib\*.lib # [win]

- name: cuda-cupti-static
build:
skip: True # [not linux]
adibbley marked this conversation as resolved.
Show resolved Hide resolved
test:
commands:
- test -L $PREFIX/lib/libcupti_static.a # [linux]
requirements:
host:
- cuda-version {{ cuda_version }}
run:
- {{ pin_compatible("cuda-version", max_pin="x.x") }}
- cuda-cupti >={{ version }}
files:
- lib/*static.a
- targets/*/lib/*static.a

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: Provides libraries to enable third party tools using GPU profiling APIs.
description: |
Provides libraries to enable third party tools using GPU profiling APIs.
doc_url: https://docs.nvidia.com/cuda/index.html

extra:
recipe-maintainers:
- adibbley