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

Use conda compilers + mamba to build packages #78

Merged
merged 2 commits into from
May 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion ci/benchmark/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ CUGRAPH_DEPS=(cudf rmm)
LIBCUGRAPH_DEPS=(cudf rmm)

gpuci_logger "Install required packages"
gpuci_conda_retry install -c nvidia -c rapidsai -c rapidsai-nightly -c conda-forge \
gpuci_mamba_retry install -c nvidia -c rapidsai -c rapidsai-nightly -c conda-forge \
"cudf=${MINOR_VERSION}" \
"rmm=${MINOR_VERSION}" \
"cudatoolkit=$CUDA_REL" \
Expand Down
14 changes: 8 additions & 6 deletions ci/cpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ else
CONDA_LOCAL_CHANNEL="ci/artifacts/cugraph/cpu/.conda-bld/"
fi

# FIXME: Move boa install to gpuci/rapidsai
gpuci_mamba_retry install -c conda-forge boa

###############################################################################
# BUILD - Conda package builds
Expand All @@ -86,9 +88,9 @@ fi
if [ "$BUILD_LIBCUGRAPH" == '1' ]; then
gpuci_logger "Building conda package for libcugraph and libcugraph_etl"
if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcugraph
gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcugraph
else
gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir conda/recipes/libcugraph
gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir conda/recipes/libcugraph
mkdir -p ${CONDA_BLD_DIR}/libcugraph
mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/libcugraph/work
fi
Expand All @@ -101,11 +103,11 @@ fi
if [ "$BUILD_CUGRAPH" == "1" ]; then
gpuci_logger "Building conda packages for pylibcugraph and cugraph"
if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/pylibcugraph --python=$PYTHON
gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/cugraph --python=$PYTHON
gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/pylibcugraph --python=$PYTHON
gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/cugraph --python=$PYTHON
else
gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/pylibcugraph -c ${CONDA_LOCAL_CHANNEL} --dirty --no-remove-work-dir --python=$PYTHON
gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/cugraph -c ${CONDA_LOCAL_CHANNEL} --dirty --no-remove-work-dir --python=$PYTHON
gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/pylibcugraph -c ${CONDA_LOCAL_CHANNEL} --dirty --no-remove-work-dir --python=$PYTHON
gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/cugraph -c ${CONDA_LOCAL_CHANNEL} --dirty --no-remove-work-dir --python=$PYTHON
mkdir -p ${CONDA_BLD_DIR}/cugraph
mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/cugraph/work
fi
Expand Down
7 changes: 5 additions & 2 deletions ci/gpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,14 @@ else
gpuci_logger "Installing libcugraph-tests"
gpuci_mamba_retry install -c ${CONDA_ARTIFACT_PATH} libcugraph libcugraph_etl libcugraph-tests

# TODO: Move boa install to gpuci/rapidsai
gpuci_mamba_retry install boa

gpuci_logger "Building and installing pylibcugraph and cugraph..."
export CONDA_BLD_DIR="${WORKSPACE}/.conda-bld"
export VERSION_SUFFIX=""
gpuci_conda_retry build conda/recipes/pylibcugraph --no-build-id --croot ${CONDA_BLD_DIR} -c ${CONDA_ARTIFACT_PATH} --python=${PYTHON}
gpuci_conda_retry build conda/recipes/cugraph --no-build-id --croot ${CONDA_BLD_DIR} -c ${CONDA_ARTIFACT_PATH} --python=${PYTHON}
gpuci_conda_retry mambabuild conda/recipes/pylibcugraph --no-build-id --croot ${CONDA_BLD_DIR} -c ${CONDA_ARTIFACT_PATH} --python=${PYTHON}
gpuci_conda_retry mambabuild conda/recipes/cugraph --no-build-id --croot ${CONDA_BLD_DIR} -c ${CONDA_ARTIFACT_PATH} --python=${PYTHON}
gpuci_mamba_retry install cugraph pylibcugraph -c ${CONDA_BLD_DIR} -c ${CONDA_ARTIFACT_PATH}
fi

