Skip to content
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

Release 2.0.3 #132

Merged
merged 47 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
5e56170
Release 2.0.0
PrimozGodec Sep 14, 2023
d3a4e7d
MNT: Re-rendered with conda-build 3.26.1, conda-smithy 3.25.1, and co…
Sep 14, 2023
db22c6d
Fix patchs
PrimozGodec Sep 18, 2023
c08fa24
Update patch
PrimozGodec Sep 19, 2023
9aac38e
Use pip install instead of setup.py install
PrimozGodec Sep 19, 2023
54002ca
MNT: Re-rendered with conda-build 3.26.1, conda-smithy 3.25.1, and co…
Sep 19, 2023
4e87a9c
MNT: Re-rendered with conda-build 3.27.0, conda-smithy 3.27.1, and co…
Oct 14, 2023
f4a3fd8
Merge conda-forge/main into PrimozGodec/release-2.0.0
jakirkham Oct 14, 2023
fd527a0
Merge conda-forge/main into PrimozGodec/release-2.0.0
jakirkham Oct 14, 2023
5231c77
Merge conda-forge/main into PrimozGodec/release-2.0.0
jakirkham Oct 18, 2023
edfa0a0
Workaround `conda-build` `outputs` bug w/`pip`
jakirkham Oct 18, 2023
b22e7fe
Require macOS 10.13+
jakirkham Oct 18, 2023
1fde14d
Move `script_env` under `build`
jakirkham Oct 18, 2023
5bb90d7
MNT: Re-rendered with conda-build 3.27.0, conda-smithy 3.27.1, and co…
Oct 18, 2023
2119d42
Bump to macOS 10.15+
jakirkham Oct 18, 2023
73df4d7
MNT: Re-rendered with conda-build 3.27.0, conda-smithy 3.27.1, and co…
Oct 18, 2023
2e1bd05
Switch from `setuptools` to `hatchling`
jakirkham Oct 18, 2023
f4b5ff8
Fix handling of paths on Windows
hcho3 Oct 20, 2023
7e58b72
Remove conflicting patch
hcho3 Oct 20, 2023
f333e39
Fix MacOS build
hcho3 Oct 20, 2023
18b91f1
Fix Windows build
hcho3 Oct 20, 2023
41ce4b0
MNT: Re-rendered with conda-build 3.24.0, conda-smithy 3.27.1, and co…
hcho3 Oct 20, 2023
666b193
Update recipe/meta.yaml
hcho3 Oct 24, 2023
77ec806
Fix OpenMP build on MacOS
hcho3 Oct 31, 2023
b485d49
Merge remote-tracking branch 'upstream/main' into release-2.0.0
hcho3 Oct 31, 2023
aa7dcbd
Add verbose flag
hcho3 Nov 1, 2023
8662cf0
Specify include path for OpenMP
hcho3 Nov 1, 2023
f6e6f51
Attempt to fix PPC64
hcho3 Nov 1, 2023
26f4a64
Remove numpy
hcho3 Nov 1, 2023
b13a492
Escape quotes
hcho3 Nov 1, 2023
1d0feb7
Escape space
hcho3 Nov 1, 2023
e6898fd
Use Bash array
hcho3 Nov 1, 2023
217f95a
Avoid unbound variable error
hcho3 Nov 1, 2023
475df3e
Add back workaround conda-build outputs bug w/pip
hcho3 Nov 1, 2023
2cb581d
Use XGBoost 2.0.1 patch release
hcho3 Nov 1, 2023
c34adcd
Fix R build on MacOS
hcho3 Nov 1, 2023
e136765
Fix build for Windows
hcho3 Nov 1, 2023
b701569
Don't use mingw-w64 path when installing
hcho3 Nov 1, 2023
7df7e4c
Patch for C++17 on MacOS
hcho3 Nov 1, 2023
5b4a06b
Use mingw-w64 path
hcho3 Nov 1, 2023
da913e7
Try undoing dmlc/xgboost#9436
hcho3 Nov 2, 2023
48d5896
Merge branch 'main' into release-2.0.0
PrimozGodec Nov 17, 2023
990c1d0
Use XGBoost 2.0.2
hcho3 Dec 15, 2023
7a1d17f
Remove MACOSX_DEPLOYMENT_TARGET
hcho3 Dec 15, 2023
33f3848
Keep CMAKE_ARGS from compiler activation
hcho3 Dec 15, 2023
2c413b2
MNT: Re-rendered with conda-build 3.28.1, conda-smithy 3.30.1, and co…
Dec 15, 2023
228755e
Use 2.0.3
hcho3 Dec 20, 2023
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
6 changes: 3 additions & 3 deletions .scripts/build_steps.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.

8 changes: 5 additions & 3 deletions .scripts/run_win_build.bat

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

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

