Skip to content

Commit b21734e

Browse files
authored
Update librmm conda recipe (rapidsai#997)
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: rapidsai#997
1 parent 438d312 commit b21734e

File tree

5 files changed

+35
-28
lines changed

5 files changed

+35
-28
lines changed

conda/recipes/librmm/build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Copyright (c) 2018-2022, NVIDIA CORPORATION.
2+
3+
./build.sh -n -v clean librmm tests benchmarks --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib\"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
cmake_version:
2+
- ">=3.20.1"
3+
4+
gtest_version:
5+
- "=1.10.0"
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
#!/bin/bash
2-
# Copyright (c) 2018-2022, NVIDIA CORPORATION.
32

4-
./build.sh -v librmm --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib\"
3+
cmake --install build
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
#!/bin/bash
2-
# Copyright (c) 2018-2022, NVIDIA CORPORATION.
32

4-
./build.sh -n -v librmm tests benchmarks --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib\"
53
cmake --install build --component testing

conda/recipes/librmm/meta.yaml

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,53 @@
1-
# Copyright (c) 2018, NVIDIA CORPORATION.
1+
# Copyright (c) 2018-2022, NVIDIA CORPORATION.
22

33
{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') + environ.get('VERSION_SUFFIX', '') %}
44
{% set cuda_version='.'.join(environ.get('CUDA', '9.2').split('.')[:2]) %}
55
{% set cuda_major=cuda_version.split('.')[0] %}
6-
{% set cmake_version=">=3.20.1" %}
7-
{% set gtest_version="=1.10.0" %}
6+
{% set cuda_spec = ">=" + cuda_major ~ ",<" + (cuda_major | int + 1) ~ ".0a0" %} # i.e. >=11,<12.0a0
87

98
package:
109
name: librmm-split
1110

1211
source:
1312
git_url: ../../..
1413

14+
requirements:
15+
build:
16+
- cmake {{ cmake_version }}
17+
host:
18+
- cudatoolkit {{ cuda_version }}.*
19+
20+
build:
21+
script_env:
22+
- CC
23+
- CXX
24+
- CUDAHOSTCXX
25+
- PARALLEL_LEVEL
26+
- CMAKE_GENERATOR
27+
- CMAKE_C_COMPILER_LAUNCHER
28+
- CMAKE_CXX_COMPILER_LAUNCHER
29+
- CMAKE_CUDA_COMPILER_LAUNCHER
30+
- SCCACHE_S3_KEY_PREFIX=librmm-aarch64 # [aarch64]
31+
- SCCACHE_S3_KEY_PREFIX=librmm-linux64 # [linux64]
32+
- SCCACHE_BUCKET=rapids-sccache
33+
- SCCACHE_REGION=us-west-2
34+
- SCCACHE_IDLE_TIMEOUT=32768
35+
1536
outputs:
1637
- name: librmm
1738
version: {{ version }}
1839
script: install_librmm.sh
1940
build:
2041
number: {{ GIT_DESCRIBE_NUMBER }}
2142
string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
22-
script_env: &script_env
23-
- CC
24-
- CXX
25-
- CUDAHOSTCXX
26-
- PARALLEL_LEVEL
27-
- CMAKE_GENERATOR
28-
- CMAKE_C_COMPILER_LAUNCHER
29-
- CMAKE_CXX_COMPILER_LAUNCHER
30-
- CMAKE_CUDA_COMPILER_LAUNCHER
31-
- SCCACHE_S3_KEY_PREFIX=librmm-aarch64 # [aarch64]
32-
- SCCACHE_S3_KEY_PREFIX=librmm-linux64 # [linux64]
33-
- SCCACHE_BUCKET=rapids-sccache
34-
- SCCACHE_REGION=us-west-2
35-
- SCCACHE_IDLE_TIMEOUT=32768
3643
run_exports:
3744
- {{ pin_subpackage("librmm", max_pin="x.x") }}
3845
requirements:
3946
build:
4047
- cmake {{ cmake_version }}
41-
host:
42-
- cudatoolkit {{ cuda_version }}.*
4348
run:
49+
- cudatoolkit {{ cuda_spec }}
4450
- spdlog>=1.8.5,<1.9
45-
- {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }}
4651
test:
4752
commands:
4853
- test -f $PREFIX/include/rmm/thrust_rmm_allocator.h
@@ -87,14 +92,11 @@ outputs:
8792
build:
8893
number: {{ GIT_DESCRIBE_NUMBER }}
8994
string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
90-
script_env: *script_env
9195
requirements:
9296
build:
9397
- cmake {{ cmake_version }}
94-
host:
95-
- cudatoolkit {{ cuda_version }}.*
9698
run:
97-
- {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }}
99+
- cudatoolkit {{ cuda_spec }}
98100
- {{ pin_subpackage('librmm', exact=True) }}
99101
- gtest {{ gtest_version }}
100102
- gmock {{ gtest_version }}

0 commit comments

Comments
 (0)