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

cuCIM: Build CUDA 12 packages #572

Merged
merged 47 commits into from
Jul 25, 2023
Merged

Conversation

jakirkham
Copy link
Member

@jakirkham jakirkham commented Jun 10, 2023

Fixes #513
Fixes #582

Start building cuCIM for CUDA 12.

@jakirkham jakirkham added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Jun 28, 2023
conda/environments/all_cuda-120_arch-x86_64.yaml Outdated Show resolved Hide resolved
conda/recipes/cucim/meta.yaml Outdated Show resolved Hide resolved
conda/recipes/libcucim/meta.yaml Outdated Show resolved Hide resolved
dependencies.yaml Outdated Show resolved Hide resolved
dependencies.yaml Outdated Show resolved Hide resolved
@jakirkham jakirkham requested a review from bdice June 28, 2023 22:35
@jakirkham
Copy link
Member Author

Thanks Bradley! 🙏

Have pushed some changes to address those comments above. Please take another look when you have a moment 🙂

.github/workflows/build.yaml Outdated Show resolved Hide resolved
conda/recipes/cucim/meta.yaml Outdated Show resolved Hide resolved
conda/recipes/cucim/meta.yaml Outdated Show resolved Hide resolved
conda/recipes/libcucim/meta.yaml Outdated Show resolved Hide resolved
dependencies.yaml Outdated Show resolved Hide resolved
@bdice
Copy link
Contributor

bdice commented Jun 29, 2023

This is getting close! If someone can fix the Python tests, that'd be helpful.

Co-authored-by: Bradley Dice <bdice@bradleydice.com>
jakirkham and others added 2 commits June 29, 2023 12:56
Co-authored-by: Bradley Dice <bdice@bradleydice.com>
Co-authored-by: Bradley Dice <bdice@bradleydice.com>
@jakirkham jakirkham requested a review from bdice June 29, 2023 19:58
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.

One question, otherwise LGTM!

conda/recipes/cucim/meta.yaml Outdated Show resolved Hide resolved
@bdice
Copy link
Contributor

bdice commented Jun 29, 2023

@jakirkham I think this draft can be opened for broader review. Please remove the [WIP] from the title too.

@jakirkham jakirkham marked this pull request as ready for review June 29, 2023 20:24
@jakirkham jakirkham requested a review from a team as a code owner June 29, 2023 20:24
@jakirkham jakirkham changed the title [WIP] cuCIM: Build CUDA 12 packages cuCIM: Build CUDA 12 packages Jun 29, 2023
@jakirkham
Copy link
Member Author

