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

Adding cuda-sanitizer-api recipe #23000

Merged
merged 16 commits into from
Jun 23, 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-sanitizer-api/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
if not exist %PREFIX% mkdir %PREFIX%
adibbley marked this conversation as resolved.
Show resolved Hide resolved
adibbley marked this conversation as resolved.
Show resolved Hide resolved

adibbley marked this conversation as resolved.
Show resolved Hide resolved
rmdir /q /s compute-sanitizer\x86
adibbley marked this conversation as resolved.
Show resolved Hide resolved

move compute-sanitizer %LIBRARY_PREFIX%
adibbley marked this conversation as resolved.
Show resolved Hide resolved

mklink /h %LIBRARY_BIN%\compute-sanitizer %LIBRARY_PREFIX%\compute-sanitizer\compute-sanitizer.exe
adibbley marked this conversation as resolved.
Show resolved Hide resolved
14 changes: 14 additions & 0 deletions recipes/cuda-sanitizer-api/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

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

# Remove 32bit libraries
[[ -d "compute-sanitizer/x86" ]] && rm -rf compute-sanitizer/x86/

for i in `ls`; do
[[ $i == "build_env_setup.sh" ]] && continue
[[ $i == "conda_build.sh" ]] && continue
[[ $i == "metadata_conda_debug.yaml" ]] && continue
cp -r $i ${PREFIX}
done
2 changes: 2 additions & 0 deletions recipes/cuda-sanitizer-api/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
arm_variant_type: # [aarch64]
- sbsa # [aarch64]
62 changes: 62 additions & 0 deletions recipes/cuda-sanitizer-api/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{% set name = "cuda-sanitizer-api" %}
{% 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]
{% 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_sanitizer_api/{{ platform }}/cuda_sanitizer_api-{{ platform }}-{{ version }}-archive.{{ extension }}
sha256: 80e23d82bf4a0bb79c564104121467bd0d15f0142e1dc4fff36bb491bc4b3d4f # [linux64]
sha256: 50d66cab58c7b8aa8473b36844669ee2ea7fc85ad92d49473b30214de22c2d25 # [ppc64le]
sha256: c872f56fa4a0ce50f8acf5f154d73d0c7a3290e9fa7ffa0b368fbdae3d1435b9 # [aarch64]
sha256: cdb48694de35aed5576aaf81f2443d12791a346d7a186e2c37e7606e252ef4e4 # [win]

build:
number: 0
skip: true # [osx]
missing_dso_whitelist:
- '$RPATH/libInterceptorInjectionTarget.so' # [linux]
- '$RPATH/InterceptorInjectionTarget.dll' # [win]

requirements:
build:
- {{ compiler("c") }}
- {{ compiler("cxx") }}
adibbley marked this conversation as resolved.
Show resolved Hide resolved
- arm-variant * {{ arm_variant_type }} # [aarch64]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my information, how does this constraint work? Is the * for "any version", and the arm_variant_type selecting a particular build? If so, should it be using the build string to select sbsa? I'm assuming that this is right and that it's revealing some gap in my knowledge.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We set the supported arm_variant_type in conda_build_config.yaml

John can probably explain better, but I would expect this to match any version including the build string

Copy link
Contributor

@vyasr vyasr Jun 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jakirkham could you clarify here? I know that we're using the CBC here but I don't understand exactly what the constraint syntax is going to include/exclude in this case. In particular I want to verify that this is basically using the build string to filter sbsa. I think I'm mostly confused because I thought the build string component would need an equals sign, something like arm-variant=*={{arm_variant_type}} rather than just being space-separated.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the syntax above works in meta.yaml. It is equivalent to = based syntax one would use when calling on the command line

host:
- cuda-version {{ cuda_version }}
run:
- {{ pin_compatible("cuda-version", max_pin="x.x") }}
run_constrained:
- arm-variant * {{ arm_variant_type }} # [aarch64]
adibbley marked this conversation as resolved.
Show resolved Hide resolved

test:
commands:
- test -f $PREFIX/bin/compute-sanitizer # [linux]
adibbley marked this conversation as resolved.
Show resolved Hide resolved
- test -f $PREFIX/compute-sanitizer/compute-sanitizer # [linux]
- if not exist %LIBRARY_PREFIX%\compute-sanitizer\compute-sanitizer.exe exit 1 # [win]
- if not exist %LIBRARY_BIN%\compute-sanitizer exit 1 # [win]
jakirkham marked this conversation as resolved.
Show resolved Hide resolved
- compute-sanitizer --version
jakirkham marked this conversation as resolved.
Show resolved Hide resolved
jakirkham marked this conversation as resolved.
Show resolved Hide resolved

about:
home: https://docs.nvidia.com/compute-sanitizer/SanitizerApiGuide/index.html
license_file: LICENSE
license: LicenseRef-NVIDIA-End-User-License-Agreement
license_url: https://docs.nvidia.com/cuda/eula/index.html
summary: Provides a set of APIs to enable third party tools to write GPU sanitizing tools
description: |
Provides a set of APIs to enable third-party tools to write GPU sanitizing
tools, such as memory and race checkers.
doc_url: https://docs.nvidia.com/compute-sanitizer/SanitizerApiGuide/index.html

extra:
recipe-maintainers:
- adibbley