-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22355 from adibbley/cuda-cupti
Add cuda-cupti recipe
- Loading branch information
Showing
4 changed files
with
216 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
# Install to conda style directories | ||
[[ -d lib64 ]] && mv lib64 lib | ||
mkdir -p ${PREFIX}/lib | ||
[[ ${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 | ||
# Put all other files in targetsDir | ||
mkdir -p ${PREFIX}/${targetsDir}/${PKG_NAME} | ||
cp -rv $i ${PREFIX}/${targetsDir}/${PKG_NAME} | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
arm_variant_type: # [aarch64] | ||
- sbsa # [aarch64] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
{% set name = "cuda-cupti" %} | ||
{% set version = "12.0.90" %} | ||
{% set lib_version = "2022.4.0" %} | ||
{% 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 target_name = "x86_64-linux" %} # [linux64] | ||
{% set target_name = "ppc64le-linux" %} # [ppc64le] | ||
{% set target_name = "sbsa-linux" %} # [aarch64] | ||
{% set target_name = "x64" %} # [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] | ||
|
||
test: | ||
commands: | ||
- test -L $PREFIX/lib/libcupti.so.{{ version.split(".")[0] }} # [linux] | ||
- test -L $PREFIX/lib/libcupti.so.{{ lib_version }} # [linux] | ||
- test -L $PREFIX/targets/{{ target_name }}/lib/libcupti.so.{{ version.split(".")[0] }} # [linux] | ||
- test -f $PREFIX/targets/{{ target_name }}/lib/libcupti.so.{{ lib_version }} # [linux] | ||
- if not exist %LIBRARY_LIB%\cupti64_{{ lib_version }}.dll exit 1 # [win] | ||
|
||
outputs: | ||
- name: cuda-cupti | ||
files: | ||
- lib/libcupti*.so.* # [linux] | ||
- targets/{{ target_name }}/lib/*.so.* # [linux] | ||
- Library\lib\*.dll # [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] | ||
# Tests are defined at the top level, due to package/output name conflicts. | ||
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/cupti/index.html | ||
|
||
- name: cuda-cupti-dev | ||
files: | ||
- lib/checkpoint.so # [linux] | ||
- lib/libcupti.so # [linux] | ||
- lib/libnv*.so # [linux] | ||
- lib/libpcsamplingutil.so # [linux] | ||
- targets/{{ target_name }}/lib/*.so # [linux] | ||
- targets/{{ target_name }}/include # [linux] | ||
- Library\include # [win] | ||
- Library\lib\*.lib # [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") }} | ||
- {{ pin_subpackage("cuda-cupti", exact=True) }} | ||
run_constrained: | ||
- arm-variant * {{ arm_variant_type }} # [aarch64] | ||
- cuda-cupti-static >={{ version }} | ||
test: | ||
commands: | ||
- test -L $PREFIX/lib/libcupti.so # [linux] | ||
- test -L $PREFIX/lib/libnvperf_host.so # [linux] | ||
- test -L $PREFIX/lib/libnvperf_target.so # [linux] | ||
- test -f $PREFIX/targets/{{ target_name }}/include/cupti.h # [linux] | ||
- test -L $PREFIX/targets/{{ target_name }}/lib/libcupti.so # [linux] | ||
- test -f $PREFIX/targets/{{ target_name }}/lib/libnvperf_host.so # [linux] | ||
- test -f $PREFIX/targets/{{ target_name }}/lib/libnvperf_target.so # [linux] | ||
- if not exist %LIBRARY_LIB%\cupti.lib exit 1 # [win] | ||
- if not exist %LIBRARY_INC%\cupti.h 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: 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/cupti/index.html | ||
|
||
- name: cuda-cupti-static | ||
build: | ||
skip: True # [not linux] | ||
files: | ||
- targets/{{ target_name }}/lib/*static.a | ||
requirements: | ||
build: | ||
- 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/targets/{{ target_name }}/lib/libcupti_static.a # [linux] | ||
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/cupti/index.html | ||
|
||
- name: cuda-cupti-doc | ||
files: | ||
- targets/{{ target_name }}/{{ name }}/samples | ||
- targets/{{ target_name }}/{{ name }}/doc | ||
requirements: | ||
build: | ||
- 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 -d $PREFIX/targets/{{ target_name }}/{{ name }}/samples # [linux] | ||
- test -d $PREFIX/targets/{{ target_name }}/{{ name }}/doc # [linux] | ||
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/cupti/index.html | ||
|
||
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/cupti/index.html | ||
|
||
extra: | ||
recipe-maintainers: | ||
- adibbley |