Just noting that even though CI passes, there is still an issue in the CUDA 12.0 case as noted in comment ( #572 (review) ). So this isn't really working yet

As `branch-23.08` now contains CUDA 12 support, switch back to using
that GHA in the cuCIM PR.
This is unset & unused as best we can tell. So drop this `echo` line.
@@ -4,7 +4,6 @@ CUCIM_BUILD_TYPE=${CUCIM_BUILD_TYPE:-release}

echo "CC : ${CC}"
echo "CXX : ${CXX}"
echo "CUDA : ${CUDA}"
Copy link
Member Author

Choose a reason for hiding this comment

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

Dropping this line as it is unset & unused based on our prior discussion. This resolves issue ( #582 )

@jakirkham
Copy link
Member Author

Looks like we are now picking up the CUDA 12 CTK packages on CI 🥳

GDS client library is available at '$PREFIX/targets/x86_64-linux/include/cufile.h' and '$PREFIX/targets/x86_64-linux/lib/libcufile.so'
$ mkdir -p $SRC_DIR/temp/cuda/include $SRC_DIR/temp/cuda/lib64
$ cp -Pf $PREFIX/targets/x86_64-linux/include/cufile.h $SRC_DIR/temp/cuda/include/
$ cp -Pf $PREFIX/targets/x86_64-linux/lib/libcufile.so $PREFIX/targets/x86_64-linux/lib/libcufile.so.0 $PREFIX/targets/x86_64-linux/lib/libcufile.so.1.5.0 $PREFIX/targets/x86_64-linux/lib/libcufile_rdma.so $PREFIX/targets/x86_64-linux/lib/libcufile_rdma.so.1 $PREFIX/targets/x86_64-linux/lib/libcufile_rdma.so.1.5.0 $SRC_DIR/temp/cuda/lib64/
nvJPEG client library is available at '$PREFIX/targets/x86_64-linux/include/nvjpeg.h' and '$PREFIX/targets/x86_64-linux/lib/libnvjpeg_static.a'
$ mkdir -p $SRC_DIR/temp/cuda/include $SRC_DIR/temp/cuda/lib64
$ cp -Pf $PREFIX/targets/x86_64-linux/include/nvjpeg.h $SRC_DIR/temp/cuda/include/
$ cp -Pf $PREFIX/targets/x86_64-linux/lib/libnvjpeg.so $PREFIX/targets/x86_64-linux/lib/libnvjpeg.so.12 $PREFIX/targets/x86_64-linux/lib/libnvjpeg.so.12.0.0.28 $PREFIX/targets/x86_64-linux/lib/libnvjpeg_static.a $SRC_DIR/temp/cuda/lib64/

Copy link
Contributor

@grlee77 grlee77 left a comment

Choose a reason for hiding this comment

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

Thanks, it looks good to me.

I guess the section we discussed under

    if [ ! -f ${cufile_include}/cufile.h ]; then
        c_echo_err Y "GDS client library is not available! Downloading the redistributable package to get cufile.h and libraries."

where it downloads x86_64 GDS can be updated in a follow up PR to not download if on aarch64?

@jakirkham
Copy link
Member Author

Yeah it sounded like from our discussion earlier that @gigony was picking that piece up in a new PR

Copy link
Contributor

@vyasr vyasr left a comment

Choose a reason for hiding this comment

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

A few small questions and suggestions, then we should be good to go.

conda/recipes/cucim/meta.yaml Outdated Show resolved Hide resolved
conda/recipes/libcucim/meta.yaml Outdated Show resolved Hide resolved
Comment on lines +69 to +74
- cuda-version=11.8
- nvcc_linux-64=11.8
- libcufile=1.4.0.31
- libcufile-dev=1.4.0.31
- libnvjpeg=11.6.0.55
- libnvjpeg-dev=11.6.0.55
Copy link
Contributor

Choose a reason for hiding this comment

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

Not an absolute must, but it would be nice to split this into a separate matrix entry for all cuda 11.8 (x86 and arm) since half of these are common.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah actually this doesn't work. dfg doesn't (yet) support multiple matches with different subsets of the matrix. Never mind!

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh interesting! Ok should we file an issue here to follow up?

Copy link
Member Author

Choose a reason for hiding this comment

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

Filed as issue ( #585 ). Please add more details there

run Outdated Show resolved Hide resolved
run Outdated Show resolved Hide resolved
jakirkham and others added 4 commits July 25, 2023 14:28
Co-authored-by: Vyas Ramasubramani <vyas.ramasubramani@gmail.com>
cuCIM only uses `cuda-nvrtc` through Python indirectly via CuPy. So this
usage of `cuda-nvrtc` shouldn't be needed. So drop it.
This should already be added via `libcufile-dev` in `host`.
@jakirkham jakirkham requested a review from vyasr July 25, 2023 22:01
Copy link
Contributor

@vyasr vyasr left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@gigony gigony left a comment

Choose a reason for hiding this comment

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

Thanks @jakirkham for handling CUDA 12 build issues!
Looks good to me!

@jakirkham
Copy link
Member Author

Thanks all! 🙏

@jakirkham
Copy link
Member Author

/merge

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.

Final changes LGTM!

@jakirkham jakirkham added this to the v23.08.00 milestone Jul 25, 2023
@rapids-bot rapids-bot bot merged commit 0a6bf42 into rapidsai:branch-23.08 Jul 25, 2023
21 checks passed
@jakirkham jakirkham deleted the cuda-12 branch July 25, 2023 23:49
@jakirkham
Copy link
Member Author

jakirkham commented Jul 26, 2023

I guess the section we discussed under

    if [ ! -f ${cufile_include}/cufile.h ]; then
        c_echo_err Y "GDS client library is not available! Downloading the redistributable package to get cufile.h and libraries."

where it downloads x86_64 GDS can be updated in a follow up PR to not download if on aarch64?

Filed for follow up in issue ( #586 )

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.

Drop CUDA info line cuCIM: CUDA 12 Conda Packages
6 participants