Skip to content

GH-46165: [C++] Add cuda option to Meson configuration #46166

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

WillAyd
Copy link
Contributor

@WillAyd WillAyd commented Apr 16, 2025

Rationale for this change

This continues building out support for Meson as a build system gnerator

What changes are included in this PR?

Adds a cuda option that pulls in the gpu directory

Are these changes tested?

No

Are there any user-facing changes?

No

Copy link

⚠️ GitHub issue #46165 has been automatically assigned in GitHub to PR creator.

@WillAyd
Copy link
Contributor Author

WillAyd commented Apr 16, 2025

I am unable to fully test this locally as I do not have a CUDA-enabled device. I can configure the project and compile, but at link time I get errors like:

/usr/bin/ld: src/arrow/gpu/libarrow-cuda.so.p/cuda_context.cc.o: in function `arrow::cuda::CudaDevice::AllocateHostBuffer(long)':
/home/willayd/clones/arrow/cpp/builddir/../src/arrow/gpu/cuda_context.cc:266:(.text+0xa88): undefined reference to `cuMemHostAlloc'
/usr/bin/ld: src/arrow/gpu/libarrow-cuda.so.p/cuda_context.cc.o: in function `arrow::cuda::CudaDevice::MakeStream(unsigned int)::{lambda(void*)#1}::operator()(void*) const':
/home/willayd/clones/arrow/cpp/builddir/../src/arrow/gpu/cuda_context.cc:286:(.text+0xc29): undefined reference to `cuStreamDestroy_v2'
/usr/bin/ld: src/arrow/gpu/libarrow-cuda.so.p/cuda_context.cc.o: in function `arrow::cuda::CudaDevice::MakeStream(unsigned int)':
/home/willayd/clones/arrow/cpp/builddir/../src/arrow/gpu/cuda_context.cc:280:(.text+0xf1f): undefined reference to `cuStreamCreate'

I believe those missing symbols are from drivers that I cannot install, although my familiarity with building CUDA applications is admittedly low

@kou
Copy link
Member

kou commented Apr 23, 2025

We can build cpp/src/arrow/gpu/ without CUDA-enabled device. For example, our deb packages do it: https://github.com/ursacomputing/crossbow/actions/runs/14590422628/job/40924210051#step:8:8349

-- Installing: /build/apache-arrow-20.0.0.dev326/debian/tmp/usr/lib/x86_64-linux-gnu/libarrow_cuda.so.2000.0.0

FYI: We can use nvidia-cuda-toolkit on Debian for it:

apt install -y -V ${quiet} nvidia-cuda-toolkit; \

@WillAyd
Copy link
Contributor Author

WillAyd commented Apr 23, 2025

@github-actions crossbow submit *meson

Copy link

Revision: 5b4a4be

Submitted crossbow builds: ursacomputing/crossbow @ actions-c4ce1f69f0

Task Status
test-conda-cpp-meson GitHub Actions

@WillAyd
Copy link
Contributor Author

WillAyd commented Apr 23, 2025

@github-actions crossbow submit *meson

Copy link

Revision: e21c24f

Submitted crossbow builds: ursacomputing/crossbow @ actions-13cedcf855

Task Status
test-conda-cpp-meson GitHub Actions

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

Successfully merging this pull request may close these issues.

2 participants