diff --git a/conda-forge.yml b/conda-forge.yml new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/conda-forge.yml @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/recipe/bld.bat b/recipe/bld.bat new file mode 100644 index 0000000..f4f25c3 --- /dev/null +++ b/recipe/bld.bat @@ -0,0 +1,3 @@ +if not exist %PREFIX% mkdir %PREFIX% + +move include\* %LIBRARY_INC% diff --git a/recipe/build.sh b/recipe/build.sh new file mode 100644 index 0000000..f2c4559 --- /dev/null +++ b/recipe/build.sh @@ -0,0 +1,19 @@ +#!/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 == "include" ]]; then + # Headers are installed to targetsDir (header only) + mkdir -p ${PREFIX}/${targetsDir} + cp -rv $i ${PREFIX}/${targetsDir} + fi +done diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml new file mode 100644 index 0000000..52229a8 --- /dev/null +++ b/recipe/conda_build_config.yaml @@ -0,0 +1,2 @@ +arm_variant_type: # [aarch64] + - sbsa # [aarch64] diff --git a/recipe/meta.yaml b/recipe/meta.yaml new file mode 100644 index 0000000..a19980f --- /dev/null +++ b/recipe/meta.yaml @@ -0,0 +1,60 @@ +{% 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] +{% 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_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 or win] + +requirements: + build: + - arm-variant * {{ arm_variant_type }} # [aarch64] + host: + - cuda-version {{ cuda_version }} + run: + - {{ pin_compatible("cuda-version", max_pin="x.x") }} + - cuda-cudart-dev + run_constrained: + - arm-variant * {{ arm_variant_type }} # [aarch64] + +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 + 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/nsight-compute/ProfilingGuide/index.html#range-replay-define-range + +extra: + recipe-maintainers: + - adibbley