Skip to content

add wheel output - #369

Merged
rapids-bot[bot] merged 82 commits into
rapidsai:branch-24.08from
msarahan:wheel-build
Jun 19, 2024
Merged

rapids-bot[bot] merged 82 commits into
rapidsai:branch-24.08from
msarahan:wheel-build

Conversation

@msarahan

Copy link
Copy Markdown
Contributor

closes #250

I'm not sure if it makes sense to split the wheel into one dedicated wheel for the shared library, and another for the python wrapper. That's what @vyasr has been doing on other libraries, like rapidsai/rmm#1529. If it makes sense here, I'll add that.

@msarahan msarahan added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Apr 17, 2024
@vyasr

vyasr commented Apr 17, 2024

Copy link
Copy Markdown
Contributor

Yeah for consistency with the rest of RAPIDS using separate C++ and Python wheels is the way to go. We'll be able to leverage that by using the libkvikio wheel during the libcudf wheel build since libcudf needs libkvikio headers. You can see that in your cudf PR those are currently being bundled into the libcudf wheel which is not ideal. Using the libkvikio wheel from this PR instead will fix that.

@msarahan

Copy link
Copy Markdown
Contributor Author

Error in wheel build:

2024-04-23T14:25:13.7290506Z   CMake Debug Log at /tmp/pip-build-env-c44ywnqk/overlay/lib/python3.11/site-packages/cmake/data/share/cmake-3.29/Modules/FindCUDAToolkit.cmake:1093 (find_library):
2024-04-23T14:25:13.7290723Z     find_library called with the following settings:
2024-04-23T14:25:13.7291226Z 
2024-04-23T14:25:13.7292425Z       VAR: CUDA_nvgraph_LIBRARY
2024-04-23T14:25:13.7293410Z       NAMES: "nvgraph"
2024-04-23T14:25:13.7294445Z       Documentation: Path to a library.
2024-04-23T14:25:13.7295560Z       Framework
2024-04-23T14:25:13.7296475Z         Only Search Frameworks: 0
2024-04-23T14:25:13.7297410Z         Search Frameworks Last: 0
2024-04-23T14:25:13.7298380Z         Search Frameworks First: 0
2024-04-23T14:25:13.7299296Z       AppBundle
2024-04-23T14:25:13.7300297Z         Only Search AppBundle: 0
2024-04-23T14:25:13.7301260Z         Search AppBundle Last: 0
2024-04-23T14:25:13.7302243Z         Search AppBundle First: 0
2024-04-23T14:25:13.7303230Z       CMAKE_FIND_USE_CMAKE_PATH: 1
2024-04-23T14:25:13.7304297Z       CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1
2024-04-23T14:25:13.7305256Z       CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 1
2024-04-23T14:25:13.7306202Z       CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1
2024-04-23T14:25:13.7307195Z       CMAKE_FIND_USE_INSTALL_PREFIX: 1
2024-04-23T14:25:13.7308173Z 
2024-04-23T14:25:13.7309466Z     find_library considered the following locations:
2024-04-23T14:25:13.7310161Z 
2024-04-23T14:25:13.7311636Z       /pyenv/versions/3.11.9/lib/python3.11/site-packages/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7312856Z       /tmp/pip-build-env-c44ywnqk/overlay/lib/python3.11/site-packages/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7313631Z       /usr/local/cuda-11.8/targets/sbsa-linux/lib/stubs/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7314756Z       /usr/local/cuda-11.8/targets/sbsa-linux/lib/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7315623Z       /usr/local/cuda/targets/sbsa-linux/lib/stubs/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7316798Z       /usr/local/cuda/targets/sbsa-linux/lib/stubs/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7317635Z       /usr/local/cuda/targets/sbsa-linux/lib/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7318804Z       /tmp/pip-build-env-c44ywnqk/overlay/bin/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7319505Z       /pyenv/versions/3.11.9/bin/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7320537Z       /pyenv/libexec/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7321656Z       /pyenv/plugins/python-build/bin/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7322702Z       /pyenv/plugins/pyenv-virtualenv/bin/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7323693Z       /pyenv/plugins/pyenv-update/bin/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7324697Z       /pyenv/plugins/pyenv-doctor/bin/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7325540Z       /usr/share/Modules/bin/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7326723Z       /opt/rh/gcc-toolset-11/root/usr/bin/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7327383Z       /pyenv/bin/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7328500Z       /pyenv/shims/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7329497Z       /usr/local/cuda/bin/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7330462Z       /usr/local/sbin/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7331416Z       /usr/local/bin/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7332371Z       /usr/sbin/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7333400Z       /usr/bin/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7334331Z       /sbin/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7335402Z       /bin/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7336379Z       /usr/local/lib64/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7337336Z       /usr/local/lib/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7338301Z       /usr/local/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7339339Z       /usr/lib64/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7340462Z       /usr/lib/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7341307Z       /usr/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7342246Z       /lib64/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7343187Z       /lib/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7344763Z       /tmp/pip-build-env-c44ywnqk/overlay/lib/python3.11/site-packages/cmake/data/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7345173Z       /opt/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7346285Z       /usr/lib64/X11/libnvgraph(\.so|\.a)
2024-04-23T14:25:13.7347077Z 
2024-04-23T14:25:13.7348338Z     The item was not found.

