Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
madsbk committed Oct 31, 2024
1 parent 229d2db commit 31bdb15
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 4 deletions.
12 changes: 8 additions & 4 deletions ci/test_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
set -eou pipefail

RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
WHEELHOUSE="${PWD}/dist/"
RAPIDS_PY_WHEEL_NAME="kvikio_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python "${WHEELHOUSE}"

python -m pip install "$(echo ${WHEELHOUSE}/kvikio_${RAPIDS_PY_CUDA_SUFFIX}*.whl)[test]"
# Download the libkvikio and kvikio built in the previous step
RAPIDS_PY_WHEEL_NAME="libkvikio_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp ./dist
RAPIDS_PY_WHEEL_NAME="kvikio_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python ./dist

python -m pytest ./python/kvikio/tests
python -m pip install -v \
"$(echo ./dist/libkvikio_${RAPIDS_PY_CUDA_SUFFIX}*.whl)" \
"$(echo ./dist/kvikio_${RAPIDS_PY_CUDA_SUFFIX}*.whl)[test]"

python -m pytest -v ./python/kvikio/tests
26 changes: 26 additions & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ files:
includes:
- depends_on_cupy
- depends_on_nvcomp
- depends_on_libkvikio
- run
py_rapids_build_libkvikio:
output: pyproject
Expand Down Expand Up @@ -282,6 +283,31 @@ dependencies:
- matrix:
packages:
- nvidia-nvcomp==4.1.0.6
depends_on_libkvikio:
common:
- output_types: conda
packages:
- &libkvikio_unsuffixed libkvikio==24.12.*,>=0.0.0a0
- output_types: requirements
packages:
# pip recognizes the index as a global option for the requirements.txt file
# This index is needed for libkvikio-cu{11,12}.
- --extra-index-url=https://pypi.nvidia.com
- --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple
specific:
- output_types: [requirements, pyproject]
matrices:
- matrix:
cuda: "12.*"
cuda_suffixed: "true"
packages:
- libkvikio-cu12==24.12.*,>=0.0.0a0
- matrix:
cuda: "11.*"
cuda_suffixed: "true"
packages:
- libkvikio-cu11==24.12.*,>=0.0.0a0
- {matrix: null, packages: [*libkvikio_unsuffixed]}
docs:
common:
- output_types: [conda, requirements]
Expand Down
12 changes: 12 additions & 0 deletions python/kvikio/kvikio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,19 @@

# If libkvikio was installed as a wheel, we must request it to load the library symbols.
# Otherwise, we assume that the library was installed in a system path that ld can find.

try:
from nvidia import nvcomp
except ModuleNotFoundError:
print("nvidia.nvcomp: not found!")
pass
else:
del nvcomp

try:
import libkvikio
except ModuleNotFoundError:
print("libkvikio: not found!")
pass
else:
libkvikio.load_library()
Expand All @@ -26,4 +36,6 @@
"CuFile",
"RemoteFile",
"is_remote_file_available",
"libkvikio",
"nvcomp",
]
1 change: 1 addition & 0 deletions python/kvikio/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ license = { text = "Apache 2.0" }
requires-python = ">=3.10"
dependencies = [
"cupy-cuda11x>=12.0.0",
"libkvikio==24.12.*,>=0.0.0a0",
"numcodecs !=0.12.0",
"numpy>=1.23,<3.0a0",
"nvidia-nvcomp==4.1.0.6",
Expand Down

0 comments on commit 31bdb15

Please sign in to comment.