-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into update-readme
- Loading branch information
Showing
12 changed files
with
213 additions
and
12 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
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 |
---|---|---|
|
@@ -28,6 +28,14 @@ jobs: | |
build_type: branch | ||
script: "ci/build_wheel.sh" | ||
matrix_filter: ${{ needs.compute-matrix.outputs.BUILD_MATRIX }} | ||
build-conda: | ||
needs: | ||
- compute-matrix | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: pull-request | ||
build_script: "ci/build_conda.sh" | ||
matrix_filter: ${{ needs.compute-matrix.outputs.BUILD_MATRIX }} | ||
publish-wheels: | ||
needs: | ||
- build-wheels | ||
|
@@ -39,3 +47,13 @@ jobs: | |
sha: ${{ inputs.sha }} | ||
date: ${{ inputs.date }} | ||
package-name: pynvjitlink | ||
publish-conda: | ||
needs: | ||
- build-conda | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: ${{ inputs.build_type || 'branch' }} | ||
branch: ${{ inputs.branch }} | ||
date: ${{ inputs.date }} | ||
sha: ${{ inputs.sha }} |
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 |
---|---|---|
|
@@ -15,6 +15,8 @@ jobs: | |
needs: | ||
- checks | ||
- compute-matrix | ||
- build-conda | ||
- test-conda | ||
- build-wheels | ||
- test-wheels | ||
secrets: inherit | ||
|
@@ -34,6 +36,23 @@ jobs: | |
- name: Compute Build Matrix | ||
id: compute-matrix | ||
uses: ./.github/actions/compute-matrix | ||
build-conda: | ||
needs: | ||
- compute-matrix | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: pull-request | ||
build_script: "ci/build_conda.sh" | ||
matrix_filter: ${{ needs.compute-matrix.outputs.BUILD_MATRIX }} | ||
test-conda: | ||
needs: | ||
- build-conda | ||
- compute-matrix | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: pull-request | ||
test_script: "ci/test_conda.sh" | ||
matrix_filter: ${{ needs.compute-matrix.outputs.TEST_MATRIX }} | ||
build-wheels: | ||
needs: | ||
- compute-matrix | ||
|
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
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,16 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2024, NVIDIA CORPORATION | ||
|
||
set -euo pipefail | ||
|
||
source rapids-env-update | ||
|
||
export CMAKE_GENERATOR=Ninja | ||
|
||
rapids-print-env | ||
|
||
rapids-logger "Begin py build" | ||
|
||
rapids-conda-retry mambabuild conda/recipes/pynvjitlink | ||
|
||
rapids-upload-conda-to-s3 python |
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
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,54 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2024, NVIDIA CORPORATION | ||
|
||
set -euo pipefail | ||
|
||
. /opt/conda/etc/profile.d/conda.sh | ||
|
||
rapids-logger "Generate testing dependencies" | ||
# TODO: Replace with rapids-dependency-file-generator | ||
rapids-mamba-retry create -n test \ | ||
c-compiler \ | ||
cxx-compiler \ | ||
cuda-nvcc \ | ||
cuda-version=${RAPIDS_CUDA_VERSION%.*} \ | ||
"numba>=0.57" \ | ||
make \ | ||
pytest \ | ||
python=${RAPIDS_PY_VERSION} | ||
|
||
# Temporarily allow unbound variables for conda activation. | ||
set +u | ||
conda activate test | ||
set -u | ||
|
||
PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) | ||
RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}/ | ||
mkdir -p "${RAPIDS_TESTS_DIR}" | ||
|
||
rapids-print-env | ||
|
||
rapids-mamba-retry install \ | ||
--channel "${PYTHON_CHANNEL}" \ | ||
pynvjitlink | ||
|
||
rapids-logger "Build Tests" | ||
pushd test_binary_generation | ||
make | ||
popd | ||
|
||
rapids-logger "Check GPU usage" | ||
nvidia-smi | ||
|
||
EXITCODE=0 | ||
trap "EXITCODE=1" ERR | ||
set +e | ||
|
||
rapids-logger "pytest pynvjitlink" | ||
pytest \ | ||
--cache-clear \ | ||
--junitxml="${RAPIDS_TESTS_DIR}/junit-pynvjitlink.xml" \ | ||
-v | ||
|
||
rapids-logger "Test script exiting with value: $EXITCODE" | ||
exit ${EXITCODE} |
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
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,11 @@ | ||
c_compiler_version: | ||
- 11 | ||
|
||
cxx_compiler_version: | ||
- 11 | ||
|
||
cuda_compiler: | ||
- cuda-nvcc | ||
|
||
cuda_compiler_version: | ||
- 12.2 |
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,56 @@ | ||
# Copyright (c) 2018-2024, NVIDIA CORPORATION. | ||
|
||
{% set data = load_file_data("pyproject.toml") %} | ||
{% set project_data = data.get("project") %} | ||
{% set project_urls = project_data["urls"] %} | ||
|
||
{% if cuda_compiler_version %} | ||
{% set cuda_major = cuda_compiler_version.split(".")[0]|int %} | ||
{% set cuda_minor = cuda_compiler_version.split(".")[1]|int %} | ||
{% else %} | ||
{% set cuda_major = 0 %} | ||
{% set cuda_minor = 0 %} | ||
{% endif %} | ||
|
||
package: | ||
name: pynvjitlink | ||
version: {{ project_data["version"] }} | ||
|
||
source: | ||
path: ../../.. | ||
|
||
build: | ||
script: | ||
- {{ PYTHON }} -m pip install . -vv | ||
ignore_run_exports_from: | ||
- libnvjitlink-dev | ||
|
||
requirements: | ||
build: | ||
- {{ compiler('c') }} | ||
- {{ compiler('cxx') }} | ||
- {{ compiler('cuda') }} | ||
- cmake >=3.26.4 | ||
- ninja | ||
- sysroot_{{ target_platform }} 2.17 | ||
host: | ||
- libnvjitlink-dev | ||
- libnvjitlink-static | ||
- cuda-version {{ cuda_compiler_version }} | ||
- python | ||
- pip | ||
- scikit-build-core | ||
run: | ||
- python | ||
- numba >=0.57 | ||
- {{ pin_compatible('cuda-version', min_pin='x', upper_bound=(cuda_major ~ "." ~ (cuda_minor + 1))) }} | ||
|
||
about: | ||
home: {{ project_urls["Homepage"] }} | ||
dev_url: {{ project_urls["Repository"] }} | ||
doc_url: {{ project_urls["Documentation"] }} | ||
license: {{ project_data["license"]["text"] }} | ||
license_family: Apache | ||
license_file: LICENSE | ||
license_url: {{ project_urls["License"] }} | ||
summary: nvJitLink Python binding |
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
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