-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GH-37523: [C++][CI][CUDA] Don't use newer API and add missing CUDA dependencies #37497
Conversation
@github-actions crossbow submit ubuntu-cuda-cpp |
|
@github-actions crossbow submit *cuda* |
Revision: 6626ee6 Submitted crossbow builds: ursacomputing/crossbow @ actions-b539647434
|
Revision: 6626ee6 Submitted crossbow builds: ursacomputing/crossbow @ actions-ccf9bbe515
|
@github-actions crossbow submit *cuda* |
Revision: 65d8df8 Submitted crossbow builds: ursacomputing/crossbow @ actions-f74ba67795
|
@github-actions crossbow submit test-cuda-python |
It seems that this has many changes to say "MINOR". Could you open an issue for this? |
Revision: 4e6835b Submitted crossbow builds: ursacomputing/crossbow @ actions-b39bc0bebc
|
@pitrou @AlenkaF @jorisvandenbossche I haven't been able to work out why the include path for Running tests myself locally I don't have any problems building it with a mamba environment, so I'm not sure what I'm missing. Any of you have any ideas? |
First thing I would try is adding the header file in the install of the cmake arrow/cpp/src/arrow/gpu/CMakeLists.txt Line 84 in c0998b1
as it is not being installed currently (https://github.com/ursacomputing/crossbow/actions/runs/6042448301/job/16397574982#step:5:6699). arrow/cpp/src/arrow/gpu/CMakeLists.txt Line 45 in c0998b1
arrow/cpp/src/arrow/gpu/CMakeLists.txt Lines 81 to 84 in c0998b1
|
How about this? diff --git a/cpp/src/arrow/gpu/ArrowCUDAConfig.cmake.in b/cpp/src/arrow/gpu/ArrowCUDAConfig.cmake.in
index bb36abf24..626c536a0 100644
--- a/cpp/src/arrow/gpu/ArrowCUDAConfig.cmake.in
+++ b/cpp/src/arrow/gpu/ArrowCUDAConfig.cmake.in
@@ -30,6 +30,10 @@ include(CMakeFindDependencyMacro)
find_dependency(Arrow)
if(CMAKE_VERSION VERSION_LESS 3.17)
find_package(CUDA REQUIRED)
+ add_library(ArrowCUDA::cuda_driver SHARED IMPORTED)
+ set_target_properties(ArrowCUDA::cuda_driver
+ PROPERTIES IMPORTED_LOCATION "${CUDA_CUDA_LIBRARY}"
+ INTERFACE_INCLUDE_DIRECTORIES "${CUDA_INCLUDE_DIRS}")
else()
find_package(CUDAToolkit REQUIRED)
endif()
diff --git a/cpp/src/arrow/gpu/CMakeLists.txt b/cpp/src/arrow/gpu/CMakeLists.txt
index 2556f30f0..a5b176793 100644
--- a/cpp/src/arrow/gpu/CMakeLists.txt
+++ b/cpp/src/arrow/gpu/CMakeLists.txt
@@ -32,8 +32,11 @@ endif()
set(ARROW_CUDA_LINK_LIBS arrow::flatbuffers)
if(CMAKE_VERSION VERSION_LESS 3.17)
find_package(CUDA REQUIRED)
- set(ARROW_CUDA_SHARED_LINK_LIBS ${CUDA_CUDA_LIBRARY})
- include_directories(SYSTEM ${CUDA_INCLUDE_DIRS})
+ add_library(ArrowCUDA::cuda_driver SHARED IMPORTED)
+ set_target_properties(ArrowCUDA::cuda_driver
+ PROPERTIES IMPORTED_LOCATION "${CUDA_CUDA_LIBRARY}"
+ INTERFACE_INCLUDE_DIRECTORIES "${CUDA_INCLUDE_DIRS}")
+ set(ARROW_CUDA_SHARED_LINK_LIBS ArrowCUDA::cuda_driver)
else()
# find_package(CUDA) is deprecated, and for newer CUDA, it doesn't
# recognize that the CUDA driver library is in the "stubs" dir, but
@@ -61,6 +64,7 @@ add_arrow_lib(arrow_cuda
${ARROW_CUDA_SHARED_LINK_LIBS}
SHARED_INSTALL_INTERFACE_LIBS
Arrow::arrow_shared
+ ${ARROW_CUDA_SHARED_LINK_LIBS}
# Static arrow_cuda must also link against CUDA shared libs
STATIC_LINK_LIBS
${ARROW_CUDA_LINK_LIBS}
diff --git a/cpp/src/arrow/gpu/arrow-cuda.pc.in b/cpp/src/arrow/gpu/arrow-cuda.pc.in
index 84c8c5889..173d7d91e 100644
--- a/cpp/src/arrow/gpu/arrow-cuda.pc.in
+++ b/cpp/src/arrow/gpu/arrow-cuda.pc.in
@@ -22,6 +22,6 @@ libdir=@ARROW_PKG_CONFIG_LIBDIR@
Name: Apache Arrow CUDA
Description: CUDA integration library for Apache Arrow
Version: @ARROW_VERSION@
-Requires: arrow
+Requires: arrow cuda
Libs: -L${libdir} -larrow_cuda
Cflags: -I${includedir} |
@github-actions crossbow submit test-cuda-python |
Revision: 78ccfb9 Submitted crossbow builds: ursacomputing/crossbow @ actions-0ca7a3d49d
|
@kou thanks! Your cmake changes fixed it perfectly! also I agree completely that this has expanded beyond the scope of a MINOR change. I'll create an issue for it. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
ci/scripts/python_build.sh
Outdated
@@ -70,6 +70,7 @@ export PYARROW_WITH_SUBSTRAIT=${ARROW_SUBSTRAIT:-OFF} | |||
export PYARROW_PARALLEL=${n_jobs} | |||
|
|||
export LD_LIBRARY_PATH=${ARROW_HOME}/lib:${LD_LIBRARY_PATH} | |||
export CMAKE_PREFIX_PATH=${ARROW_HOME}:${CMAKE_PREFIX_PATH} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this?
If we don't need this, I want to revert this before we merge this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that fixed one of the build errors, but I haven't tried without it since adding your fix. I'll try removing it and re-run the crossbow build, if all works fine then we're good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good with it reverted! all is passing. Thanks for the help!
@github-actions crossbow submit test-cuda-python |
Revision: f204bab Submitted crossbow builds: ursacomputing/crossbow @ actions-00d8e7b991
|
After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit 13f0cd8. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
…UDA dependencies (apache#37497) ### Rationale for this change apache#37365 was built locally using a newer version of the CUDA driver API than the crossbow builds run with causing the crossbow build to fail due to a change in macro names. This puts the macro name back to allow it to build with the older version of the cuda driver api. * Closes: apache#37523 Authored-by: Matt Topol <[email protected]> Signed-off-by: Matt Topol <[email protected]>
…UDA dependencies (apache#37497) ### Rationale for this change apache#37365 was built locally using a newer version of the CUDA driver API than the crossbow builds run with causing the crossbow build to fail due to a change in macro names. This puts the macro name back to allow it to build with the older version of the cuda driver api. * Closes: apache#37523 Authored-by: Matt Topol <[email protected]> Signed-off-by: Matt Topol <[email protected]>
Rationale for this change
#37365 was built locally using a newer version of the CUDA driver API than the crossbow builds run with causing the crossbow build to fail due to a change in macro names. This puts the macro name back to allow it to build with the older version of the cuda driver api.