Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all 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
29 changes: 13 additions & 16 deletions ci/build_conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

set -euo pipefail

conda config --set channel_priority strict

rapids-configure-conda-channels

source rapids-configure-sccache

source rapids-date-string
Expand All @@ -15,23 +11,24 @@ export CMAKE_GENERATOR=Ninja

rapids-print-env

rapids-logger "Begin py build"
# populates `RATTLER_CHANNELS` array and `RATTLER_ARGS` array
source rapids-rattler-channel-string

CUDA_VERSION="$(cat pynvjitlink/CUDA_VERSION)"
export CUDA_VERSION

cat > cuda_compiler_version.yaml << EOF
cuda_compiler_version:
- "${CUDA_VERSION}"
EOF
Comment on lines -20 to -26
Copy link
Member

Choose a reason for hiding this comment

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

This was done to ensure cuda_compiler_version matched the intended CUDA_VERSION set in that file. That is the one canonical place used to CUDA version in this feedstock. It is also used by wheels to install the right Linux CUDA packages when building as well

Additionally setting cuda_compiler_version this way ensured it was considered when generating the package string hash. Maybe rattler-build handles this differently

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can load it from the file directly and make sure it's part of the package string

rapids-logger "Building pynvjitlink"

sccache --zero-stats

rapids-conda-retry build \
conda/recipes/pynvjitlink \
-m cuda_compiler_version.yaml \
;
# --no-build-id allows for caching with `sccache`
# more info is available at
# https://rattler.build/latest/tips_and_tricks/#using-sccache-or-ccache-with-rattler-build
rattler-build build --recipe conda/recipes/pynvjitlink \
"${RATTLER_ARGS[@]}" \
"${RATTLER_CHANNELS[@]}"

sccache --show-adv-stats

# remove build_cache directory to avoid uploading the entire source tree
# tracked in https://github.com/prefix-dev/rattler-build/issues/1424
rm -rf "$RAPIDS_CONDA_BLD_OUTPUT_DIR"/build_cache

rapids-upload-conda-to-s3 python
70 changes: 0 additions & 70 deletions conda/recipes/pynvjitlink/meta.yaml

This file was deleted.

69 changes: 69 additions & 0 deletions conda/recipes/pynvjitlink/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Copyright (c) 2025, NVIDIA CORPORATION.
schema_version: 1

context:
cuda_version: ${{ load_from_file("pynvjitlink/CUDA_VERSION") | trim }}
date_string: '${{ env.get("RAPIDS_DATE_STRING") }}'
head_rev: ${{ git.head_rev(".")[:8] }}
py_version: ${{ env.get("RAPIDS_PY_VERSION") }}
py_buildstring: ${{ py_version | version_to_buildstring }}
version: ${{ load_from_file("pynvjitlink/VERSION") | trim }}

package:
name: pynvjitlink
version: ${{ version }}
source:
path: ../../..

build:
dynamic_linking:
overlinking_behavior: error
string: ${{ cuda_version }}_py${{ py_buildstring }}_${{ date_string }}_${{ head_rev }}_h${{ PKG_HASH }}
script:
content: |
python -m pip install . -vv
secrets:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
env:
CMAKE_C_COMPILER_LAUNCHER: ${{ env.get("CMAKE_C_COMPILER_LAUNCHER") }}
CMAKE_CUDA_COMPILER_LAUNCHER: ${{ env.get("CMAKE_CUDA_COMPILER_LAUNCHER") }}
CMAKE_CXX_COMPILER_LAUNCHER: ${{ env.get("CMAKE_CXX_COMPILER_LAUNCHER") }}
CMAKE_GENERATOR: ${{ env.get("CMAKE_GENERATOR") }}
SCCACHE_BUCKET: ${{ env.get("SCCACHE_BUCKET") }}
SCCACHE_IDLE_TIMEOUT: ${{ env.get("SCCACHE_IDLE_TIMEOUT") }}
SCCACHE_REGION: ${{ env.get("SCCACHE_REGION") }}
SCCACHE_S3_USE_SSL: ${{ env.get("SCCACHE_S3_USE_SSL") }}
SCCACHE_S3_NO_CREDENTIALS: ${{ env.get("SCCACHE_S3_NO_CREDENTIALS") }}
SCCACHE_S3_KEY_PREFIX: pynvjitlink/${{ env.get("RAPIDS_CONDA_ARCH") }}/cuda${{ cuda_major }}

requirements:
build:
- ${{ compiler("c") }}
- ${{ compiler("cxx") }}
- ${{ compiler("cuda") }}
- ${{ stdlib("c") }}
- cmake >=3.24.4,!=3.30.0
Copy link
Contributor

Choose a reason for hiding this comment

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

We bumped this for the rest of RAPIDS. Probably wouldn't hurt to match here since it's just a build-time requirement.

Suggested change
- cmake >=3.24.4,!=3.30.0
- cmake >=3.30.4

- ninja
host:
- cuda-version =${{ cuda_version }}
- libnvjitlink-dev
- libnvjitlink-static
- python =${{ py_version }}
- pip
- rapids-build-backend >=0.3.0,<0.4.0dev0
- scikit-build-core >=0.10.0
run:
- ${{ pin_compatible("cuda-version", lower_bound="x", upper_bound="x.x") }}
- python
- numba >=0.58
ignore_run_exports:
by_name:
- cuda-version
- libnvjitlink

about:
homepage: ${{ load_from_file("pyproject.toml").project.urls.Homepage }}
license: ${{ load_from_file("pyproject.toml").project.license.text }}
summary: ${{ load_from_file("pyproject.toml").project.description }}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ readme = { file = "README.md", content-type = "text/markdown" }
authors = [
{ name = "NVIDIA Corporation" },
]
license = { text = "Apache 2.0" }
license = { text = "Apache-2.0" }
requires-python = ">=3.10"
dependencies = [
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit dependencies.yaml and run `rapids-dependency-file-generator`.
Expand Down