Skip to content

Commit

Permalink
Merge conda-forge/main into rapidsai/main
Browse files Browse the repository at this point in the history
  • Loading branch information
jakirkham committed Jan 19, 2024
2 parents dcb592a + 1f768db commit 87175a4
Show file tree
Hide file tree
Showing 14 changed files with 141 additions and 150 deletions.
99 changes: 0 additions & 99 deletions .ci_support/migrations/cuda118.yaml

This file was deleted.

25 changes: 23 additions & 2 deletions .gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 3 additions & 9 deletions .scripts/build_steps.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .scripts/run_docker_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .scripts/run_osx_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .scripts/run_win_build.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions conda-forge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ build_platform:
channel_priority: flexible
conda_build:
pkg_format: '2'
conda_build_tool: conda-build
conda_forge_output_validation: false
conda_install_tool: mamba
conda_solver: libmamba
github:
branch_name: main
tooling_branch_name: main
Expand Down
16 changes: 0 additions & 16 deletions recipe/0001-conda-Unbundle-libxgboost.-dll-dylib-so.patch

This file was deleted.

25 changes: 25 additions & 0 deletions recipe/0002-Enable-latest-libcxx-on-MacOS.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 59ac1090da5ba692238f4baf87d46a4c81b9282c Mon Sep 17 00:00:00 2001
From: Hyunsu Cho <chohyu01@cs.washington.edu>
Date: Wed, 1 Nov 2023 01:01:34 -0700
Subject: [PATCH] Enable latest libcxx on MacOS

---
R-package/src/Makevars.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/R-package/src/Makevars.in b/R-package/src/Makevars.in
index 9e7cbfed..8b3af0ae 100644
--- a/R-package/src/Makevars.in
+++ b/R-package/src/Makevars.in
@@ -7,7 +7,7 @@ CXX_STD = CXX17

XGB_RFLAGS = -DXGBOOST_STRICT_R_MODE=1 -DDMLC_LOG_BEFORE_THROW=0\
-DDMLC_ENABLE_STD_THREAD=$(ENABLE_STD_THREAD) -DDMLC_DISABLE_STDIN=1\
- -DDMLC_LOG_CUSTOMIZE=1
+ -DDMLC_LOG_CUSTOMIZE=1 -D_LIBCPP_DISABLE_AVAILABILITY

# disable the use of thread_local for 32 bit windows:
ifeq ($(R_OSTYPE)$(WIN),windows)
--
2.25.1

41 changes: 41 additions & 0 deletions recipe/0003-Use-mingw-w64-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
From 8007af85d3dab8369fbb89234e33ebb06d58dca6 Mon Sep 17 00:00:00 2001
From: Hyunsu Cho <chohyu01@cs.washington.edu>
Date: Wed, 1 Nov 2023 08:47:29 -0700
Subject: [PATCH] Use mingw-w64 path

---
python-package/packager/nativelib.py | 3 +++
python-package/xgboost/libpath.py | 3 +++
2 files changed, 6 insertions(+)

diff --git a/python-package/packager/nativelib.py b/python-package/packager/nativelib.py
index 9d3fec2b..74942f42 100644
--- a/python-package/packager/nativelib.py
+++ b/python-package/packager/nativelib.py
@@ -140,6 +140,9 @@ def locate_or_build_libxgboost(
sys_prefix / "Library",
sys_prefix / "Library" / "bin",
sys_prefix / "Library" / "lib",
+ sys_prefix / "Library" / "mingw-w64",
+ sys_prefix / "Library" / "mingw-w64" / "bin",
+ sys_prefix / "Library" / "mingw-w64" / "lib",
]
sys_prefix_candidates = [
p.expanduser().resolve() for p in sys_prefix_candidates
diff --git a/python-package/xgboost/libpath.py b/python-package/xgboost/libpath.py
index 58c78df0..92d46a0b 100644
--- a/python-package/xgboost/libpath.py
+++ b/python-package/xgboost/libpath.py
@@ -38,6 +38,9 @@ def find_lib_path() -> List[str]:
os.path.join(sys.base_prefix, "Library"),
os.path.join(sys.base_prefix, "Library", "bin"),
os.path.join(sys.base_prefix, "Library", "lib"),
+ os.path.join(sys.base_prefix, "Library", "mingw-w64"),
+ os.path.join(sys.base_prefix, "Library", "mingw-w64", "bin"),
+ os.path.join(sys.base_prefix, "Library", "mingw-w64", "lib"),
]
)
dll_path = [os.path.join(p, "xgboost.dll") for p in dll_path]
--
2.25.1

