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

Use CUDA 12 for cross-compiling aarch/ppc #1120

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

h-vetinari
Copy link
Member

Trying to solve #1114

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@jakirkham
Copy link
Member

Think it is failing due to this logic in conda-forge-ci-setup. Think we need another branch like this one

@jakirkham
Copy link
Member

Probably need to wait for CDN to pick up the new conda-forge-ci-setup

@h-vetinari
Copy link
Member Author

I know :)
It already got picked up in https://anaconda.org/conda-forge/conda-forge-ci-setup/files (#DL > 0), but I don't yet have a bullet-proof way to determine if something is through the CDN (short of mamba repoquery search x, but that's not really scalable)

@h-vetinari h-vetinari changed the title Use CUDA 12 for aarch/ppc Use CUDA 12 for cross-compiling aarch/ppc Jul 15, 2023
@h-vetinari
Copy link
Member Author

This is looking pretty good! libarrow got built successfully already! 🥳

Great job on the new compiler setup that this works out of the box 💪
@jakirkham @adibbley @isuruf

@h-vetinari
Copy link
Member Author

It seems the suspicion I had in conda-forge/conda-forge-ci-setup-feedstock#250 is still relevant - we need to copy libcuda.so to ${QEMU_LD_PREFIX}/usr/lib/.

import: 'pyarrow.cuda'
Traceback (most recent call last):
  File "/home/conda/feedstock_root/build_artifacts/apache-arrow_1689413945820/test_tmp/run_test.py", line 29, in <module>
    import pyarrow.cuda
  File "/home/conda/feedstock_root/build_artifacts/apache-arrow_1689413945820/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/pyarrow/cuda.py", line 21, in <module>
    from pyarrow._cuda import (Context, IpcMemHandle, CudaBuffer,
ImportError: libcuda.so.1: cannot open shared object file: No such file or directory

@h-vetinari
Copy link
Member Author

@jakirkham @adibbley
What's the intention for how $PREFIX/cuda-compat/libcuda.so.1 from cuda-compat should be found? Looks like we need to add that to the path somewhere, at least during the testing phase?

Despite adding cuda-compat as a test-dep here, this currently fails:

    from pyarrow._cuda import (Context, IpcMemHandle, CudaBuffer,
ImportError: libcuda.so.1: cannot open shared object file: No such file or directory

I'm actually wondering if we don't want to make this unconditional somehow - feedstocks shouldn't have to add a test-dependency on cuda-compat (or cuda-driver-dev, like cupy is doing), just to get the tests to run. Of course, we're in a bit of a catch 22 here, as we should be testing the artefacts as packaged, but given that we don't have libcuda.so in CI (well, except the CUDA 11 images), we have to do this in some way.

@h-vetinari
Copy link
Member Author

h-vetinari commented Jul 24, 2023

Looks like we can fix this in #1122. I think I'll keep this open to debug & test cross-compilation with CUDA 12, which we'll have to solve eventually anyway.

@jakirkham
Copy link
Member

Is this still needed? Or did we manage to address this elsewhere already?

@h-vetinari
Copy link
Member Author

We'll need it eventually, when the lowest supported CUDA version in conda-forge is 12.0

@jakirkham
Copy link
Member

Ok am hoping it is easier to do this now than it was at that time. Maybe there will be an opportunity to simplify things here when that time comes

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.

2 participants