msarahan added a commit to msarahan/devcontainers that referenced this pull request Apr 30, 2024
rapidsai/kvikio#369 moves the python wheel code one level deeper so that we add support for a dedicated libkvikio wheel. This adjustment needs to be accounted for here. Confused PR run without this change: https://github.com/rapidsai/kvikio/actions/runs/8900188332/job/24441209009#step:7:1446
@trxcllnt

Copy link
Copy Markdown
Contributor

Feel free to add this to the devcontainer build job to test the path adjustment in the devcontainers before merging:

      build_command: |
        sudo yq -i '.repos[2].python[0].sub_dir = "python/kvikio"' /opt/rapids-build-utils/manifest.yaml;
        rapids-generate-scripts;

Comment thread .github/workflows/pr.yaml
Comment thread VERSION Outdated
Comment thread ci/build_wheel_cpp.sh Outdated
Comment thread dependencies.yaml Outdated
Comment thread dependencies.yaml Outdated
Comment thread python/kvikio/kvikio/_version.py Outdated
Comment thread python/kvikio/pyproject.toml Outdated
Comment thread python/libkvikio/.gitattributes Outdated
Comment thread python/libkvikio/CMakeLists.txt Outdated
Comment thread python/libkvikio/pyproject.toml
Comment thread .github/workflows/pr.yaml
Comment thread ci/build_wheel_cpp.sh Outdated
Comment thread python/kvikio/pyproject.toml Outdated
@msarahan
msarahan marked this pull request as ready for review June 18, 2024 17:55
@msarahan
msarahan requested review from a team as code owners June 18, 2024 17:55

@bdice bdice left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No reservations from me. If it’s working as expected, the diff looks good to me.

Comment thread python/.gitattributes
Comment thread python/libkvikio/libkvikio/__init__.py Outdated

@jameslamb jameslamb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok I'm still reviewing, but publishing this now so you can start making adjustments to some of the rapids-build-backend stuff.

Comment thread ci/build_wheel_cpp.sh Outdated
Comment thread ci/build_wheel_python.sh Outdated
Comment thread ci/build_wheel_python.sh Outdated
Comment thread python/libkvikio/pyproject.toml Outdated
Comment thread python/libkvikio/libkvikio/_version.py Outdated
Comment thread dependencies.yaml Outdated
Comment thread python/kvikio/pyproject.toml Outdated
msarahan and others added 2 commits June 18, 2024 14:31

@jameslamb jameslamb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, thanks for all your work!

(and to @hcho3 for helping move it forward too)

@msarahan

Copy link
Copy Markdown
Contributor Author

Indeed! Thanks @hcho3 for moving this forward!

Comment thread ci/build_wheel_cpp.sh
Comment thread ci/build_wheel_python.sh Outdated
Comment thread ci/build_wheel_python.sh Outdated
Comment thread python/libkvikio/CMakeLists.txt Outdated
@vyasr

vyasr commented Jun 18, 2024

Copy link
Copy Markdown
Contributor

/merge