15 changes: 12 additions & 3 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,17 @@ set -exuo pipefail

mkdir -p build-target

XGB_CMAKE_ARGS=()

if [[ "$target_platform" == osx-* ]]
then
XGB_CMAKE_ARGS=(-DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp -I${PREFIX}/include" -DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp -I${PREFIX}/include" -DOpenMP_C_LIB_NAMES=libomp -DOpenMP_CXX_LIB_NAMES=libomp -DOpenMP_libomp_LIBRARY=${PREFIX}/lib/libomp.dylib ${XGB_CMAKE_ARGS[@]+"${XGB_CMAKE_ARGS[@]}"} )
fi


if [[ ${cuda_compiler_version} != "None" ]]; then
export CMAKE_ARGS="-DUSE_CUDA=ON -DUSE_NCCL=ON -DBUILD_WITH_SHARED_NCCL=ON ${CMAKE_ARGS}"
export CMAKE_ARGS="-DBUILD_WITH_CUDA_CUB=ON -DPLUGIN_RMM=ON ${CMAKE_ARGS}"
XGB_CMAKE_ARGS=(-DUSE_CUDA=ON -DUSE_NCCL=ON -DBUILD_WITH_SHARED_NCCL=ON ${XGB_CMAKE_ARGS[@]+"${XGB_CMAKE_ARGS[@]}"} )
XGB_CMAKE_ARGS=(-DBUILD_WITH_CUDA_CUB=ON -DPLUGIN_RMM=ON ${XGB_CMAKE_ARGS[@]+"${XGB_CMAKE_ARGS[@]}"} )
fi

# Limit number of threads used to avoid hardware oversubscription
Expand All @@ -15,11 +23,12 @@ if [[ "${target_platform}" == "linux-aarch64" ]] || [[ "${target_platform}" == "
fi

pushd build-target
cmake ${CMAKE_ARGS} \
cmake ${CMAKE_ARGS} ${XGB_CMAKE_ARGS[@]+"${XGB_CMAKE_ARGS[@]}"} \
-GNinja \
-DCMAKE_BUILD_TYPE:STRING="Release" \
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON \
-DCMAKE_INSTALL_PREFIX:PATH="${PREFIX}" \
-DCMAKE_CXX_FLAGS="-D_LIBCPP_DISABLE_AVAILABILITY" \
"${SRC_DIR}"
cmake --build . --config Release
popd
2 changes: 1 addition & 1 deletion recipe/install-py-xgboost.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

pushd ${SRC_DIR}/python-package
${PYTHON} setup.py install --use-system-libxgboost --single-version-externally-managed --record=record.txt
${PYTHON} -m pip install . -vv --config-settings use_system_libxgboost=True
popd
2 changes: 1 addition & 1 deletion recipe/install-r-xgboost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ pushd ${SRC_DIR}/R-package
# This file is only used for windows compilation from github
# It will be replaced with Makevars.in for the CRAN version
# rm src/Makevars.win
${R} CMD INSTALL --preclean --build . ${R_ARGS}
${R} CMD INSTALL --preclean --build . --configure-args="CXXFLAGS=-D_LIBCPP_DISABLE_AVAILABILITY" ${R_ARGS}
popd
Loading

0 comments on commit 87175a4

Please sign in to comment.