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 libcudf manifest for wheel build in devcontainer #271

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

msarahan
Copy link
Contributor

I'm not at all sure that I've done this correctly. This is intended to support local development with a devcontainer for the work in rapidsai/cudf#15483

Copy link
Collaborator

@trxcllnt trxcllnt left a comment

Choose a reason for hiding this comment

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

The depends list in Python is for defining the source-built C++ libs that the Python project needs in order to build. Yeah, it could definitely be named better 😅.

@vyasr
Copy link
Contributor

vyasr commented Apr 19, 2024

Before we merge this we should make sure that we properly handle this use case in all the packages. We're going to have to adapt both the CMake and the python code in the C++ wheels just a little bit (discussed with Paul earlier today).

@jameslamb jameslamb changed the base branch from branch-24.06 to branch-24.10 August 22, 2024 19:56
@jameslamb jameslamb requested a review from a team as a code owner August 22, 2024 19:56
@jameslamb jameslamb requested review from raydouglass and removed request for a team August 22, 2024 19:56
@jameslamb
Copy link
Member

I've revived this now that rapidsai/cudf#15483 is just about ready to be merged.

We're going to have to adapt both the CMake and the python code in the C++ wheels just a little bit (discussed with Paul earlier today).

@vyasr could you share the details for this statement? What else needs to be done?

@jameslamb
Copy link
Member

jameslamb commented Aug 23, 2024

@vyasr could you share the details for this statement? What else needs to be done?

We talked about this offline. Summarizing here.

In wheel builds in cudf CI, compilation of libcudf.so happens in the libcudf wheel build. That wheel contains libcudf.so, and libraries that need it (cudf and pylibcudf) call libcudf.load_library() to dlopen it.

Here in devcontainers, libcudf.so is compiled outside of any wheel-building by just directly invoking cmake. The libcudf wheel won't include it, and so libcudf.load_library() will not load it. That's fine... as long as libcudf.so is installed in a location that the linker can find when something in cudf / pylibcudf requires it.

I tested this and it looks like it's working as expected. Rebuilt the CUDA 12.0 pip devcontainer from this branch, with only cudf (from rapidsai/cudf#15483) mounted in.

Ran the following:

# build libcudf.so + all the Python wheels
build-cudf -j

# test that 'libcudf' is importable
python -c "import libcudf; l = libcudf.load_library(); print(l)"
# None

# test that 'pylibcudf' and 'cudf' are importable
python -c "import pylibcudf;import cudf"

# test that cudf actually works
./cudf/ci/run_cudf_pytests.sh

Saw all the expected things:

  • libcudf.so was only built once, and all the wheel builds found it without rebuilding it
  • libcudf, cudf, and pylibcudf wheels were all built successfully
  • libcudf, cudf, and pylibcudf were all importable
  • the cudf tests all run successfully

So I think this can be merged, and should be prior to rapidsai/cudf#15483 being merged.

@AyodeAwe AyodeAwe merged commit 5b24f77 into rapidsai:branch-24.10 Aug 23, 2024
22 of 26 checks passed
@vyasr
Copy link
Contributor

vyasr commented Aug 23, 2024

Thanks for documenting James.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants