Skip to content

Commit

Permalink
Update librmm conda recipe (#997)
Browse files Browse the repository at this point in the history
This PR updates the `librmm` `conda` recipe with some learnings from rapidsai/cudf#10326.

Namely that the top-level `build.sh` script is the only feasible approach for consolidating the recipes.

The implication of these changes is that any shared libraries used in the top-level build must now manually be specified as `run` dependencies of the corresponding `outputs` package. To help reduce the amount of duplication of version specifications for these packages, dependency versions can be specified in `conda/recipes/librmm/conda_build_config.yaml`. The exception here is the version spec used for `cudatoolkit` since that comes from an environment variable in the CI process.

Authors:
  - AJ Schmidt (https://github.com/ajschmidt8)

Approvers:
  - Jake Awe (https://github.com/AyodeAwe)
  - Jordan Jacobelli (https://github.com/Ethyling)

URL: #997
  • Loading branch information
ajschmidt8 authored Mar 17, 2022
1 parent 438d312 commit b21734e
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 28 deletions.
3 changes: 3 additions & 0 deletions conda/recipes/librmm/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright (c) 2018-2022, NVIDIA CORPORATION.

./build.sh -n -v clean librmm tests benchmarks --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib\"
5 changes: 5 additions & 0 deletions conda/recipes/librmm/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cmake_version:
- ">=3.20.1"

gtest_version:
- "=1.10.0"
3 changes: 1 addition & 2 deletions conda/recipes/librmm/install_librmm.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/bash
# Copyright (c) 2018-2022, NVIDIA CORPORATION.

./build.sh -v librmm --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib\"
cmake --install build
2 changes: 0 additions & 2 deletions conda/recipes/librmm/install_librmm_tests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/bin/bash
# Copyright (c) 2018-2022, NVIDIA CORPORATION.

./build.sh -n -v librmm tests benchmarks --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib\"
cmake --install build --component testing
50 changes: 26 additions & 24 deletions conda/recipes/librmm/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,48 +1,53 @@
# Copyright (c) 2018, NVIDIA CORPORATION.
# Copyright (c) 2018-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', '9.2').split('.')[:2]) %}
{% set cuda_major=cuda_version.split('.')[0] %}
{% set cmake_version=">=3.20.1" %}
{% set gtest_version="=1.10.0" %}
{% set cuda_spec = ">=" + cuda_major ~ ",<" + (cuda_major | int + 1) ~ ".0a0" %} # i.e. >=11,<12.0a0

package:
name: librmm-split

source:
git_url: ../../..

requirements:
build:
- cmake {{ cmake_version }}
host:
- cudatoolkit {{ cuda_version }}.*

build:
script_env:
- CC
- CXX
- CUDAHOSTCXX
- PARALLEL_LEVEL
- CMAKE_GENERATOR
- CMAKE_C_COMPILER_LAUNCHER
- CMAKE_CXX_COMPILER_LAUNCHER
- CMAKE_CUDA_COMPILER_LAUNCHER
- SCCACHE_S3_KEY_PREFIX=librmm-aarch64 # [aarch64]
- SCCACHE_S3_KEY_PREFIX=librmm-linux64 # [linux64]
- SCCACHE_BUCKET=rapids-sccache
- SCCACHE_REGION=us-west-2
- SCCACHE_IDLE_TIMEOUT=32768

outputs:
- name: librmm
version: {{ version }}
script: install_librmm.sh
build:
number: {{ GIT_DESCRIBE_NUMBER }}
string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
script_env: &script_env
- CC
- CXX
- CUDAHOSTCXX
- PARALLEL_LEVEL
- CMAKE_GENERATOR
- CMAKE_C_COMPILER_LAUNCHER
- CMAKE_CXX_COMPILER_LAUNCHER
- CMAKE_CUDA_COMPILER_LAUNCHER
- SCCACHE_S3_KEY_PREFIX=librmm-aarch64 # [aarch64]
- SCCACHE_S3_KEY_PREFIX=librmm-linux64 # [linux64]
- SCCACHE_BUCKET=rapids-sccache
- SCCACHE_REGION=us-west-2
- SCCACHE_IDLE_TIMEOUT=32768
run_exports:
- {{ pin_subpackage("librmm", max_pin="x.x") }}
requirements:
build:
- cmake {{ cmake_version }}
host:
- cudatoolkit {{ cuda_version }}.*
run:
- cudatoolkit {{ cuda_spec }}
- spdlog>=1.8.5,<1.9
- {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }}
test:
commands:
- test -f $PREFIX/include/rmm/thrust_rmm_allocator.h
Expand Down Expand Up @@ -87,14 +92,11 @@ outputs:
build:
number: {{ GIT_DESCRIBE_NUMBER }}
string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
script_env: *script_env
requirements:
build:
- cmake {{ cmake_version }}
host:
- cudatoolkit {{ cuda_version }}.*
run:
- {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }}
- cudatoolkit {{ cuda_spec }}
- {{ pin_subpackage('librmm', exact=True) }}
- gtest {{ gtest_version }}
- gmock {{ gtest_version }}
Expand Down

0 comments on commit b21734e

Please sign in to comment.