Expand Down
11 changes: 11 additions & 0 deletions conda/recipes/cugraph/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
c_compiler_version:
- 9

cxx_compiler_version:
- 9

cuda_compiler:
- nvcc

sysroot_version:
- "2.17"
10 changes: 7 additions & 3 deletions conda/recipes/cugraph/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ build:
number: {{ GIT_DESCRIBE_NUMBER }}
string: cuda{{ cuda_major }}_py{{ py_version }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
script_env:
- CC
- CXX
- CUDAHOSTCXX
- PARALLEL_LEVEL
ignore_run_exports_from:
- {{ compiler('cuda') }}

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('cuda') }} {{ cuda_version }}
- sysroot_{{ target_platform }} {{ sysroot_version }}
host:
- python x.x
- cython>=0.29,<0.30
- libcugraph={{ version }}
Expand Down
12 changes: 12 additions & 0 deletions conda/recipes/libcugraph/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
c_compiler_version:
- 9

cxx_compiler_version:
- 9

cuda_compiler:
- nvcc

cmake_version:
- ">=3.20.1,!=3.23.0"

Expand All @@ -15,3 +24,6 @@ gtest_version:

libcusolver_version:
- ">=11.2.1"

sysroot_version:
- "2.17"
13 changes: 10 additions & 3 deletions conda/recipes/libcugraph/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ source:

build:
script_env:
- CC
- CXX
- CUDAHOSTCXX
- PARALLEL_LEVEL
- VERSION_SUFFIX
- CMAKE_GENERATOR
Expand All @@ -34,6 +31,10 @@ build:
requirements:
build:
- cmake {{ cmake_version }}
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('cuda') }} {{ cuda_version }}
- sysroot_{{ target_platform }} {{ sysroot_version }}
host:
- doxygen {{ doxygen_version }}
- cudatoolkit {{ cuda_version }}.*
Expand All @@ -54,6 +55,8 @@ outputs:
build:
number: {{ GIT_DESCRIBE_NUMBER }}
string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
ignore_run_exports_from:
- {{ compiler('cuda') }}
requirements:
build:
- cmake {{ cmake_version }}
Expand All @@ -76,6 +79,8 @@ outputs:
build:
number: {{ GIT_DESCRIBE_NUMBER }}
string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
ignore_run_exports_from:
- {{ compiler('cuda') }}
requirements:
build:
- cmake {{ cmake_version }}
Expand All @@ -96,6 +101,8 @@ outputs:
build:
number: {{ GIT_DESCRIBE_NUMBER }}
string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
ignore_run_exports_from:
- {{ compiler('cuda') }}
requirements:
build:
- cmake {{ cmake_version }}
Expand Down
11 changes: 11 additions & 0 deletions conda/recipes/pylibcugraph/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
c_compiler_version:
- 9

cxx_compiler_version:
- 9

cuda_compiler:
- nvcc

sysroot_version:
- "2.17"
10 changes: 7 additions & 3 deletions conda/recipes/pylibcugraph/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ build:
number: {{ GIT_DESCRIBE_NUMBER }}
string: cuda{{ cuda_major }}_py{{ py_version }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
script_env:
- CC
- CXX
- CUDAHOSTCXX
- PARALLEL_LEVEL
ignore_run_exports_from:
- {{ compiler('cuda') }}

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('cuda') }} {{ cuda_version }}
- sysroot_{{ target_platform }} {{ sysroot_version }}
host:
- python x.x
- cython>=0.29,<0.30
- libcugraph={{ version }}
Expand Down
2 changes: 1 addition & 1 deletion python/pylibcugraph/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def run(self):
os.path.join(os.sys.prefix, "lib")
],
libraries=['cudart', 'cusparse', 'cusolver', 'cugraph', 'nccl',
'cugraph_c'],
'cugraph_c', 'cublas'],
language='c++',
extra_compile_args=['-std=c++17'])
]
Expand Down