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

[WIP] Use one metapackage for CPU/GPU #35

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
40 changes: 23 additions & 17 deletions README.md

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

79 changes: 19 additions & 60 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% set name = "xgboost" %}
{% set version = "1.7.4" %}

{% set xgboost_proc_type = "cpu" %}

package:
name: {{ name|lower }}-split
version: {{ version }}
Expand All @@ -16,7 +18,7 @@ source:
- 0001-Force-endian-flag-in-cross-compilation-mode.patch # [arm64 or aarch64 or ppc64le]

build:
number: 2
number: 3
skip: true # [win and cuda_compiler_version != "None"]
skip: true # [cuda_compiler_version == "10.2"]

Expand All @@ -36,6 +38,20 @@ requirements:
- llvm-openmp # [osx]

outputs:
- name: xgboost-proc
version: 1.0.0
build:
number: 0
string: "{{ xgboost_proc_type }}"
test:
commands:
- exit 0
about:
home: https://github.com/conda-forge/xgboost-feedstock
license: BSD-3-Clause
license_family: BSD
summary: A meta-package to select CPU or GPU xgboost build.

- name: libxgboost
script: install-libxgboost.sh # [not win]
script: install-win-wrapper.bat # [win]
Expand All @@ -59,12 +75,8 @@ outputs:
run:
- llvm-openmp # [osx]
- __cuda # [cuda_compiler_version != "None"]

- name: _py-xgboost-mutex
version: 2.0
build:
string: cpu_0 # [cuda_compiler_version == "None"]
string: gpu_0 # [cuda_compiler_version != "None"]
run_constrained:
- xgboost-proc * {{ xgboost_proc_type }}

- name: py-xgboost
script: install-py-xgboost.sh # [not win]
Expand All @@ -83,7 +95,6 @@ outputs:
- pip
run:
- {{ pin_subpackage('libxgboost', exact=True) }}
- {{ pin_subpackage('_py-xgboost-mutex', exact=True) }}
- python
- numpy
- scipy
Expand All @@ -94,30 +105,6 @@ outputs:
imports:
- xgboost

- name: py-xgboost-cpu
build:
skip: true # [cuda_compiler_version != "None"]
requirements:
host:
- python
- {{ pin_subpackage('py-xgboost', exact=True) }}
run:
- python
- {{ pin_subpackage('py-xgboost', exact=True) }}

- name: py-xgboost-gpu
build:
skip: true # [cuda_compiler_version == "None"]
requirements:
host:
- python
- {{ pin_subpackage('py-xgboost', exact=True) }}
run:
- python
- {{ pin_subpackage('py-xgboost', exact=True) }}
- __cuda # [cuda_compiler_version != "None"]


- name: xgboost
build:
string: cuda{{ cuda_compiler_version | replace('.', '') }}py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version != "None"]
Expand All @@ -135,12 +122,6 @@ outputs:
- {{ pin_subpackage('py-xgboost', exact=True) }}
- __cuda # [cuda_compiler_version != "None"]

- name: _r-xgboost-mutex
version: 2.0
build:
string: cpu_0 # [cuda_compiler_version == "None"]
string: gpu_0 # [cuda_compiler_version != "None"]

- name: r-xgboost
script: install-r-xgboost.sh # [not win]
script: install-r-xgboost.bat # [win]
Expand Down Expand Up @@ -182,7 +163,6 @@ outputs:
- nccl # [cuda_compiler_version != "None"]
run:
- {{ pin_subpackage('libxgboost', exact=True) }}
- {{ pin_subpackage('_r-xgboost-mutex', exact=True) }}
- llvm-openmp # [osx]
- r-base
- r-matrix
Expand All @@ -196,27 +176,6 @@ outputs:
commands:
- Rscript test-r-xgboost.r

- name: r-xgboost-cpu
build:
skip: true # [cuda_compiler_version != "None"]
requirements:
host:
- r-base
run:
- r-base
- {{ pin_subpackage('r-xgboost', exact=True) }}

- name: r-xgboost-gpu
build:
skip: true # [cuda_compiler_version == "None"]
requirements:
host:
- r-base
run:
- r-base
- {{ pin_subpackage('r-xgboost', exact=True) }}
- __cuda # [cuda_compiler_version != "None"]

about:
home: https://github.com/dmlc/xgboost
license: Apache-2.0
Expand Down