-
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 conda-recipe
- Loading branch information
Showing
39 changed files
with
658 additions
and
383 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
#python code owners | ||
nvjitlink/ @rapidsai/nvjitlink-python-codeowners | ||
pynvjitlink/ @rapidsai/pynvjitlink-write | ||
|
||
#cmake code owners | ||
**/CMakeLists.txt @rapidsai/nvjitlink-cmake-codeowners | ||
**/cmake/ @rapidsai/nvjitlink-cmake-codeowners | ||
**/CMakeLists.txt @rapidsai/pynvjitlink-write | ||
**/cmake/ @rapidsai/pynvjitlink-write | ||
|
||
#build/ops code owners | ||
.github/ @rapidsai/ops-codeowners | ||
ci/ @rapidsai/ops-codeowners | ||
conda/ @rapidsai/ops-codeowners | ||
**/Dockerfile @rapidsai/ops-codeowners | ||
**/.dockerignore @rapidsai/ops-codeowners | ||
docker/ @rapidsai/ops-codeowners | ||
.github/ @rapidsai/ops-codeowners |
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
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
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,44 @@ | ||
name: Compute matrix | ||
|
||
outputs: | ||
BUILD_MATRIX: | ||
value: ${{ steps.compute-matrix.outputs.BUILD_MATRIX }} | ||
TEST_MATRIX: | ||
value: ${{ steps.compute-matrix.outputs.TEST_MATRIX }} | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Compute matrix | ||
id: compute-matrix | ||
shell: bash | ||
run: | | ||
set -eo pipefail | ||
export BUILD_MATRIX=" | ||
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.9', LINUX_VER: 'centos7' } | ||
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.10', LINUX_VER: 'centos7' } | ||
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.11', LINUX_VER: 'centos7' } | ||
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.9', LINUX_VER: 'rockylinux8' } | ||
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.10', LINUX_VER: 'rockylinux8' } | ||
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.11', LINUX_VER: 'rockylinux8' } | ||
" | ||
export TEST_MATRIX=" | ||
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.9', LINUX_VER: 'ubuntu18.04', gpu: 'v100', driver: 'latest' } | ||
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.10', LINUX_VER: 'ubuntu18.04', gpu: 'v100', driver: 'latest' } | ||
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.11', LINUX_VER: 'ubuntu18.04', gpu: 'v100', driver: 'latest' } | ||
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.9', LINUX_VER: 'ubuntu20.04', gpu: 'a100', driver: 'latest' } | ||
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.10', LINUX_VER: 'ubuntu20.04', gpu: 'a100', driver: 'latest' } | ||
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.11', LINUX_VER: 'ubuntu20.04', gpu: 'a100', driver: 'latest' } | ||
" | ||
echo "BUILD_MATRIX=$( | ||
yq -n -o json 'env(BUILD_MATRIX)' | \ | ||
jq -c '.' \ | ||
)" | tee --append "${GITHUB_OUTPUT}" | ||
echo "TEST_MATRIX=$( | ||
yq -n -o json 'env(TEST_MATRIX)' | \ | ||
jq -c '.' \ | ||
)" | tee --append "${GITHUB_OUTPUT}" |
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,6 @@ | ||
# Copyright (c) 2023, NVIDIA CORPORATION. | ||
|
||
# Configuration file for `copy-pr-bot` GitHub App | ||
# https://docs.gha-runners.nvidia.com/apps/copy-pr-bot/ | ||
|
||
enabled: true |
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,41 @@ | ||
# Copyright (c) 2023, NVIDIA CORPORATION. | ||
name: build | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-release | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
compute-matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
BUILD_MATRIX: ${{ steps.compute-matrix.outputs.BUILD_MATRIX }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Compute Build Matrix | ||
id: compute-matrix | ||
uses: ./.github/actions/compute-matrix | ||
build-wheels: | ||
needs: | ||
- compute-matrix | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: branch | ||
script: "ci/build_wheel.sh" | ||
matrix_filter: ${{ needs.compute-matrix.outputs.BUILD_MATRIX }} | ||
publish-wheels: | ||
needs: | ||
- build-wheels | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: ${{ inputs.build_type || 'branch' }} | ||
branch: ${{ inputs.branch }} | ||
sha: ${{ inputs.sha }} | ||
date: ${{ inputs.date }} | ||
package-name: pynvjitlink |
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,53 @@ | ||
# Copyright (c) 2023, NVIDIA CORPORATION. | ||
name: pr | ||
|
||
on: | ||
push: | ||
branches: | ||
- "pull-request/[0-9]+" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
pr-builder: | ||
needs: | ||
- checks | ||
- compute-matrix | ||
- build-wheels | ||
- test-wheels | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
checks: | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
enable_check_generated_files: false | ||
compute-matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
BUILD_MATRIX: ${{ steps.compute-matrix.outputs.BUILD_MATRIX }} | ||
TEST_MATRIX: ${{ steps.compute-matrix.outputs.TEST_MATRIX }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Compute Build Matrix | ||
id: compute-matrix | ||
uses: ./.github/actions/compute-matrix | ||
build-wheels: | ||
needs: | ||
- compute-matrix | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: pull-request | ||
script: "ci/build_wheel.sh" | ||
matrix_filter: ${{ needs.compute-matrix.outputs.BUILD_MATRIX }} | ||
test-wheels: | ||
needs: | ||
- build-wheels | ||
- compute-matrix | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: pull-request | ||
script: "ci/test_wheel.sh" | ||
matrix_filter: ${{ needs.compute-matrix.outputs.TEST_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 |
---|---|---|
@@ -1,9 +1,15 @@ | ||
repos: | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 3.7.8 | ||
hooks: | ||
- id: flake8 | ||
- repo: https://github.com/pre-commit/mirrors-clang-format | ||
rev: v11.1.0 | ||
hooks: | ||
- id: clang-format | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- repo: https://github.com/pre-commit/mirrors-clang-format | ||
rev: v16.0.6 | ||
hooks: | ||
- id: clang-format | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.1.6 | ||
hooks: | ||
- id: ruff | ||
- id: ruff-format |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# nvjitlink 0.0.0 (DD Mon YYYY) | ||
# pynvjitlink 0.0.0 (DD Mon YYYY) | ||
|
||
## New Features | ||
|
||
|
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 |
---|---|---|
@@ -1,24 +1,22 @@ | ||
cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR) | ||
|
||
project( | ||
nvjitlink | ||
VERSION 0.1.0 | ||
LANGUAGES CXX | ||
pynvjitlink | ||
VERSION 0.1.6 | ||
LANGUAGES CXX CUDA | ||
) | ||
|
||
find_package(Python COMPONENTS Interpreter Development REQUIRED) | ||
|
||
Python_add_library(_nvjitlinklib MODULE nvjitlink/_nvjitlinklib.cpp WITH_SOABI) | ||
Python_add_library(_nvjitlinklib MODULE pynvjitlink/_nvjitlinklib.cpp WITH_SOABI) | ||
|
||
find_package( | ||
CUDAToolkit 12.0 REQUIRED | ||
CUDAToolkit 12.3 REQUIRED | ||
) | ||
target_link_libraries(_nvjitlinklib PRIVATE CUDA::nvJitLink_static CUDA::nvptxcompiler_static) | ||
|
||
set(opt_option -O0) | ||
if(WIN32) | ||
set(opt_option -/Od) | ||
endif() | ||
target_compile_options(_nvjitlinklib PRIVATE -Werror -Wall ${opt_option}) | ||
target_compile_options(_nvjitlinklib PRIVATE -Werror -Wall) | ||
|
||
install(TARGETS _nvjitlinklib LIBRARY DESTINATION nvjitlink) | ||
target_compile_features(_nvjitlinklib PRIVATE cxx_std_11) | ||
|
||
install(TARGETS _nvjitlinklib LIBRARY DESTINATION pynvjitlink) |
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,14 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2023-2024, NVIDIA CORPORATION | ||
|
||
set -euo pipefail | ||
|
||
rapids-logger "Install CUDA Toolkit" | ||
source "$(dirname "$0")/install_latest_cuda_toolkit.sh" | ||
|
||
rapids-logger "Build wheel" | ||
mkdir -p ./wheel-build | ||
pip wheel . --wheel-dir=./wheel-build -vvv | ||
|
||
rapids-logger "Upload Wheel" | ||
RAPIDS_PY_WHEEL_NAME="pynvjitlink-cu12" rapids-upload-wheels-to-s3 ./wheel-build |
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,9 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2023, NVIDIA CORPORATION | ||
|
||
set -euo pipefail | ||
|
||
pip install pre-commit | ||
|
||
# Run pre-commit checks | ||
pre-commit run --all-files --show-diff-on-failure |
Oops, something went wrong.