-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create conda package of patched dependencies (#275)
Instead of having the rapids version of thrust , cub, and libcudacxx being part of the `librmm` package provide them as a separate package. Authors: - Robert Maynard (https://github.com/robertmaynard) Approvers: - AJ Schmidt (https://github.com/ajschmidt8) - Bradley Dice (https://github.com/bdice) URL: #275
- Loading branch information
1 parent
dc941de
commit a63989a
Showing
4 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#============================================================================= | ||
# Copyright (c) 2022, NVIDIA CORPORATION. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
#============================================================================= | ||
cmake_minimum_required(VERSION 3.23.1) | ||
|
||
project(rapids-dependencies LANGUAGES CXX) | ||
|
||
set(rapids-cmake-dir "${PROJECT_SOURCE_DIR}/../../../rapids-cmake/") | ||
|
||
include(${rapids-cmake-dir}/cpm/init.cmake) | ||
rapids_cpm_init() | ||
|
||
# Download all source packages | ||
include(${rapids-cmake-dir}/cpm/libcudacxx.cmake) | ||
include(${rapids-cmake-dir}/cpm/thrust.cmake) | ||
set(CPM_DOWNLOAD_ALL "ON") | ||
rapids_cpm_libcudacxx(INSTALL_EXPORT_SET rapids-dependencies) | ||
rapids_cpm_thrust(NAMESPACE temp INSTALL_EXPORT_SET rapids-dependencies) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright (c) 2022, NVIDIA CORPORATION. | ||
|
||
# Script assumes the script is executed from the root of the repo directory | ||
|
||
REPO_DIR=$(cd $(dirname $0); pwd) | ||
|
||
SOURCE_DIR=${REPO_DIR}/conda/recipes/rapids_core_dependencies | ||
BUILD_DIR=${BUILD_DIR:=${REPO_DIR}/build} | ||
|
||
INSTALL_PREFIX=${INSTALL_PREFIX:=${PREFIX:=${CONDA_PREFIX:=$BUILD_DIR/install}}} | ||
export PARALLEL_LEVEL=${PARALLEL_LEVEL:-4} | ||
|
||
# If the dir to clean is a mounted dir in a container, the | ||
# contents should be removed but the mounted dirs will remain. | ||
# The find removes all contents but leaves the dirs, the rmdir | ||
# attempts to remove the dirs but can fail safely. | ||
if [ -d "${BUILD_DIR}" ]; then | ||
find "${BUILD_DIR}" -mindepth 1 -delete | ||
rmdir "${BUILD_DIR}" || true | ||
fi | ||
|
||
cmake -S "${SOURCE_DIR}" -B "${BUILD_DIR}" \ | ||
-DCMAKE_INSTALL_LIBDIR="lib" \ | ||
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \ | ||
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} | ||
cmake --build "${BUILD_DIR}" --target install -j${PARALLEL_LEVEL} |
8 changes: 8 additions & 0 deletions
8
conda/recipes/rapids_core_dependencies/conda_build_config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
cxx_compiler_version: | ||
- 9 | ||
|
||
cuda_compiler: | ||
- nvcc | ||
|
||
sysroot_version: | ||
- "2.17" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Copyright (c) 2022, NVIDIA CORPORATION. | ||
|
||
{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') + environ.get('VERSION_SUFFIX', '') %} | ||
{% set cuda_version = '.'.join(environ.get('CUDA', '11.5').split('.')[:2]) %} | ||
{% set cuda_major=cuda_version.split('.')[0] %} | ||
|
||
package: | ||
name: rapids_core_dependencies | ||
version: {{ version }} | ||
|
||
source: | ||
git_url: ../../.. | ||
|
||
build: | ||
number: {{ GIT_DESCRIBE_NUMBER }} | ||
string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} | ||
script_env: | ||
- VERSION_SUFFIX | ||
ignore_run_exports_from: | ||
- {{ compiler('cuda') }} | ||
|
||
requirements: | ||
build: | ||
- cmake>=3.23.1 | ||
- {{ compiler('cxx') }} | ||
- {{ compiler('cuda') }} {{ cuda_version }} | ||
- sysroot_{{ target_platform }} {{ sysroot_version }} | ||
host: | ||
- cudatoolkit {{ cuda_version }}.* | ||
|
||
about: | ||
home: https://rapids.ai/ | ||
license: Apache-2.0 | ||
license_family: Apache | ||
license_file: LICENSE | ||
summary: RAPIDS patched CUDA dependencies | ||
description: | | ||
A subset of RAPIDS CUDA/C++ dependencies that need | ||
to be packaged with custom C++ header locations to | ||
avoid compiler issues. |