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

Update recipes for Enhanced Compatibility #910

Merged
merged 5 commits into from
Nov 9, 2021
Merged
Show file tree
Hide file tree
Changes from 3 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
24 changes: 12 additions & 12 deletions ci/cpu/upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ fi

gpuci_logger "Get conda file output locations"

export LIBRMM_FILES=$(conda build conda/recipes/librmm --output)
export RMM_FILE=$(conda build conda/recipes/rmm --python=$PYTHON --output)
export LIBRMM_FILE=$(conda build conda/recipes/librmm --output)
export RMM_FILES=$(conda build conda/recipes/rmm --python=$PYTHON --output)

################################################################################
# UPLOAD - Conda packages
Expand All @@ -39,18 +39,18 @@ export RMM_FILE=$(conda build conda/recipes/rmm --python=$PYTHON --output)
gpuci_logger "Starting conda uploads"

if [[ "$BUILD_LIBRMM" == "1" && "$UPLOAD_LIBRMM" == "1" ]]; then
while read -r LIBRMM_FILE; do
test -e ${LIBRMM_FILE}
echo "Upload librmm"
echo ${LIBRMM_FILE}
gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing ${LIBRMM_FILE} --no-progress
done <<< "${LIBRMM_FILES}"
test -e ${LIBRMM_FILE}
echo "Upload librmm"
echo ${LIBRMM_FILE}
gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing ${LIBRMM_FILE} --no-progress
fi

if [[ "$BUILD_RMM" == "1" && "$UPLOAD_RMM" == "1" ]]; then
test -e ${RMM_FILE}
echo "Upload rmm"
echo ${RMM_FILE}
gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing ${RMM_FILE} --no-progress
while read -r RMM_FILE; do
test -e ${RMM_FILE}
echo "Upload rmm"
echo ${RMM_FILE}
gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing ${RMM_FILE} --no-progress
done <<< "${RMM_FILES}"
fi

5 changes: 1 addition & 4 deletions ci/gpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,7 @@ else

cd $WORKSPACE/python

CONDA_FILE=`find $WORKSPACE/ci/artifacts/rmm/cpu/conda-bld/ -name "librmm*no_cma*.tar.bz2"`
if [[ "$CUDA_MAJOR_VER" -ge 11 ]] && [[ "$CUDA_MINOR_VER" -ge 2 ]]; then
CONDA_FILE=`find $WORKSPACE/ci/artifacts/rmm/cpu/conda-bld/ -name "librmm*has_cma*.tar.bz2"`
fi
CONDA_FILE=`find $WORKSPACE/ci/artifacts/rmm/cpu/conda-bld/ -name "librmm*.tar.bz2"`
CONDA_FILE=`basename "$CONDA_FILE" .tar.bz2` #get filename without extension
CONDA_FILE=${CONDA_FILE//-/=} #convert to conda install
gpuci_logger "Installing $CONDA_FILE"
Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/librmm/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2018-2019, NVIDIA CORPORATION.

# This assumes the script is executed from the root of the repo directory
./build.sh -v clean librmm --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib\" ${BUILD_FLAGS}
./build.sh -v clean librmm --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib\"
10 changes: 2 additions & 8 deletions conda/recipes/librmm/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
{% 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 build_flags="" if cudaMallocAsync == "has_cma" else "--no-cudamallocasync" %}

package:
name: librmm
Expand All @@ -14,7 +13,7 @@ source:

build:
number: {{ GIT_DESCRIBE_NUMBER }}
string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}_{{ cudaMallocAsync }}
string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
script_env:
- CC
- CXX
Expand All @@ -28,7 +27,6 @@ build:
- CMAKE_C_COMPILER_LAUNCHER
- CMAKE_CXX_COMPILER_LAUNCHER
- CMAKE_CUDA_COMPILER_LAUNCHER
- BUILD_FLAGS="{{ build_flags }}"
run_exports:
- {{ pin_subpackage("librmm", max_pin="x.x") }}

Expand All @@ -39,11 +37,7 @@ requirements:
- cudatoolkit {{ cuda_version }}.*
run:
- spdlog>=1.8.5,<1.9
{% if cudaMallocAsync == "has_cma" %}
- {{ pin_compatible('cudatoolkit', max_pin='x', lower_bound='11.2') }} # cudatoolkit >=11.2,<12.0.0
{% else %}
- {{ pin_compatible('cudatoolkit', upper_bound='11.2', lower_bound='11.0') }} # cudatoolkit >=11.0,<11.2
{% endif %}
- {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }}

test:
commands:
Expand Down
7 changes: 6 additions & 1 deletion conda/recipes/rmm/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Copyright (c) 2018-2019, NVIDIA CORPORATION.

# Script assumes the script is executed from the root of the repo directory
./build.sh -v clean rmm
BUILD_FLAGS=""
if [ "${cudaMallocAsync}" == "no_cma" ]; then
BUILD_FLAGS="${BUILD_FLAGS} --no-cudamallocasync"
fi

./build.sh -v clean rmm ${BUILD_FLAGS}
ajschmidt8 marked this conversation as resolved.
Show resolved Hide resolved
8 changes: 6 additions & 2 deletions conda/recipes/rmm/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ source:

build:
number: {{ GIT_DESCRIBE_NUMBER }}
string: cuda_{{ cuda_major }}_py{{ py_version }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
string: cuda{{ cuda_major }}_py{{ py_version }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}_{{ cudaMallocAsync }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the cudaMallocAsync bit still needed here given the changes above and the fact it is implicit based on CUDA version?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have some logic below that depends on this extra metadata in the build string. If you know a way we can work around that, then we could remove the extra {{ cudaMallocAsync }} bit here.

rmm/ci/gpu/build.sh

Lines 116 to 123 in 76ae622

CONDA_FILE=`find $WORKSPACE/ci/artifacts/rmm/cpu/conda-bld/ -name "librmm*no_cma*.tar.bz2"`
if [[ "$CUDA_MAJOR_VER" -ge 11 ]] && [[ "$CUDA_MINOR_VER" -ge 2 ]]; then
CONDA_FILE=`find $WORKSPACE/ci/artifacts/rmm/cpu/conda-bld/ -name "librmm*has_cma*.tar.bz2"`
fi
CONDA_FILE=`basename "$CONDA_FILE" .tar.bz2` #get filename without extension
CONDA_FILE=${CONDA_FILE//-/=} #convert to conda install
gpuci_logger "Installing $CONDA_FILE"
gpuci_mamba_retry install -c $WORKSPACE/ci/artifacts/rmm/cpu/conda-bld/ "$CONDA_FILE"

script_env:
- RMM_BUILD_NO_GPU_TEST
- VERSION_SUFFIX
Expand All @@ -34,7 +34,11 @@ requirements:
- python
- numba >=0.49
- numpy
- {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }}
{% if cudaMallocAsync == "has_cma" %}
- {{ pin_compatible('cudatoolkit', max_pin='x', lower_bound='11.2') }} # cudatoolkit >=11.2,<12.0.0
{% else %}
- {{ pin_compatible('cudatoolkit', upper_bound='11.2', lower_bound='11.0') }} # cudatoolkit >=11.0,<11.2
{% endif %}

test:
commands:
Expand Down