From 6a63f9eaf84c3d36d05151ac5a7081dc26984ae6 Mon Sep 17 00:00:00 2001 From: Aman-Surkar Date: Wed, 4 Oct 2023 13:29:29 +0000 Subject: [PATCH 1/4] Updated version to 2.0.0 --- config/build-config.yaml | 4 +-- ...da-Unbundle-libxgboost.-dll-dylib-so.patch | 15 --------- .../0001-Use-central-cuda-capabilities.patch | 28 ++++++++-------- ...da-Unbundle-libxgboost.-dll-dylib-so.patch | 32 +++++++++++++++++++ .../recipe/0002-Fix-R-package-PKGROOT.patch | 0 .../recipe/install-libxgboost.sh | 0 .../recipe/install-py-xgboost.sh | 2 +- {xgboost-1.7 => xgboost-2.0}/recipe/meta.yaml | 4 +-- .../recipe/test-py-xgboost.py | 0 9 files changed, 50 insertions(+), 35 deletions(-) delete mode 100644 xgboost-1.7/recipe/0001-conda-Unbundle-libxgboost.-dll-dylib-so.patch rename xgboost-1.7/recipe/0004-Use-central-cuda-capabilities.patch => xgboost-2.0/recipe/0001-Use-central-cuda-capabilities.patch (56%) create mode 100644 xgboost-2.0/recipe/0001-conda-Unbundle-libxgboost.-dll-dylib-so.patch rename {xgboost-1.7 => xgboost-2.0}/recipe/0002-Fix-R-package-PKGROOT.patch (100%) rename {xgboost-1.7 => xgboost-2.0}/recipe/install-libxgboost.sh (100%) rename {xgboost-1.7 => xgboost-2.0}/recipe/install-py-xgboost.sh (90%) rename {xgboost-1.7 => xgboost-2.0}/recipe/meta.yaml (98%) rename {xgboost-1.7 => xgboost-2.0}/recipe/test-py-xgboost.py (100%) diff --git a/config/build-config.yaml b/config/build-config.yaml index fa219fe..3caa7ce 100644 --- a/config/build-config.yaml +++ b/config/build-config.yaml @@ -1,4 +1,4 @@ recipes: - - name : xgboost-1.7 - path : xgboost-1.7/recipe + - name : xgboost-2.0 + path : xgboost-2.0/recipe diff --git a/xgboost-1.7/recipe/0001-conda-Unbundle-libxgboost.-dll-dylib-so.patch b/xgboost-1.7/recipe/0001-conda-Unbundle-libxgboost.-dll-dylib-so.patch deleted file mode 100644 index db3d9e5..0000000 --- a/xgboost-1.7/recipe/0001-conda-Unbundle-libxgboost.-dll-dylib-so.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/python-package/xgboost/libpath.py b/python-package/xgboost/libpath.py -index 8ca53fa..9b43213 100644 ---- a/python-package/xgboost/libpath.py -+++ b/python-package/xgboost/libpath.py -@@ -30,6 +30,10 @@ def find_lib_path(): - ] - - if sys.platform == 'win32': -+ dll_path = [os.path.join(sys.prefix, 'Library', 'mingw-w64', 'bin')] -+ else: -+ dll_path = [os.path.join(sys.prefix, 'lib')] -+ if sys.platform == 'win32': - if platform.architecture()[0] == '64bit': - dll_path.append( - os.path.join(curr_path, '../../windows/x64/Release/')) diff --git a/xgboost-1.7/recipe/0004-Use-central-cuda-capabilities.patch b/xgboost-2.0/recipe/0001-Use-central-cuda-capabilities.patch similarity index 56% rename from xgboost-1.7/recipe/0004-Use-central-cuda-capabilities.patch rename to xgboost-2.0/recipe/0001-Use-central-cuda-capabilities.patch index 401cc5c..acfefda 100644 --- a/xgboost-1.7/recipe/0004-Use-central-cuda-capabilities.patch +++ b/xgboost-2.0/recipe/0001-Use-central-cuda-capabilities.patch @@ -1,23 +1,21 @@ -From 674b1e1eafd3ddbcabbd990d7da3c82eb539d851 Mon Sep 17 00:00:00 2001 -From: Deepali Chourasia -Date: Tue, 8 Nov 2022 07:44:57 +0000 -Subject: [PATCH] use centralized cuda capabilities +From 77cda4dbda989789a7bd8b3b568ac5130faca69e Mon Sep 17 00:00:00 2001 +From: Aman-Surkar +Date: Wed, 4 Oct 2023 05:30:22 +0000 +Subject: [PATCH] Use central cuda capabilities --- - cmake/Utils.cmake | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) + cmake/Utils.cmake | 8 ++++++++ + 1 file changed, 8 insertions(+) diff --git a/cmake/Utils.cmake b/cmake/Utils.cmake -index f28c1f27..f0b6f1b2 100644 +index 08050205..4ea974d7 100644 --- a/cmake/Utils.cmake +++ b/cmake/Utils.cmake -@@ -90,8 +90,13 @@ function(format_gencode_flags flags out) - endif() - # Set up architecture flags +@@ -92,6 +92,13 @@ function(format_gencode_flags flags out) if(NOT flags) -- if (CUDA_VERSION VERSION_GREATER_EQUAL "11.1") -- set(flags "50;60;70;80") -+ if (CUDA_VERSION VERSION_GREATER_EQUAL "11.4") + if (CUDA_VERSION VERSION_GREATER_EQUAL "11.8") + set(flags "50;60;70;80;90") ++ elseif (CUDA_VERSION VERSION_GREATER_EQUAL "11.4") + string(REPLACE "," ";" tmpflags "$ENV{cuda_levels}") + string(REPLACE "." "" flags "${tmpflags}") + elseif (CUDA_VERSION VERSION_GREATER_EQUAL "11.1") @@ -27,7 +25,7 @@ index f28c1f27..f0b6f1b2 100644 elseif (CUDA_VERSION VERSION_GREATER_EQUAL "11.0") set(flags "50;60;70;80") elseif(CUDA_VERSION VERSION_GREATER_EQUAL "10.0") -@@ -101,6 +106,7 @@ function(format_gencode_flags flags out) +@@ -101,6 +108,7 @@ function(format_gencode_flags flags out) else() set(flags "35;50;60") endif() @@ -36,5 +34,5 @@ index f28c1f27..f0b6f1b2 100644 if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.18") -- -2.34.1 +2.40.1 diff --git a/xgboost-2.0/recipe/0001-conda-Unbundle-libxgboost.-dll-dylib-so.patch b/xgboost-2.0/recipe/0001-conda-Unbundle-libxgboost.-dll-dylib-so.patch new file mode 100644 index 0000000..daa64ce --- /dev/null +++ b/xgboost-2.0/recipe/0001-conda-Unbundle-libxgboost.-dll-dylib-so.patch @@ -0,0 +1,32 @@ +From dcd417d2eea224efcaab4256dff5f94f230f6076 Mon Sep 17 00:00:00 2001 +From: Aman-Surkar +Date: Wed, 4 Oct 2023 05:54:14 +0000 +Subject: [PATCH] conda Unbundle libxgboost.-dll-dylib-so + +--- + python-package/xgboost/libpath.py | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/python-package/xgboost/libpath.py b/python-package/xgboost/libpath.py +index 0437f3a4..b4fb2918 100644 +--- a/python-package/xgboost/libpath.py ++++ b/python-package/xgboost/libpath.py +@@ -1,3 +1,4 @@ ++ + # coding: utf-8 + """Find the path to xgboost dynamic library files.""" + +@@ -31,6 +32,10 @@ def find_lib_path() -> List[str]: + ] + + if sys.platform == "win32": ++ dll_path = [os.path.join(sys.prefix, 'Library', 'mingw-w64', 'bin')] ++ else: ++ dll_path = [os.path.join(sys.prefix, 'lib')] ++ if sys.platform == 'win32': + if platform.architecture()[0] == "64bit": + dll_path.append(os.path.join(curr_path, "../../windows/x64/Release/")) + # hack for pip installation when copy all parent source +-- +2.40.1 + diff --git a/xgboost-1.7/recipe/0002-Fix-R-package-PKGROOT.patch b/xgboost-2.0/recipe/0002-Fix-R-package-PKGROOT.patch similarity index 100% rename from xgboost-1.7/recipe/0002-Fix-R-package-PKGROOT.patch rename to xgboost-2.0/recipe/0002-Fix-R-package-PKGROOT.patch diff --git a/xgboost-1.7/recipe/install-libxgboost.sh b/xgboost-2.0/recipe/install-libxgboost.sh similarity index 100% rename from xgboost-1.7/recipe/install-libxgboost.sh rename to xgboost-2.0/recipe/install-libxgboost.sh diff --git a/xgboost-1.7/recipe/install-py-xgboost.sh b/xgboost-2.0/recipe/install-py-xgboost.sh similarity index 90% rename from xgboost-1.7/recipe/install-py-xgboost.sh rename to xgboost-2.0/recipe/install-py-xgboost.sh index 3a46277..aa00c3b 100644 --- a/xgboost-1.7/recipe/install-py-xgboost.sh +++ b/xgboost-2.0/recipe/install-py-xgboost.sh @@ -18,5 +18,5 @@ . activate "${PREFIX}" pushd ${SRC_DIR}/python-package - ${PYTHON} setup.py install --single-version-externally-managed --record=record.txt + ${PYTHON} -m pip install -v . --config-settings use_system_libxgboost=True popd diff --git a/xgboost-1.7/recipe/meta.yaml b/xgboost-2.0/recipe/meta.yaml similarity index 98% rename from xgboost-1.7/recipe/meta.yaml rename to xgboost-2.0/recipe/meta.yaml index 407af8d..e840bcc 100644 --- a/xgboost-1.7/recipe/meta.yaml +++ b/xgboost-2.0/recipe/meta.yaml @@ -1,5 +1,5 @@ # Builds the CPU and CUDA variants of libxgboost and xgboost packages -{% set version = "1.7.6" %} +{% set version = "2.0.0" %} {% set build_ext_version = version %} {% set proc_build_number = "1" %} @@ -16,7 +16,7 @@ source: # xgboost patches - 0001-conda-Unbundle-libxgboost.-dll-dylib-so.patch - 0002-Fix-R-package-PKGROOT.patch - - 0004-Use-central-cuda-capabilities.patch #[build_type == 'cuda'] + - 0001-Use-central-cuda-capabilities.patch #[build_type == 'cuda'] build: number: 1 diff --git a/xgboost-1.7/recipe/test-py-xgboost.py b/xgboost-2.0/recipe/test-py-xgboost.py similarity index 100% rename from xgboost-1.7/recipe/test-py-xgboost.py rename to xgboost-2.0/recipe/test-py-xgboost.py From 05c3011cb00b8983a17b76b0fc4bc5b2ab251651 Mon Sep 17 00:00:00 2001 From: Aman-Surkar Date: Thu, 5 Oct 2023 14:07:40 +0000 Subject: [PATCH 2/4] Updated install-py-xgboost.sh --- xgboost-2.0/recipe/install-py-xgboost.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xgboost-2.0/recipe/install-py-xgboost.sh b/xgboost-2.0/recipe/install-py-xgboost.sh index aa00c3b..40f36a7 100644 --- a/xgboost-2.0/recipe/install-py-xgboost.sh +++ b/xgboost-2.0/recipe/install-py-xgboost.sh @@ -18,5 +18,10 @@ . activate "${PREFIX}" pushd ${SRC_DIR}/python-package - ${PYTHON} -m pip install -v . --config-settings use_system_libxgboost=True + if [[ $build_type == "cuda" ]] + then + ${PYTHON} -m pip install -v . --config-settings use_cuda=True --config-settings use_nccl=True + else + ${PYTHON} -m pip install -v . + fi popd From 182ce925ca9ffa9f04b10abf8427069f12336047 Mon Sep 17 00:00:00 2001 From: Aman-Surkar Date: Tue, 10 Oct 2023 08:52:02 +0000 Subject: [PATCH 3/4] Updated install-py-xgboost.sh --- xgboost-2.0/recipe/install-py-xgboost.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xgboost-2.0/recipe/install-py-xgboost.sh b/xgboost-2.0/recipe/install-py-xgboost.sh index 40f36a7..41ef7d5 100644 --- a/xgboost-2.0/recipe/install-py-xgboost.sh +++ b/xgboost-2.0/recipe/install-py-xgboost.sh @@ -20,8 +20,8 @@ pushd ${SRC_DIR}/python-package if [[ $build_type == "cuda" ]] then - ${PYTHON} -m pip install -v . --config-settings use_cuda=True --config-settings use_nccl=True + ${PYTHON} -m pip install -v . --no-deps --ignore-installed --config-settings use_cuda=True --config-settings use_nccl=True else - ${PYTHON} -m pip install -v . + ${PYTHON} -m pip install -v . --no-deps --ignore-installed fi popd From f67cfc6773b7bc0a14d1c41dc2b9814c7664fc2c Mon Sep 17 00:00:00 2001 From: Aman-Surkar Date: Mon, 8 Jan 2024 13:25:38 +0000 Subject: [PATCH 4/4] Refreshed to v2.0.3 --- config/conda_build_config.yaml | 6 ---- .../0001-Use-central-cuda-capabilities.patch | 30 ++++++------------- ...da-Unbundle-libxgboost.-dll-dylib-so.patch | 25 +++++++--------- xgboost-2.0/recipe/meta.yaml | 2 +- 4 files changed, 20 insertions(+), 43 deletions(-) delete mode 100644 config/conda_build_config.yaml diff --git a/config/conda_build_config.yaml b/config/conda_build_config.yaml deleted file mode 100644 index 3577128..0000000 --- a/config/conda_build_config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -c_compiler_version: - - 8.4.0 # [x86_64 and cudatoolkit == '11.2'] - - 8.2.0 # [ppc64le and cudatoolkit == '11.2'] -cxx_compiler_version: - - 8.4.0 # [x86_64 and cudatoolkit == '11.2'] - - 8.2.0 # [ppc64le and cudatoolkit == '11.2'] diff --git a/xgboost-2.0/recipe/0001-Use-central-cuda-capabilities.patch b/xgboost-2.0/recipe/0001-Use-central-cuda-capabilities.patch index acfefda..6db533a 100644 --- a/xgboost-2.0/recipe/0001-Use-central-cuda-capabilities.patch +++ b/xgboost-2.0/recipe/0001-Use-central-cuda-capabilities.patch @@ -1,38 +1,26 @@ -From 77cda4dbda989789a7bd8b3b568ac5130faca69e Mon Sep 17 00:00:00 2001 +From f93655fdf7ea1bc125c6e943399c7ee7ecbb5d3c Mon Sep 17 00:00:00 2001 From: Aman-Surkar -Date: Wed, 4 Oct 2023 05:30:22 +0000 -Subject: [PATCH] Use central cuda capabilities +Date: Mon, 8 Jan 2024 12:59:09 +0000 +Subject: [PATCH] Use-central-cuda-capabilities --- - cmake/Utils.cmake | 8 ++++++++ - 1 file changed, 8 insertions(+) + cmake/Utils.cmake | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/Utils.cmake b/cmake/Utils.cmake -index 08050205..4ea974d7 100644 +index 08050205c..700bf86b0 100644 --- a/cmake/Utils.cmake +++ b/cmake/Utils.cmake -@@ -92,6 +92,13 @@ function(format_gencode_flags flags out) +@@ -91,7 +91,8 @@ function(format_gencode_flags flags out) + # Set up architecture flags if(NOT flags) if (CUDA_VERSION VERSION_GREATER_EQUAL "11.8") - set(flags "50;60;70;80;90") -+ elseif (CUDA_VERSION VERSION_GREATER_EQUAL "11.4") +- set(flags "50;60;70;80;90") + string(REPLACE "," ";" tmpflags "$ENV{cuda_levels}") + string(REPLACE "." "" flags "${tmpflags}") -+ elseif (CUDA_VERSION VERSION_GREATER_EQUAL "11.1") -+ #set(flags "52;60;61;70;75;80;86") -+ string(REPLACE "," ";" tmpflags "$ENV{cuda_levels}") -+ string(REPLACE "." "" flags "${tmpflags};8.6") elseif (CUDA_VERSION VERSION_GREATER_EQUAL "11.0") set(flags "50;60;70;80") elseif(CUDA_VERSION VERSION_GREATER_EQUAL "10.0") -@@ -101,6 +108,7 @@ function(format_gencode_flags flags out) - else() - set(flags "35;50;60") - endif() -+ message(STATUS "Using Open-CE Centralized CUDA Capabilities: ${flags}") - endif() - - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.18") -- 2.40.1 diff --git a/xgboost-2.0/recipe/0001-conda-Unbundle-libxgboost.-dll-dylib-so.patch b/xgboost-2.0/recipe/0001-conda-Unbundle-libxgboost.-dll-dylib-so.patch index daa64ce..b20d305 100644 --- a/xgboost-2.0/recipe/0001-conda-Unbundle-libxgboost.-dll-dylib-so.patch +++ b/xgboost-2.0/recipe/0001-conda-Unbundle-libxgboost.-dll-dylib-so.patch @@ -1,22 +1,17 @@ -From dcd417d2eea224efcaab4256dff5f94f230f6076 Mon Sep 17 00:00:00 2001 +From fe9487352675c8b0be26f30be9e9e2af0c103fab Mon Sep 17 00:00:00 2001 From: Aman-Surkar -Date: Wed, 4 Oct 2023 05:54:14 +0000 -Subject: [PATCH] conda Unbundle libxgboost.-dll-dylib-so +Date: Mon, 8 Jan 2024 13:00:50 +0000 +Subject: [PATCH] conda-Unbundle-libxgboost.-dll-dylib-so --- - python-package/xgboost/libpath.py | 5 +++++ - 1 file changed, 5 insertions(+) + python-package/xgboost/libpath.py | 4 ++++ + 1 file changed, 4 insertions(+) diff --git a/python-package/xgboost/libpath.py b/python-package/xgboost/libpath.py -index 0437f3a4..b4fb2918 100644 +index 58c78df09..bb682b929 100644 --- a/python-package/xgboost/libpath.py +++ b/python-package/xgboost/libpath.py -@@ -1,3 +1,4 @@ -+ - # coding: utf-8 - """Find the path to xgboost dynamic library files.""" - -@@ -31,6 +32,10 @@ def find_lib_path() -> List[str]: +@@ -31,6 +31,10 @@ def find_lib_path() -> List[str]: ] if sys.platform == "win32": @@ -24,9 +19,9 @@ index 0437f3a4..b4fb2918 100644 + else: + dll_path = [os.path.join(sys.prefix, 'lib')] + if sys.platform == 'win32': - if platform.architecture()[0] == "64bit": - dll_path.append(os.path.join(curr_path, "../../windows/x64/Release/")) - # hack for pip installation when copy all parent source + # On Windows, Conda may install libs in different paths + dll_path.extend( + [ -- 2.40.1 diff --git a/xgboost-2.0/recipe/meta.yaml b/xgboost-2.0/recipe/meta.yaml index e840bcc..0af5269 100644 --- a/xgboost-2.0/recipe/meta.yaml +++ b/xgboost-2.0/recipe/meta.yaml @@ -1,5 +1,5 @@ # Builds the CPU and CUDA variants of libxgboost and xgboost packages -{% set version = "2.0.0" %} +{% set version = "2.0.3" %} {% set build_ext_version = version %} {% set proc_build_number = "1" %}