Skip to content
Merged
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/scripts/install_numba.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ if [ -n "${ARROW_PYTHON_VENV:-}" ]; then
. "${ARROW_PYTHON_VENV}/bin/activate"
fi

# TODO: GH-47371 (install Python CUDA bindings explicitly)

if [ "${numba}" = "master" ]; then
pip install https://github.com/numba/numba/archive/main.tar.gz#egg=numba
elif [ "${numba}" = "latest" ]; then
Expand Down
21 changes: 13 additions & 8 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -581,12 +581,16 @@ services:
environment:
<<: [*common, *ccache, *sccache, *cpp]
ARROW_BUILD_UTILITIES: "OFF"
ARROW_ACERO: "OFF"
ARROW_AZURE: "OFF"
ARROW_COMPUTE: "OFF"
ARROW_CSV: "OFF"
ARROW_CUDA: "ON"
ARROW_DATASET: "OFF"
ARROW_ENABLE_TIMING_TESTS: "OFF"
ARROW_FILESYSTEM: "OFF"
ARROW_FLIGHT: "OFF"
ARROW_FLIGHT_SQL: "OFF"
ARROW_GANDIVA: "OFF"
ARROW_GCS: "OFF"
ARROW_HDFS: "OFF"
Expand Down Expand Up @@ -999,19 +1003,20 @@ services:
environment:
<<: [*common, *ccache, *sccache]
ARROW_BUILD_UTILITIES: "OFF"
ARROW_COMPUTE: "ON"
ARROW_CSV: "ON"
ARROW_ACERO: "OFF"
ARROW_AZURE: "OFF"
ARROW_CUDA: "ON"
ARROW_DATASET: "ON"
ARROW_DATASET: "OFF"
ARROW_ENABLE_TIMING_TESTS: "OFF"
ARROW_FILESYSTEM: "ON"
ARROW_FILESYSTEM: "OFF"
ARROW_FLIGHT: "OFF"
ARROW_FLIGHT_SQL: "OFF"
ARROW_GANDIVA: "OFF"
ARROW_GCS: "OFF"
ARROW_HDFS: "ON"
ARROW_JEMALLOC: "ON"
ARROW_JSON: "ON"
ARROW_HDFS: "OFF"
ARROW_JEMALLOC: "OFF"
ARROW_ORC: "OFF"
ARROW_PARQUET: "ON"
ARROW_PARQUET: "OFF"
ARROW_S3: "OFF"
ARROW_SUBSTRAIT: "OFF"
ARROW_WITH_OPENTELEMETRY: "OFF"
Expand Down
5 changes: 5 additions & 0 deletions cpp/src/arrow/gpu/cuda_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@ class TestCudaBase : public ::testing::Test {

Result<CUcontext> NonPrimaryRawContext() {
CUcontext ctx;
#if CUDA_VERSION >= 13000
RETURN_NOT_OK(StatusFromCuda(cuCtxCreate(&ctx, /*ctxCreateParams=*/nullptr,
/*flags=*/0, device_->handle())));
#else
RETURN_NOT_OK(StatusFromCuda(cuCtxCreate(&ctx, /*flags=*/0, device_->handle())));
#endif
Comment on lines 94 to 99
Copy link
Member Author

Choose a reason for hiding this comment

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

@gmarkall Does this fix look ok?

non_primary_contexts_.push_back(ctx);
return ctx;
}
Expand Down
14 changes: 8 additions & 6 deletions dev/tasks/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -833,23 +833,25 @@ tasks:

############################## CUDA tests #################################

test-cuda-cpp-ubuntu-22.04-cuda-11.7.1:
{% for ubuntu, cuda in [("22.04", "11.7.1"), ("24.04", "13.0.2")] %}
test-cuda-cpp-ubuntu-{{ ubuntu }}-cuda-{{ cuda }}:
ci: github
template: docker-tests/github.cuda.yml
params:
env:
CUDA: 11.7.1
UBUNTU: 22.04
CUDA: {{ cuda }}
UBUNTU: {{ ubuntu }}
image: ubuntu-cuda-cpp

test-cuda-python-ubuntu-22.04-cuda-11.7.1:
test-cuda-python-ubuntu-{{ ubuntu }}-cuda-{{ cuda }}:
ci: github
template: docker-tests/github.cuda.yml
params:
env:
CUDA: 11.7.1
UBUNTU: 22.04
CUDA: {{ cuda }}
UBUNTU: {{ ubuntu }}
image: ubuntu-cuda-python
{% endfor %}

############################## Fuzz tests #################################

Expand Down
11 changes: 8 additions & 3 deletions python/pyarrow/_cuda.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,14 @@ cdef class CudaBuffer(Buffer):
"""
import ctypes
from numba.cuda.cudadrv.driver import MemoryPointer
return MemoryPointer(self.context.to_numba(),
pointer=ctypes.c_void_p(self.address),
size=self.size)
try:
return MemoryPointer(self.context.to_numba(),
pointer=ctypes.c_void_p(self.address),
size=self.size)
except TypeError:
# Newer Numba does not take a context argument anymore
return MemoryPointer(pointer=ctypes.c_void_p(self.address),
size=self.size)

cdef getitem(self, int64_t i):
return self.copy_to_host(position=i, nbytes=1)[0]
Expand Down
3 changes: 3 additions & 0 deletions python/pyarrow/tests/test_cuda_numba_interop.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
except ImportError:
pytestmark = pytest.mark.numpy

pytest.skip("Numba integration tests broken by Numba API changes, see GH-48265",
allow_module_level=True)

dtypes = ['uint8', 'int16', 'float32']
cuda = pytest.importorskip("pyarrow.cuda")
nb_cuda = pytest.importorskip("numba.cuda")
Expand Down
Loading