@rapids-bot
rapids-bot Bot merged commit 3cc6678 into rapidsai:branch-24.08 Jun 19, 2024
@msarahan
msarahan deleted the wheel-build branch June 19, 2024 02:38
rapids-bot Bot pushed a commit to rapidsai/dask-cuda that referenced this pull request Jun 24, 2024
Contributes to rapidsai/build-planning#31

Removes `.gitattributes` file.

That was added in #88 for use with `versioneer`. Per the `git` docs ([link](https://git-scm.com/docs/gitattributes#_export_subst)), setting the attribute `export-subst` on a file via a `.gitattributes` tell `git` to replace placeholders in the file with some `git` information.

This is no longer done in `_version.py` files in this project, and this project no longer uses `versioneer`. `rapids-build-backend` handles storing git commit information in the published packages.

## Notes for Reviewers

Created based on this conversation: rapidsai/kvikio#369 (comment)

Authors:
  - James Lamb (https://github.com/jameslamb)

Approvers:
  - Peter Andreas Entschev (https://github.com/pentschev)
  - Mike Sarahan (https://github.com/msarahan)

URL: #1350
vyasr added a commit to rapidsai/devcontainers that referenced this pull request Jun 24, 2024
* Account for kvikio python folder nesting

rapidsai/kvikio#369 moves the python wheel code one level deeper so that we add support for a dedicated libkvikio wheel. This adjustment needs to be accounted for here. Confused PR run without this change: https://github.com/rapidsai/kvikio/actions/runs/8900188332/job/24441209009#step:7:1446

* Update features/src/rapids-build-utils/opt/rapids-build-utils/manifest.yaml

* add libkvikio python build; bump feature version

* add CMake args back

* reorder libkvikio to build before kvikio, bump feature version

---------

Co-authored-by: Vyas Ramasubramani <vyas.ramasubramani@gmail.com>
Co-authored-by: Vyas Ramasubramani <vyasr@nvidia.com>
Co-authored-by: ptaylor <paul.e.taylor@me.com>
Co-authored-by: Paul Taylor <178183+trxcllnt@users.noreply.github.com>
rapids-bot Bot pushed a commit that referenced this pull request Jul 3, 2024
Contributes to rapidsai/build-planning#69.

Proposes a stricter pattern for passing a `libkvikio` wheel from the `wheel-build-cpp` job that produced it into the `wheel-build-python` job wanting to use it (as a build dependency of `kvikio`). This change improves the likelihood that issues with the `libkivkio` wheels will be caught in CI.

## Notes for Reviewers

See rapidsai/rmm#1586 and rapidsai/build-planning#69 (comment) for details on how I tested this approach.

I didn't propose this on #369 because I hadn't quite finished testing the approach yet. But I do think we should do this for all of the C++ wheels (rapidsai/build-planning#33).

Authors:
  - James Lamb (https://github.com/jameslamb)

Approvers:
  - Mike Sarahan (https://github.com/msarahan)

URL: #397
vyasr added a commit to rapidsai/devcontainers that referenced this pull request Sep 23, 2024
There have been a number of changes to RAPIDS builds over the course of
this release and not all changes were fully propagated to the
devcontainers repo. This repo addresses the following:
- As of rapidsai/kvikio#369, kvikio produces
wheels, and rapidsai/kvikio#439 contains
critical fixes that allow the kvikio Python wheel to use the C++
libkvikio wheel. In RAPIDS Python builds we have consistently removed
support for the Python build triggering the C++ build as we have created
C++ wheels since in both conda and pip environments we now expect the
library to be found and we do not need to automatically support the more
esoteric use case of someone turning off build isolation but not having
the C++ library available (devs can handle this case themselves if they
wish). As a result, once rapidsai/kvikio#466 is
merged, the `FIND_KVIKIO_CPP` variable will be completely superfluous
and we can remove that here.
- As of NVIDIA/cudf#16640 libcudf no longer
links to libarrow and `USE_LIBARROW_FROM_PYARROW` is no longer used.
- The libcudf and libcuspatial Python package builds in the devcontainer
should (like all other Python packages) omit the CUDA version suffix.
For that, they need to use the `rapids_build_backend_args`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding wheels for KvikIO

8 participants