Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ci/docker/conda-cpp.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ RUN mamba install -q -y \
doxygen \
libnuma \
mold \
nvidia::cuda \
nvidia::cuda-toolkit \
python=${python} \
valgrind && \
mamba clean --all --yes
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/cpp_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ binary_output_dir=${build_dir}/${ARROW_BUILD_TYPE:-debug}

export ARROW_TEST_DATA=${arrow_dir}/testing/data
export PARQUET_TEST_DATA=${source_dir}/submodules/parquet-testing/data
export LD_LIBRARY_PATH=${ARROW_HOME}/${CMAKE_INSTALL_LIBDIR:-lib}:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH=${ARROW_HOME}/${CMAKE_INSTALL_LIBDIR:-lib}:${CUDA_PATH}/lib/stubs:${LD_LIBRARY_PATH}

# By default, aws-sdk tries to contact a non-existing local ip host
# to retrieve metadata. Disable this so that S3FileSystem tests run faster.
Expand Down
2 changes: 2 additions & 0 deletions cpp/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,15 @@ needs_integration = get_option('integration').enabled()
needs_tests = get_option('tests').enabled()
needs_acero = get_option('acero').enabled() or needs_dataset
needs_compute = get_option('compute').enabled() or needs_acero
needs_cuda = get_option('cuda').enabled()
needs_flight_sql = false
needs_flight = get_option('flight').enabled() or needs_flight_sql
needs_gandiva = false
needs_ipc = (get_option('ipc').enabled()
or needs_tests
or needs_acero
or needs_benchmarks
or needs_cuda
or needs_flight
or needs_parquet
or needs_substrait
Expand Down
5 changes: 5 additions & 0 deletions cpp/meson.options
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ option(
description: 'Build all Arrow Compute kernels',
)
option('csv', type: 'feature', description: 'Build the Arrow CSV Parser Module')
option(
'cuda',
type: 'feature',
description: 'Build the Arrow CUDA extensions (requires CUDA toolkit)',
)
option(
'dataset',
type: 'feature',
Expand Down
76 changes: 76 additions & 0 deletions cpp/src/arrow/gpu/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

cuda_dep = dependency('cuda', modules: ['cuda'], version: '>=11.7.1')

arrow_cuda_srcs = [
'cuda_arrow_ipc.cc',
'cuda_context.cc',
'cuda_internal.cc',
'cuda_memory.cc',
]

arrow_cuda_lib = library(
'arrow-cuda',
sources: [arrow_cuda_srcs],
dependencies: [arrow_dep, cuda_dep, flatbuffers_dep],
cpp_args: ['-DARROW_CUDA_EXPORTING'],
)

arrow_cuda_dep = declare_dependency(
link_with: [arrow_cuda_lib],
dependencies: [cuda_dep],
)

cuda_version = cuda_dep.version()
cuda_split_version = cuda_version.split('.')
cuda_conf_data = configuration_data()
cuda_conf_data.set('CUDA_VERSION_MAJOR', cuda_split_version[0])
cuda_conf_data.set('CUDA_VERSION_MINOR', cuda_split_version[1])

configure_file(
input: 'cuda_version.h.in',
output: 'cuda_version.h',
configuration: cuda_conf_data,
install_dir: 'arrow/gpu',
)

install_headers(
[
'cuda_api.h',
'cuda_arrow_ipc.h',
'cuda_context.h',
'cuda_internal.h',
'cuda_memory.h',
'visibility.h',
],
subdir: 'arrow/gpu',
)

exc = executable(
'arrow-cuda-test',
sources: ['cuda_test.cc'],
dependencies: [arrow_test_dep, arrow_cuda_dep],
)
test('arrow-cuda-test', exc)

exc = executable(
'arrow-cuda-benchmark',
sources: ['cuda_benchmark.cc'],
dependencies: [arrow_benchmark_dep, arrow_cuda_dep],
)
benchmark('arrow-gpu-cuda-benchmark', exc)
4 changes: 4 additions & 0 deletions cpp/src/arrow/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,10 @@ if needs_acero
subdir('acero')
endif

if needs_cuda
subdir('gpu')
endif

if needs_filesystem
subdir('filesystem')
endif
Expand Down
Loading