-
Notifications
You must be signed in to change notification settings - Fork 623
refactor: build wheels and conda packages using Python limited API #7758
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
Changes from all commits
42402ef
dc20e44
1174a87
ac7297b
cd549b4
e4b6dd2
8ddbb06
7c2c566
84c1b69
7c77064
8c3b773
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -6,6 +6,22 @@ set -euo pipefail | |||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| package_name=$1 | ||||||||||||||||||||||||||
| package_dir=$2 | ||||||||||||||||||||||||||
| shift 2 | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Parse optional flags | ||||||||||||||||||||||||||
| stable_abi=false | ||||||||||||||||||||||||||
| while [[ $# -gt 0 ]]; do | ||||||||||||||||||||||||||
| case "$1" in | ||||||||||||||||||||||||||
| --stable) | ||||||||||||||||||||||||||
| stable_abi=true | ||||||||||||||||||||||||||
| shift | ||||||||||||||||||||||||||
| ;; | ||||||||||||||||||||||||||
| *) | ||||||||||||||||||||||||||
| echo "Unknown option: $1" >&2 | ||||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||||
| ;; | ||||||||||||||||||||||||||
| esac | ||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| source rapids-configure-sccache | ||||||||||||||||||||||||||
| source rapids-date-string | ||||||||||||||||||||||||||
|
|
@@ -28,6 +44,12 @@ RAPIDS_PIP_WHEEL_ARGS=( | |||||||||||||||||||||||||
| --no-deps | ||||||||||||||||||||||||||
| --disable-pip-version-check | ||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Add py-api setting for stable ABI builds | ||||||||||||||||||||||||||
| if [[ "${stable_abi}" == "true" ]] && [[ -n "${RAPIDS_PY_API:-}" ]]; then | ||||||||||||||||||||||||||
| RAPIDS_PIP_WHEEL_ARGS+=(--config-settings="skbuild.wheel.py-api=${RAPIDS_PY_API}") | ||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||
|
Comment on lines
+48
to
+51
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fail fast if Right now this silently drops the stable-ABI config. Add an explicit error so the build doesn’t produce the wrong wheel. 🔧 Proposed fix-# Add py-api setting for stable ABI builds
-if [[ "${stable_abi}" == "true" ]] && [[ -n "${RAPIDS_PY_API:-}" ]]; then
- RAPIDS_PIP_WHEEL_ARGS+=(--config-settings="skbuild.wheel.py-api=${RAPIDS_PY_API}")
-fi
+# Add py-api setting for stable ABI builds
+if [[ "${stable_abi}" == "true" ]]; then
+ if [[ -z "${RAPIDS_PY_API:-}" ]]; then
+ echo "RAPIDS_PY_API must be set when --stable is used." >&2
+ exit 1
+ fi
+ RAPIDS_PIP_WHEEL_ARGS+=(--config-settings="skbuild.wheel.py-api=${RAPIDS_PY_API}")
+fi📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Only use --build-constraint when build isolation is enabled. | ||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||
| # Passing '--build-constraint' and '--no-build-isolation` together results in an error from 'pip', | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ set -euo pipefail | |
| source rapids-init-pip | ||
|
|
||
| RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")" | ||
| CUML_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuml_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github python) | ||
| CUML_WHEELHOUSE=$(rapids-download-from-github "$(rapids-package-name "wheel_python" cuml --stable --cuda "$RAPIDS_CUDA_VERSION")") | ||
| LIBCUML_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="libcuml_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github cpp) | ||
| RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"} | ||
|
Comment on lines
9
to
12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a GPU availability check before running integration tests. This script runs GPU-backed tests but doesn’t verify GPU presence. Fail early with a clear message to avoid misleading errors. 🔧 Proposed fix LIBCUML_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="libcuml_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github cpp)
RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}
mkdir -p "${RAPIDS_TESTS_DIR}"
+
+rapids-logger "Checking GPU availability"
+if ! nvidia-smi; then
+ rapids-logger "GPU not available; aborting integration tests."
+ exit 1
+fi🤖 Prompt for AI Agents
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can safely assume that the scripts are executed on the right architecture. |
||
| mkdir -p "${RAPIDS_TESTS_DIR}" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.