Skip to content
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

add wheel output #369

Merged
merged 82 commits into from
Jun 19, 2024
Merged

add wheel output #369

merged 82 commits into from
Jun 19, 2024

Conversation

msarahan
Copy link
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
Copy link
Contributor

vyasr commented Apr 17, 2024

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
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
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;

.github/workflows/pr.yaml Show resolved Hide resolved
VERSION Outdated Show resolved Hide resolved
ci/build_wheel_cpp.sh Outdated Show resolved Hide resolved
dependencies.yaml Outdated Show resolved Hide resolved
dependencies.yaml Outdated Show resolved Hide resolved
python/kvikio/kvikio/_version.py Outdated Show resolved Hide resolved
python/kvikio/pyproject.toml Outdated Show resolved Hide resolved
python/libkvikio/.gitattributes Outdated Show resolved Hide resolved
python/libkvikio/CMakeLists.txt Outdated Show resolved Hide resolved
python/libkvikio/pyproject.toml Show resolved Hide resolved
.github/workflows/pr.yaml Show resolved Hide resolved
ci/build_wheel_cpp.sh Outdated Show resolved Hide resolved
python/kvikio/pyproject.toml Outdated Show resolved Hide resolved
@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
Copy link
Contributor

@bdice bdice left a comment

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.

python/.gitattributes Outdated Show resolved Hide resolved
python/libkvikio/libkvikio/__init__.py Outdated Show resolved Hide resolved
Copy link
Member

@jameslamb jameslamb left a comment

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.

ci/build_wheel_cpp.sh Outdated Show resolved Hide resolved
ci/build_wheel_python.sh Outdated Show resolved Hide resolved
ci/build_wheel_python.sh Outdated Show resolved Hide resolved
python/libkvikio/pyproject.toml Outdated Show resolved Hide resolved
python/libkvikio/libkvikio/_version.py Outdated Show resolved Hide resolved
dependencies.yaml Outdated Show resolved Hide resolved
python/kvikio/pyproject.toml Outdated Show resolved Hide resolved
Copy link
Member

@jameslamb jameslamb left a comment

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
Contributor Author

Indeed! Thanks @hcho3 for moving this forward!

ci/build_wheel_cpp.sh Show resolved Hide resolved
ci/build_wheel_python.sh Show resolved Hide resolved
ci/build_wheel_python.sh Outdated Show resolved Hide resolved
python/libkvikio/CMakeLists.txt Outdated Show resolved Hide resolved
@vyasr
Copy link
Contributor

vyasr commented Jun 18, 2024

/merge

@rapids-bot rapids-bot bot merged commit 3cc6678 into rapidsai:branch-24.08 Jun 19, 2024
56 checks passed
@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
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