55 changes: 55 additions & 0 deletions recipe/0004-Undo-dmlc-xgboost-9436.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
From 667a855dfa024ea392e60fa7f352a0781cb7f1e0 Mon Sep 17 00:00:00 2001
From: Hyunsu Cho <chohyu01@cs.washington.edu>
Date: Thu, 2 Nov 2023 08:12:43 -0700
Subject: [PATCH] Undo dmlc/xgboost#9436

---
CMakeLists.txt | 9 ---------
cmake/Utils.cmake | 4 +---
2 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d6b861ab..ca0125cb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -253,15 +253,6 @@ add_subdirectory(${xgboost_SOURCE_DIR}/plugin)

if (PLUGIN_RMM)
find_package(rmm REQUIRED)
-
- # Patch the rmm targets so they reference the static cudart
- # Remove this patch once RMM stops specifying cudart requirement
- # (since RMM is a header-only library, it should not specify cudart in its CMake config)
- get_target_property(rmm_link_libs rmm::rmm INTERFACE_LINK_LIBRARIES)
- list(REMOVE_ITEM rmm_link_libs CUDA::cudart)
- list(APPEND rmm_link_libs CUDA::cudart_static)
- set_target_properties(rmm::rmm PROPERTIES INTERFACE_LINK_LIBRARIES "${rmm_link_libs}")
- get_target_property(rmm_link_libs rmm::rmm INTERFACE_LINK_LIBRARIES)
endif (PLUGIN_RMM)

#-- library
diff --git a/cmake/Utils.cmake b/cmake/Utils.cmake
index 08050205..98e96e30 100644
--- a/cmake/Utils.cmake
+++ b/cmake/Utils.cmake
@@ -177,8 +177,7 @@ function(xgboost_set_cuda_flags target)
set_target_properties(${target} PROPERTIES
CUDA_STANDARD 17
CUDA_STANDARD_REQUIRED ON
- CUDA_SEPARABLE_COMPILATION OFF
- CUDA_RUNTIME_LIBRARY Static)
+ CUDA_SEPARABLE_COMPILATION OFF)
endfunction(xgboost_set_cuda_flags)

macro(xgboost_link_nccl target)
@@ -280,7 +279,6 @@ macro(xgboost_target_link_libraries target)

if (USE_CUDA)
xgboost_set_cuda_flags(${target})
- target_link_libraries(${target} PUBLIC CUDA::cudart_static)
endif (USE_CUDA)

if (PLUGIN_RMM)
--
2.25.1

13 changes: 11 additions & 2 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@ 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}"
XGB_CMAKE_ARGS=(-DUSE_CUDA=ON -DUSE_NCCL=ON -DBUILD_WITH_SHARED_NCCL=ON ${XGB_CMAKE_ARGS[@]+"${XGB_CMAKE_ARGS[@]}"} )
fi

# Limit number of threads used to avoid hardware oversubscription
Expand All @@ -14,11 +22,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
20 changes: 15 additions & 5 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% set name = "xgboost" %}
{% set version = "1.7.6" %}
{% set build_number = 6 %}
{% set version = "2.0.3" %}
{% set build_number = 0 %}

{% set string_prefix = "cuda" ~ (cuda_compiler_version | replace('.', '')) %} # [cuda_compiler_version != "None"]
{% set string_prefix = "cpu" %} # [cuda_compiler_version == "None"]
Expand All @@ -16,8 +16,10 @@ source:
git_tag: v{{ version }}
patches:
# xgboost patches
- 0001-conda-Unbundle-libxgboost.-dll-dylib-so.patch
- 0001-Force-endian-flag-in-cross-compilation-mode.patch # [arm64 or aarch64 or ppc64le]
- 0002-Enable-latest-libcxx-on-MacOS.patch # [osx]
- 0003-Use-mingw-w64-path.patch
- 0004-Undo-dmlc-xgboost-9436.patch

build:
number: {{ build_number }}
Expand Down Expand Up @@ -61,7 +63,7 @@ outputs:
run:
- __cuda # [cuda_compiler != "None"]
{% if (cuda_compiler_version or "").startswith("11") %}
- cuda-version >={{ cuda_compiler_version }},<12
- cuda-version >=11.2,<12
{% endif %}

- name: _py-xgboost-mutex
Expand All @@ -74,14 +76,22 @@ outputs:
script: install-win-wrapper.bat # [win]
build:
string: {{ string_prefix }}_py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}
script_env:
# Workaround an upstream conda-build issue w/pip & `outputs` by setting env vars manually.
# xref: https://github.com/conda/conda-build/issues/3993
- PIP_NO_BUILD_ISOLATION=False
- PIP_NO_DEPENDENCIES=True
- PIP_IGNORE_INSTALLED=True
- PIP_CACHE_DIR=pip_cache
- PIP_NO_INDEX=True
requirements:
build:
- python # [build_platform != target_platform]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
host:
- {{ pin_subpackage('libxgboost', exact=True) }}
- python
- setuptools
- hatchling >=1.12.1
- pip
run:
- {{ pin_subpackage('libxgboost', exact=True) }}
Expand Down