From 15cb8483c2cc0549c931a2d0a5e545bd697d33ad Mon Sep 17 00:00:00 2001 From: adibbley Date: Tue, 31 Jan 2023 15:51:40 -0500 Subject: [PATCH 01/19] Adding cuda-cupti recipe --- recipes/cuda-cupti/bld.bat | 6 +++ recipes/cuda-cupti/build.sh | 24 +++++++++++ recipes/cuda-cupti/meta.yaml | 78 ++++++++++++++++++++++++++++++++++++ 3 files changed, 108 insertions(+) create mode 100644 recipes/cuda-cupti/bld.bat create mode 100644 recipes/cuda-cupti/build.sh create mode 100644 recipes/cuda-cupti/meta.yaml diff --git a/recipes/cuda-cupti/bld.bat b/recipes/cuda-cupti/bld.bat new file mode 100644 index 0000000000000..ae389253f2ad8 --- /dev/null +++ b/recipes/cuda-cupti/bld.bat @@ -0,0 +1,6 @@ +if not exist %PREFIX% mkdir %PREFIX% + +move lib\x64\* %LIBRARY_LIB% +move include\* %LIBRARY_INC% +move doc\* %LIBRARY_INC% +move samples\* %LIBRARY_INC% diff --git a/recipes/cuda-cupti/build.sh b/recipes/cuda-cupti/build.sh new file mode 100644 index 0000000000000..88d88e1c61295 --- /dev/null +++ b/recipes/cuda-cupti/build.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# Install to conda style directories +[[ -d lib64 ]] && mv lib64 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 + 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 diff --git a/recipes/cuda-cupti/meta.yaml b/recipes/cuda-cupti/meta.yaml new file mode 100644 index 0000000000000..f4abbaca9a002 --- /dev/null +++ b/recipes/cuda-cupti/meta.yaml @@ -0,0 +1,78 @@ +{% set name = "cuda-cupti" %} +{% set version = "12.0.90" %} +{% 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 + files: + - lib/*.so.* # [linux] + - targets/*/lib/*.so.* # [linux] + - Library\lib\*.dll # [win] + + - name: cuda-cupti-dev + requirements: + build: + - {{ compiler("c") }} + - {{ compiler("cxx") }} + run: + - cuda-cupti >={{ version }} + files: + - lib/*.so # [linux] + - targets/*/lib/*.so # [linux] + - include # [linux] + - targets/*/include # [linux] + - samples # [linux] + - doc # [linux] + - Library\include # [win] + - Library\lib\*.lib # [win] + - Library\samples # [win] + - Library\doc # [win] + + - name: cuda-cupti-static + build: + skip: True # [not linux] + requirements: + run: + - 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 From c6ed71d92bbc40d86ad785c8f121a2fe12bb8957 Mon Sep 17 00:00:00 2001 From: adibbley Date: Tue, 21 Mar 2023 13:52:25 -0400 Subject: [PATCH 02/19] Add cuda-version requirements --- recipes/cuda-cupti/meta.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes/cuda-cupti/meta.yaml b/recipes/cuda-cupti/meta.yaml index f4abbaca9a002..f771512546514 100644 --- a/recipes/cuda-cupti/meta.yaml +++ b/recipes/cuda-cupti/meta.yaml @@ -29,6 +29,9 @@ requirements: outputs: - name: cuda-cupti + requirements: + run: + - cuda-version =12.0 files: - lib/*.so.* # [linux] - targets/*/lib/*.so.* # [linux] @@ -41,6 +44,7 @@ outputs: - {{ compiler("cxx") }} run: - cuda-cupti >={{ version }} + - cuda-version =12.0 files: - lib/*.so # [linux] - targets/*/lib/*.so # [linux] @@ -59,6 +63,7 @@ outputs: requirements: run: - cuda-cupti >={{ version }} + - cuda-version =12.0 files: - lib/*static.a - targets/*/lib/*static.a From 937bc62818ce291963bbee49368b9d7794e1f9d0 Mon Sep 17 00:00:00 2001 From: adibbley Date: Tue, 21 Mar 2023 14:00:52 -0400 Subject: [PATCH 03/19] Add tests --- recipes/cuda-cupti/meta.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/recipes/cuda-cupti/meta.yaml b/recipes/cuda-cupti/meta.yaml index f771512546514..a732115cb3155 100644 --- a/recipes/cuda-cupti/meta.yaml +++ b/recipes/cuda-cupti/meta.yaml @@ -29,6 +29,10 @@ requirements: outputs: - name: cuda-cupti + test: + commands: + - test -f $PREFIX/lib/libcupti.so.* # [linux] + - if not exist %LIBRARY_BIN%\cupti64_*.dll exit 1 # [win] requirements: run: - cuda-version =12.0 @@ -38,6 +42,10 @@ outputs: - Library\lib\*.dll # [win] - name: cuda-cupti-dev + test: + commands: + - test -d $PREFIX/lib/libnvperf_host.so # [linux] + - if not exist %LIBRARY_BIN%\cupti.lib exit 1 # [win] requirements: build: - {{ compiler("c") }} @@ -60,6 +68,9 @@ outputs: - name: cuda-cupti-static build: skip: True # [not linux] + test: + commands: + - test -L $PREFIX/lib/libcupti_static.a # [linux] requirements: run: - cuda-cupti >={{ version }} From c643031c76fa4ebada197cd5ae86c10365a123ae Mon Sep 17 00:00:00 2001 From: adibbley Date: Tue, 21 Mar 2023 14:10:55 -0400 Subject: [PATCH 04/19] Fix test flag --- recipes/cuda-cupti/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cuda-cupti/meta.yaml b/recipes/cuda-cupti/meta.yaml index a732115cb3155..f9a88c644efce 100644 --- a/recipes/cuda-cupti/meta.yaml +++ b/recipes/cuda-cupti/meta.yaml @@ -44,7 +44,7 @@ outputs: - name: cuda-cupti-dev test: commands: - - test -d $PREFIX/lib/libnvperf_host.so # [linux] + - test -f $PREFIX/lib/libnvperf_host.so # [linux] - if not exist %LIBRARY_BIN%\cupti.lib exit 1 # [win] requirements: build: From fe5d507b3feb40bd87e90cedc29f0291d33258ff Mon Sep 17 00:00:00 2001 From: adibbley Date: Tue, 21 Mar 2023 14:29:51 -0400 Subject: [PATCH 05/19] Move docs/samples to cuda-cupti directory --- recipes/cuda-cupti/bld.bat | 9 ++++++--- recipes/cuda-cupti/meta.yaml | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/recipes/cuda-cupti/bld.bat b/recipes/cuda-cupti/bld.bat index ae389253f2ad8..57634637e0b08 100644 --- a/recipes/cuda-cupti/bld.bat +++ b/recipes/cuda-cupti/bld.bat @@ -1,6 +1,9 @@ if not exist %PREFIX% mkdir %PREFIX% +mkdir %PREFIX%/cuda-cupti +mkdir %PREFIX%/cuda-cupti/docs +mkdir %PREFIX%/cuda-cupti/samples -move lib\x64\* %LIBRARY_LIB% +move lib\* %LIBRARY_LIB% move include\* %LIBRARY_INC% -move doc\* %LIBRARY_INC% -move samples\* %LIBRARY_INC% +move doc\* %PREFIX%/cuda-cupti/docs +move samples\* %PREFIX%/cuda-cupti/samples diff --git a/recipes/cuda-cupti/meta.yaml b/recipes/cuda-cupti/meta.yaml index f9a88c644efce..e82642e522002 100644 --- a/recipes/cuda-cupti/meta.yaml +++ b/recipes/cuda-cupti/meta.yaml @@ -54,16 +54,16 @@ outputs: - cuda-cupti >={{ version }} - cuda-version =12.0 files: - - lib/*.so # [linux] - - targets/*/lib/*.so # [linux] - - include # [linux] - - targets/*/include # [linux] - - samples # [linux] - - doc # [linux] - - Library\include # [win] - - Library\lib\*.lib # [win] - - Library\samples # [win] - - Library\doc # [win] + - lib/*.so # [linux] + - targets/*/lib/*.so # [linux] + - include # [linux] + - targets/*/include # [linux] + - samples # [linux] + - doc # [linux] + - Library\include # [win] + - Library\lib\*.lib # [win] + - cuda-cupti\samples # [win] + - cuda-cupti\doc # [win] - name: cuda-cupti-static build: From 8cbc9cae2bfe94fa2842994eb42124388f4a120a Mon Sep 17 00:00:00 2001 From: adibbley Date: Tue, 21 Mar 2023 14:45:00 -0400 Subject: [PATCH 06/19] Fixing docs/samples copying --- recipes/cuda-cupti/bld.bat | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/recipes/cuda-cupti/bld.bat b/recipes/cuda-cupti/bld.bat index 57634637e0b08..31bb50b15e982 100644 --- a/recipes/cuda-cupti/bld.bat +++ b/recipes/cuda-cupti/bld.bat @@ -1,9 +1,7 @@ if not exist %PREFIX% mkdir %PREFIX% mkdir %PREFIX%/cuda-cupti -mkdir %PREFIX%/cuda-cupti/docs -mkdir %PREFIX%/cuda-cupti/samples move lib\* %LIBRARY_LIB% move include\* %LIBRARY_INC% -move doc\* %PREFIX%/cuda-cupti/docs -move samples\* %PREFIX%/cuda-cupti/samples +move doc %PREFIX%/cuda-cupti +move samples %PREFIX%/cuda-cupti From 3b0b5cb34641318c867714b5276c7aa4e07c84fa Mon Sep 17 00:00:00 2001 From: adibbley Date: Tue, 21 Mar 2023 15:01:59 -0400 Subject: [PATCH 07/19] Fix Windows test --- recipes/cuda-cupti/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cuda-cupti/meta.yaml b/recipes/cuda-cupti/meta.yaml index e82642e522002..23b25ed85b391 100644 --- a/recipes/cuda-cupti/meta.yaml +++ b/recipes/cuda-cupti/meta.yaml @@ -45,7 +45,7 @@ outputs: test: commands: - test -f $PREFIX/lib/libnvperf_host.so # [linux] - - if not exist %LIBRARY_BIN%\cupti.lib exit 1 # [win] + - if not exist %LIBRARY_LIB%\cupti.lib exit 1 # [win] requirements: build: - {{ compiler("c") }} From 8c27bb08e50dc4973e3ed30a81fb148e5673edac Mon Sep 17 00:00:00 2001 From: adibbley Date: Tue, 21 Mar 2023 15:21:37 -0400 Subject: [PATCH 08/19] Use same doc/samples location for windows/linux --- recipes/cuda-cupti/bld.bat | 4 ++-- recipes/cuda-cupti/meta.yaml | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/recipes/cuda-cupti/bld.bat b/recipes/cuda-cupti/bld.bat index 31bb50b15e982..ecfa028268332 100644 --- a/recipes/cuda-cupti/bld.bat +++ b/recipes/cuda-cupti/bld.bat @@ -3,5 +3,5 @@ mkdir %PREFIX%/cuda-cupti move lib\* %LIBRARY_LIB% move include\* %LIBRARY_INC% -move doc %PREFIX%/cuda-cupti -move samples %PREFIX%/cuda-cupti +move doc %PREFIX% +move samples %PREFIX% diff --git a/recipes/cuda-cupti/meta.yaml b/recipes/cuda-cupti/meta.yaml index 23b25ed85b391..30dc4b22df9b2 100644 --- a/recipes/cuda-cupti/meta.yaml +++ b/recipes/cuda-cupti/meta.yaml @@ -58,12 +58,10 @@ outputs: - targets/*/lib/*.so # [linux] - include # [linux] - targets/*/include # [linux] - - samples # [linux] - - doc # [linux] + - samples + - doc - Library\include # [win] - Library\lib\*.lib # [win] - - cuda-cupti\samples # [win] - - cuda-cupti\doc # [win] - name: cuda-cupti-static build: From 33a024f553d3376db8a3025cd5b2040bc0f610e5 Mon Sep 17 00:00:00 2001 From: adibbley <103537006+adibbley@users.noreply.github.com> Date: Wed, 22 Mar 2023 09:13:22 -0400 Subject: [PATCH 09/19] Apply suggestions from code review Co-authored-by: Bradley Dice --- recipes/cuda-cupti/meta.yaml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/recipes/cuda-cupti/meta.yaml b/recipes/cuda-cupti/meta.yaml index 30dc4b22df9b2..089862c4979c9 100644 --- a/recipes/cuda-cupti/meta.yaml +++ b/recipes/cuda-cupti/meta.yaml @@ -1,5 +1,6 @@ {% set name = "cuda-cupti" %} {% set version = "12.0.90" %} +{% set cuda_version = "12.0" %} {% set platform = "linux-x86_64" %} # [linux64] {% set platform = "linux-ppc64le" %} # [ppc64le] {% set platform = "linux-sbsa" %} # [aarch64] @@ -34,8 +35,10 @@ outputs: - test -f $PREFIX/lib/libcupti.so.* # [linux] - if not exist %LIBRARY_BIN%\cupti64_*.dll exit 1 # [win] requirements: + host: + - cuda-version {{ cuda_version}} run: - - cuda-version =12.0 + - {{ pin_compatible("cuda-version", max_pin="x.x") }} files: - lib/*.so.* # [linux] - targets/*/lib/*.so.* # [linux] @@ -45,14 +48,17 @@ outputs: test: commands: - test -f $PREFIX/lib/libnvperf_host.so # [linux] + - 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 }} - - cuda-version =12.0 files: - lib/*.so # [linux] - targets/*/lib/*.so # [linux] @@ -70,9 +76,11 @@ outputs: 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 }} - - cuda-version =12.0 files: - lib/*static.a - targets/*/lib/*static.a From 70f539f6f2ce15700da7dd9702a75a7eca9abbd8 Mon Sep 17 00:00:00 2001 From: adibbley Date: Wed, 22 Mar 2023 09:15:55 -0400 Subject: [PATCH 10/19] Fix variable spacing --- recipes/cuda-cupti/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cuda-cupti/meta.yaml b/recipes/cuda-cupti/meta.yaml index 089862c4979c9..304b94f715948 100644 --- a/recipes/cuda-cupti/meta.yaml +++ b/recipes/cuda-cupti/meta.yaml @@ -36,7 +36,7 @@ outputs: - if not exist %LIBRARY_BIN%\cupti64_*.dll exit 1 # [win] requirements: host: - - cuda-version {{ cuda_version}} + - cuda-version {{ cuda_version }} run: - {{ pin_compatible("cuda-version", max_pin="x.x") }} files: From 2cb5bad77ee66c6319f38efad5ed3413a53314eb Mon Sep 17 00:00:00 2001 From: adibbley <103537006+adibbley@users.noreply.github.com> Date: Thu, 6 Apr 2023 14:17:48 -0400 Subject: [PATCH 11/19] Apply suggestions from code review Co-authored-by: Robert Maynard --- recipes/cuda-cupti/build.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes/cuda-cupti/build.sh b/recipes/cuda-cupti/build.sh index 88d88e1c61295..474c756c1b006 100644 --- a/recipes/cuda-cupti/build.sh +++ b/recipes/cuda-cupti/build.sh @@ -2,7 +2,7 @@ # 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" @@ -16,9 +16,12 @@ for i in `ls`; do mkdir -p ${PREFIX}/$i cp -rv $i ${PREFIX}/${targetsDir} for j in `ls $i`; do - ln -s ../${targetsDir}/$i/$j ${PREFIX}/$i/$j + ln -s ${PREFIX}/${targetsDir}/$i/$j ${PREFIX}/$i/$j done else cp -rv $i ${PREFIX} + # Put all other files in targetsDir + mkdi r -p ${PREFIX}/${targetsDir}/${PKG_NAME} + cp -rv $i ${PREFIX}/${targetsDir}/${PKG_NAME} fi done From e7df33075b5005f32945b4388024fdf53bbb5317 Mon Sep 17 00:00:00 2001 From: adibbley Date: Thu, 6 Apr 2023 17:13:35 -0400 Subject: [PATCH 12/19] Updates to follow libcublas and add doc package --- recipes/cuda-cupti/build.sh | 35 +++--- recipes/cuda-cupti/conda_build_config.yaml | 2 + recipes/cuda-cupti/meta.yaml | 136 ++++++++++++++++----- 3 files changed, 124 insertions(+), 49 deletions(-) create mode 100644 recipes/cuda-cupti/conda_build_config.yaml diff --git a/recipes/cuda-cupti/build.sh b/recipes/cuda-cupti/build.sh index 474c756c1b006..e7269f0119ee5 100644 --- a/recipes/cuda-cupti/build.sh +++ b/recipes/cuda-cupti/build.sh @@ -8,20 +8,23 @@ mkdir -p ${PREFIX}/lib [[ ${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 ${PREFIX}/${targetsDir}/$i/$j ${PREFIX}/$i/$j - done - else - cp -rv $i ${PREFIX} - # Put all other files in targetsDir - mkdi r -p ${PREFIX}/${targetsDir}/${PKG_NAME} - cp -rv $i ${PREFIX}/${targetsDir}/${PKG_NAME} - fi + [[ $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 diff --git a/recipes/cuda-cupti/conda_build_config.yaml b/recipes/cuda-cupti/conda_build_config.yaml new file mode 100644 index 0000000000000..52229a8424e52 --- /dev/null +++ b/recipes/cuda-cupti/conda_build_config.yaml @@ -0,0 +1,2 @@ +arm_variant_type: # [aarch64] + - sbsa # [aarch64] diff --git a/recipes/cuda-cupti/meta.yaml b/recipes/cuda-cupti/meta.yaml index 304b94f715948..682b47b76137f 100644 --- a/recipes/cuda-cupti/meta.yaml +++ b/recipes/cuda-cupti/meta.yaml @@ -5,6 +5,10 @@ {% 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] @@ -23,67 +27,133 @@ 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] - - if not exist %LIBRARY_BIN%\cupti64_*.dll exit 1 # [win] + files: + - lib/*.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") }} - files: - - lib/*.so.* # [linux] - - targets/*/lib/*.so.* # [linux] - - Library\lib\*.dll # [win] - - - name: cuda-cupti-dev + run_constrained: + - arm-variant * {{ arm_variant_type }} # [aarch64] test: commands: - - test -f $PREFIX/lib/libnvperf_host.so # [linux] - - test -f $PREFIX/lib/libnvperf_target.so # [linux] - - if not exist %LIBRARY_LIB%\cupti.lib exit 1 # [win] + - test -L $PREFIX/lib/libcupti.so.{{ version }} # [linux] + - test -L $PREFIX/lib/libcupti.so.{{ version.split(".")[0] }} # [linux] + - test -L $PREFIX/targets/{{ target_name }}/lib/libcupti.so.{{ version }} # [linux] + - test -f $PREFIX/targets/{{ target_name }}/lib/libcupti.so.{{ version.split(".")[0] }} # [linux] + - if not exist %LIBRARY_BIN%\cupti64_{{ version.split(".")[0] }}.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: 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 + + - name: cuda-cupti-dev + files: + - lib/*.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") }} - - cuda-cupti >={{ version }} - files: - - lib/*.so # [linux] - - targets/*/lib/*.so # [linux] - - include # [linux] - - targets/*/include # [linux] - - samples - - doc - - Library\include # [win] - - Library\lib\*.lib # [win] + - {{ pin_subpackage("cuda-cupti", exact=True) }} + run_constrained: + - arm-variant * {{ arm_variant_type }} # [aarch64] + 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/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 -L $PREFIX/lib/libcupti_static.a # [linux] + - 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/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") }} - - cuda-cupti >={{ version }} - files: - - lib/*static.a - - targets/*/lib/*static.a + 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/index.html about: home: https://developer.nvidia.com/cuda-toolkit From 53e3f69ad07c0a8a45aae829a0cff3036c9ff99d Mon Sep 17 00:00:00 2001 From: adibbley Date: Thu, 6 Apr 2023 17:21:31 -0400 Subject: [PATCH 13/19] More specific lib names --- recipes/cuda-cupti/meta.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes/cuda-cupti/meta.yaml b/recipes/cuda-cupti/meta.yaml index 682b47b76137f..5331ccb6beb62 100644 --- a/recipes/cuda-cupti/meta.yaml +++ b/recipes/cuda-cupti/meta.yaml @@ -30,7 +30,7 @@ build: outputs: - name: cuda-cupti files: - - lib/*.so.* # [linux] + - lib/libcupti*.so.* # [linux] - targets/{{ target_name }}/lib/*.so.* # [linux] - Library\lib\*.dll # [win] requirements: @@ -63,7 +63,10 @@ outputs: - name: cuda-cupti-dev files: - - lib/*.so # [linux] + - 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] From 2795daabeb91b5812d666aa4688ac26f3aa93591 Mon Sep 17 00:00:00 2001 From: adibbley <103537006+adibbley@users.noreply.github.com> Date: Thu, 6 Apr 2023 19:04:53 -0400 Subject: [PATCH 14/19] Update recipes/cuda-cupti/meta.yaml Co-authored-by: Bradley Dice --- recipes/cuda-cupti/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/cuda-cupti/meta.yaml b/recipes/cuda-cupti/meta.yaml index 5331ccb6beb62..e483d16816dab 100644 --- a/recipes/cuda-cupti/meta.yaml +++ b/recipes/cuda-cupti/meta.yaml @@ -83,6 +83,7 @@ outputs: - {{ 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] From 06eee2ae0aed9fa9ca4a7a490990996ec1c6b476 Mon Sep 17 00:00:00 2001 From: adibbley Date: Thu, 6 Apr 2023 19:11:31 -0400 Subject: [PATCH 15/19] Update doc_url --- recipes/cuda-cupti/meta.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes/cuda-cupti/meta.yaml b/recipes/cuda-cupti/meta.yaml index e483d16816dab..0bec5ac8edfbf 100644 --- a/recipes/cuda-cupti/meta.yaml +++ b/recipes/cuda-cupti/meta.yaml @@ -59,7 +59,7 @@ outputs: 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 + doc_url: https://docs.nvidia.com/cuda/cupti/index.html - name: cuda-cupti-dev files: @@ -103,7 +103,7 @@ outputs: 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 + doc_url: https://docs.nvidia.com/cuda/cupti/index.html - name: cuda-cupti-static build: @@ -130,7 +130,7 @@ outputs: 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 + doc_url: https://docs.nvidia.com/cuda/cupti/index.html - name: cuda-cupti-doc files: @@ -157,7 +157,7 @@ outputs: 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 + doc_url: https://docs.nvidia.com/cuda/cupti/index.html about: home: https://developer.nvidia.com/cuda-toolkit @@ -167,7 +167,7 @@ about: 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 + doc_url: https://docs.nvidia.com/cuda/cupti/index.html extra: recipe-maintainers: From 7a0b344dd8c65ef23ffe9b24f04011dd714c0c75 Mon Sep 17 00:00:00 2001 From: adibbley Date: Wed, 12 Apr 2023 10:24:34 -0400 Subject: [PATCH 16/19] Fix tests --- recipes/cuda-cupti/meta.yaml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/recipes/cuda-cupti/meta.yaml b/recipes/cuda-cupti/meta.yaml index 0bec5ac8edfbf..612aab1b91999 100644 --- a/recipes/cuda-cupti/meta.yaml +++ b/recipes/cuda-cupti/meta.yaml @@ -1,5 +1,6 @@ {% 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] @@ -27,6 +28,14 @@ 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_BIN%\cupti64_{{ version.split(".")[0] }}.dll exit 1 # [win] + outputs: - name: cuda-cupti files: @@ -44,13 +53,7 @@ outputs: - {{ pin_compatible("cuda-version", max_pin="x.x") }} run_constrained: - arm-variant * {{ arm_variant_type }} # [aarch64] - test: - commands: - - test -L $PREFIX/lib/libcupti.so.{{ version }} # [linux] - - test -L $PREFIX/lib/libcupti.so.{{ version.split(".")[0] }} # [linux] - - test -L $PREFIX/targets/{{ target_name }}/lib/libcupti.so.{{ version }} # [linux] - - test -f $PREFIX/targets/{{ target_name }}/lib/libcupti.so.{{ version.split(".")[0] }} # [linux] - - if not exist %LIBRARY_BIN%\cupti64_{{ version.split(".")[0] }}.dll exit 1 # [win] + # Tests are defined at the top level, due to package/output name conflicts. about: home: https://developer.nvidia.com/cuda-toolkit license_file: LICENSE From 736caa6478b2eb2db38fc65f303bf40d75c051fc Mon Sep 17 00:00:00 2001 From: adibbley <103537006+adibbley@users.noreply.github.com> Date: Fri, 14 Apr 2023 14:24:21 -0400 Subject: [PATCH 17/19] Update recipes/cuda-cupti/meta.yaml Co-authored-by: jakirkham --- recipes/cuda-cupti/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cuda-cupti/meta.yaml b/recipes/cuda-cupti/meta.yaml index 612aab1b91999..b7d3ecedb67f6 100644 --- a/recipes/cuda-cupti/meta.yaml +++ b/recipes/cuda-cupti/meta.yaml @@ -34,7 +34,7 @@ test: - 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_BIN%\cupti64_{{ version.split(".")[0] }}.dll exit 1 # [win] + - if not exist %LIBRARY_BIN%\cupti64_{{ lib_version }}.dll exit 1 # [win] outputs: - name: cuda-cupti From d0c442af22d6c316b222cfa0486326810f4ddb7d Mon Sep 17 00:00:00 2001 From: adibbley Date: Fri, 14 Apr 2023 14:46:36 -0400 Subject: [PATCH 18/19] Windows cupti doesn't use bin --- recipes/cuda-cupti/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cuda-cupti/meta.yaml b/recipes/cuda-cupti/meta.yaml index b7d3ecedb67f6..cbef510b9be42 100644 --- a/recipes/cuda-cupti/meta.yaml +++ b/recipes/cuda-cupti/meta.yaml @@ -34,7 +34,7 @@ test: - 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_BIN%\cupti64_{{ lib_version }}.dll exit 1 # [win] + - if not exist %LIBRARY_LIB%\cupti64_{{ lib_version }}.dll exit 1 # [win] outputs: - name: cuda-cupti From 1a447fbbf9f4355b93eecb368dc682395a10b53d Mon Sep 17 00:00:00 2001 From: adibbley <103537006+adibbley@users.noreply.github.com> Date: Mon, 17 Apr 2023 10:01:20 -0400 Subject: [PATCH 19/19] Update recipes/cuda-cupti/meta.yaml Co-authored-by: Bradley Dice --- recipes/cuda-cupti/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cuda-cupti/meta.yaml b/recipes/cuda-cupti/meta.yaml index cbef510b9be42..4559982dad000 100644 --- a/recipes/cuda-cupti/meta.yaml +++ b/recipes/cuda-cupti/meta.yaml @@ -110,7 +110,7 @@ outputs: - name: cuda-cupti-static build: - skip: True # [not linux] + skip: True # [not linux] files: - targets/{{ target_name }}/lib/*static.a requirements: