From 7ae3346880102a1bf47c8ba3c819b91725ba0cd7 Mon Sep 17 00:00:00 2001 From: adibbley Date: Tue, 31 Jan 2023 16:10:44 -0500 Subject: [PATCH 1/9] Adding cuda-profiler-api recipes --- recipes/cuda-profiler-api/bld.bat | 3 +++ recipes/cuda-profiler-api/build.sh | 24 +++++++++++++++++++ recipes/cuda-profiler-api/meta.yaml | 37 +++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 recipes/cuda-profiler-api/bld.bat create mode 100644 recipes/cuda-profiler-api/build.sh create mode 100644 recipes/cuda-profiler-api/meta.yaml diff --git a/recipes/cuda-profiler-api/bld.bat b/recipes/cuda-profiler-api/bld.bat new file mode 100644 index 0000000000000..f4f25c3fec74e --- /dev/null +++ b/recipes/cuda-profiler-api/bld.bat @@ -0,0 +1,3 @@ +if not exist %PREFIX% mkdir %PREFIX% + +move include\* %LIBRARY_INC% diff --git a/recipes/cuda-profiler-api/build.sh b/recipes/cuda-profiler-api/build.sh new file mode 100644 index 0000000000000..88d88e1c61295 --- /dev/null +++ b/recipes/cuda-profiler-api/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-profiler-api/meta.yaml b/recipes/cuda-profiler-api/meta.yaml new file mode 100644 index 0000000000000..9170fd4ce2982 --- /dev/null +++ b/recipes/cuda-profiler-api/meta.yaml @@ -0,0 +1,37 @@ +{% set name = "cuda-profiler-api" %} +{% set version = "12.0.76" %} +{% 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_profiler_api/{{ platform }}/cuda_profiler_api-{{ platform }}-{{ version }}-archive.{{ extension }} + sha256: 0fb470a3065ad39666dd231c12f8c8a9a94f34c4ac8494e5a399ea8e6ad69346 # [linux64] + sha256: 211513a8a194557a2b838a46700a820af6f38932fac5a82fa229c162779d9a25 # [ppc64le] + sha256: b93d4e99077c31e7034eeaea09068b43abc0dd2868a01d489ebcd1e51ceab816 # [aarch64] + sha256: e8bccbfda35abc7076ba6623578d11d05966a9c7fed817cbfe7d4dea9627057e # [win] + +build: + number: 0 + skip: true # [osx] + +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: CUDA Profiler API Headers. + description: | + CUDA Profiler API Headers. + doc_url: https://docs.nvidia.com/cuda/index.html + +extra: + recipe-maintainers: + - adibbley From b6c8f71cdca99ccc6b26648b9e5af5a84ad0a69c Mon Sep 17 00:00:00 2001 From: adibbley Date: Thu, 23 Feb 2023 16:36:41 -0500 Subject: [PATCH 2/9] Add tests --- recipes/cuda-profiler-api/meta.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes/cuda-profiler-api/meta.yaml b/recipes/cuda-profiler-api/meta.yaml index 9170fd4ce2982..050e62b23fcce 100644 --- a/recipes/cuda-profiler-api/meta.yaml +++ b/recipes/cuda-profiler-api/meta.yaml @@ -22,6 +22,11 @@ build: number: 0 skip: true # [osx] +test: + commands: + - test -f $PREFIX/targets/*/include/cuda_profiler_api.h # [linux] + - if not exist %LIBRARY_INC%\cuda_profiler_api.h exit 1 # [win] + about: home: https://developer.nvidia.com/cuda-toolkit license_file: LICENSE From 0219ced374e295f5d1a06c7a99c17aca9ab452ce Mon Sep 17 00:00:00 2001 From: adibbley <103537006+adibbley@users.noreply.github.com> Date: Wed, 22 Mar 2023 09:10:15 -0400 Subject: [PATCH 3/9] Apply suggestions from code review Co-authored-by: Bradley Dice --- recipes/cuda-profiler-api/meta.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/recipes/cuda-profiler-api/meta.yaml b/recipes/cuda-profiler-api/meta.yaml index 050e62b23fcce..c70770ceb979b 100644 --- a/recipes/cuda-profiler-api/meta.yaml +++ b/recipes/cuda-profiler-api/meta.yaml @@ -1,5 +1,6 @@ {% set name = "cuda-profiler-api" %} {% set version = "12.0.76" %} +{% set cuda_version = "12.0" %} {% set platform = "linux-x86_64" %} # [linux64] {% set platform = "linux-ppc64le" %} # [ppc64le] {% set platform = "linux-sbsa" %} # [aarch64] @@ -22,6 +23,12 @@ build: number: 0 skip: true # [osx] +requirements: + host: + - cuda-version {{ cuda_version }} + run: + - {{ pin_compatible("cuda-version", max_pin="x.x") }} + test: commands: - test -f $PREFIX/targets/*/include/cuda_profiler_api.h # [linux] From 53b119ad107e7859f89beb57a5ccaefce08e0969 Mon Sep 17 00:00:00 2001 From: adibbley Date: Thu, 6 Apr 2023 14:08:56 -0400 Subject: [PATCH 4/9] Add arm-variant and target_name --- recipes/cuda-profiler-api/build.sh | 27 ++++++++++--------- .../cuda-profiler-api/conda_build_config.yaml | 2 ++ recipes/cuda-profiler-api/meta.yaml | 10 ++++++- 3 files changed, 25 insertions(+), 14 deletions(-) create mode 100644 recipes/cuda-profiler-api/conda_build_config.yaml diff --git a/recipes/cuda-profiler-api/build.sh b/recipes/cuda-profiler-api/build.sh index 88d88e1c61295..716fd368ddc3a 100644 --- a/recipes/cuda-profiler-api/build.sh +++ b/recipes/cuda-profiler-api/build.sh @@ -8,17 +8,18 @@ [[ ${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 + [[ $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} + # Header only component + 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-profiler-api/conda_build_config.yaml b/recipes/cuda-profiler-api/conda_build_config.yaml new file mode 100644 index 0000000000000..52229a8424e52 --- /dev/null +++ b/recipes/cuda-profiler-api/conda_build_config.yaml @@ -0,0 +1,2 @@ +arm_variant_type: # [aarch64] + - sbsa # [aarch64] diff --git a/recipes/cuda-profiler-api/meta.yaml b/recipes/cuda-profiler-api/meta.yaml index c70770ceb979b..735fd1cf8d7d0 100644 --- a/recipes/cuda-profiler-api/meta.yaml +++ b/recipes/cuda-profiler-api/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] @@ -24,14 +28,18 @@ build: skip: true # [osx] 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/*/include/cuda_profiler_api.h # [linux] + - test -f $PREFIX/targets/{{ target_name }}/include/cuda_profiler_api.h # [linux] - if not exist %LIBRARY_INC%\cuda_profiler_api.h exit 1 # [win] about: From c6b2cae2766538002e642d7a03bc43f78d175d85 Mon Sep 17 00:00:00 2001 From: adibbley Date: Thu, 13 Apr 2023 18:01:08 -0400 Subject: [PATCH 5/9] Add cuda-cudart-dev to run and remove lib build.sh logic --- recipes/cuda-profiler-api/build.sh | 2 +- recipes/cuda-profiler-api/meta.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/cuda-profiler-api/build.sh b/recipes/cuda-profiler-api/build.sh index 716fd368ddc3a..3b84c1ae698c5 100644 --- a/recipes/cuda-profiler-api/build.sh +++ b/recipes/cuda-profiler-api/build.sh @@ -11,7 +11,7 @@ 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 + if [[ $i == "include" ]]; then # Headers and libraries are installed to targetsDir mkdir -p ${PREFIX}/${targetsDir} mkdir -p ${PREFIX}/$i diff --git a/recipes/cuda-profiler-api/meta.yaml b/recipes/cuda-profiler-api/meta.yaml index 735fd1cf8d7d0..8d45f67680819 100644 --- a/recipes/cuda-profiler-api/meta.yaml +++ b/recipes/cuda-profiler-api/meta.yaml @@ -34,6 +34,7 @@ requirements: - cuda-version {{ cuda_version }} run: - {{ pin_compatible("cuda-version", max_pin="x.x") }} + - cuda-cudart-dev run_constrained: - arm-variant * {{ arm_variant_type }} # [aarch64] From cbc3197b9d2554e4fc949dbc271e302693e22420 Mon Sep 17 00:00:00 2001 From: adibbley <103537006+adibbley@users.noreply.github.com> Date: Fri, 14 Apr 2023 17:25:56 -0400 Subject: [PATCH 6/9] Apply suggestions from code review Co-authored-by: Bradley Dice --- recipes/cuda-profiler-api/build.sh | 4 +--- recipes/cuda-profiler-api/meta.yaml | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/cuda-profiler-api/build.sh b/recipes/cuda-profiler-api/build.sh index 3b84c1ae698c5..cffc14990b175 100644 --- a/recipes/cuda-profiler-api/build.sh +++ b/recipes/cuda-profiler-api/build.sh @@ -12,11 +12,9 @@ for i in `ls`; do [[ $i == "conda_build.sh" ]] && continue [[ $i == "metadata_conda_debug.yaml" ]] && continue if [[ $i == "include" ]]; then - # Headers and libraries are installed to targetsDir + # Headers are installed to targetsDir (header only) mkdir -p ${PREFIX}/${targetsDir} - mkdir -p ${PREFIX}/$i cp -rv $i ${PREFIX}/${targetsDir} - # Header only component else # Put all other files in targetsDir mkdir -p ${PREFIX}/${targetsDir}/${PKG_NAME} diff --git a/recipes/cuda-profiler-api/meta.yaml b/recipes/cuda-profiler-api/meta.yaml index 8d45f67680819..a0f4604609f40 100644 --- a/recipes/cuda-profiler-api/meta.yaml +++ b/recipes/cuda-profiler-api/meta.yaml @@ -41,7 +41,9 @@ requirements: test: commands: - test -f $PREFIX/targets/{{ target_name }}/include/cuda_profiler_api.h # [linux] + - test -f $PREFIX/targets/{{ target_name }}/include/cudaProfiler.h # [linux] - if not exist %LIBRARY_INC%\cuda_profiler_api.h exit 1 # [win] + - if not exist %LIBRARY_INC%\cudaProfiler.h exit 1 # [win] about: home: https://developer.nvidia.com/cuda-toolkit From 9c1bff227c83636c5fc7c7c1a9ca0cea750ce42b Mon Sep 17 00:00:00 2001 From: adibbley Date: Fri, 14 Apr 2023 17:28:21 -0400 Subject: [PATCH 7/9] Remove unnecessary copy --- recipes/cuda-profiler-api/build.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/recipes/cuda-profiler-api/build.sh b/recipes/cuda-profiler-api/build.sh index cffc14990b175..f2c4559bde248 100644 --- a/recipes/cuda-profiler-api/build.sh +++ b/recipes/cuda-profiler-api/build.sh @@ -15,9 +15,5 @@ for i in `ls`; do # Headers are installed to targetsDir (header only) mkdir -p ${PREFIX}/${targetsDir} cp -rv $i ${PREFIX}/${targetsDir} - else - # Put all other files in targetsDir - mkdir -p ${PREFIX}/${targetsDir}/${PKG_NAME} - cp -rv $i ${PREFIX}/${targetsDir}/${PKG_NAME} fi done From ec39b3d94eecaaf80282e11db56d0953bfadf1f5 Mon Sep 17 00:00:00 2001 From: adibbley Date: Mon, 17 Apr 2023 10:04:54 -0400 Subject: [PATCH 8/9] Skip Windows until cuda-cudart is fixed --- recipes/cuda-profiler-api/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cuda-profiler-api/meta.yaml b/recipes/cuda-profiler-api/meta.yaml index a0f4604609f40..fa97fe9aa5528 100644 --- a/recipes/cuda-profiler-api/meta.yaml +++ b/recipes/cuda-profiler-api/meta.yaml @@ -25,7 +25,7 @@ source: build: number: 0 - skip: true # [osx] + skip: true # [osx or win] requirements: build: From d416eb74d750568745df71d287c01c483c66399b Mon Sep 17 00:00:00 2001 From: adibbley <103537006+adibbley@users.noreply.github.com> Date: Mon, 17 Apr 2023 15:35:50 -0400 Subject: [PATCH 9/9] Update recipes/cuda-profiler-api/meta.yaml Co-authored-by: jakirkham --- recipes/cuda-profiler-api/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cuda-profiler-api/meta.yaml b/recipes/cuda-profiler-api/meta.yaml index fa97fe9aa5528..a19980f3f601c 100644 --- a/recipes/cuda-profiler-api/meta.yaml +++ b/recipes/cuda-profiler-api/meta.yaml @@ -53,7 +53,7 @@ about: summary: CUDA Profiler API Headers. description: | CUDA Profiler API Headers. - doc_url: https://docs.nvidia.com/cuda/index.html + doc_url: https://docs.nvidia.com/nsight-compute/ProfilingGuide/index.html#range-replay-define-range extra: recipe-maintainers: